Reference no: EM132586533
Homework - Starbucks Store Finder
Description
This program combines many topics we covered this semester as you create a store finder app for Starbucks locations.
The program will implement a menu of options:
1 - Find Stores by City and State
2 - Find Stores by Zip Code
3 - Find Stores by Zip Code and with Drive-Through
4 - Quit
Each option will display those stores that match the criteria. Your program will use the Pandas module and any other modules which you feel are necessary for the implementation of this program. You will use functions and an exception in writing this program.
Data
The CSV file is provided with this assignment. You will need to download this file to your PyCharm project. Use a symbolic constant in your program to store the name of the file, such as the following:
STARBUCKS_FILE = "All_Starbucks_Locations_in_the_US.csv"
Do not change the name of the file. You do not have to upload the data file when you submit your completed program. Submit only the Store Finder program.
Functions
• Write a function getData() which reads the Starbucks data csv file into a pandas DataFrame. You can filter the DataFrame to contain only the columns we will be working with in this program. The method returns a DataFrame. You might use a symbolic constant to store that list (as a tuple):
FILTERS = ('Number', 'Name', 'Street Address', 'City', 'State', 'Zip','Latitude','Longitude','Features-Stations')
Doing so will help you iterate through the columns of the Data Frame elsewhere in your program.
• Write a function displayStores(dfStores)to display information for the stores contained in the Data Frame dfStores, passed in as a parameter.
• Write a function findStoresByCityState(dfStores) which asks the user for the name of a city and state, and then locates all of the stores in that city and state. This function should call displayStores()to list the stores.
• Write a functionfindStoresByZip(dfStores) which asks the user for a ZIP code and then locates all the stores within the ZIP code. As some of the stores have ZIP+4 and some do not, the stores you select should be able to find stores with ZIP+4, just the five-number ZIP code, or the first three numbers. This function should call displayStores() to list the stores.
• Write a function findStoresByDriveThru(dfStores)which asks the user for a ZIP code and then locates all the stores within the ZIP code that also have a Drive-Through option.This function should call displayStores()tolist the stores.
• Write a main() function to implement the menu and program flow based on user choices.
Extra Credit:
Add any of these features to the program for extra credit.
• Add a Store:Add information about a new store to the DataFrame and save it to the csv file. You do not have to add all the fields, just the ones for which there is a filter. When writing it to the file, you can write blank values for the columns you omitted.
• Remove a Store:Ask the user to identify a store (by its location or store ID) to delete, remove it from the DataFrame, then write the updated contents to the CSV file.
Be sure to include print statements that display when the program runs, as well as comments in your code, identifying the additional features you added.
Contemporary logistics- warehouse management systems
: What benefits are associated with transportation management and warehouse management systems?
|
Why does the capsule not get stained
: Why does the capsule not get stained, while staining bacteria using the capsule starting method?
|
Prokaryotic identification and flow charts
: Many different characteristics are used to identify bacteria. Microbiologists often depend upon flow charts to arrive at a preliminary identification
|
When streptomycin resistant mutants were detected
: When streptomycin resistant mutants were detected, why did their numbers differ, perhaps very widely, among cultures?
|
Create a store finder app for starbucks locations
: Create a store finder app for Starbucks locations - Write a function getData() which reads the Starbucks data csv file into a pandas DataFrame
|
Scrum for new product development process
: Describe two processes: the stage-gate process for new product development and the use of SCRUM for new product development process.
|
Describe hypothetical new product
: Describe a hypothetical new product. Show how primary and secondary research for the hypothetical new product
|
What amount should gigantic report as investment income
: Grateful reported net income of P60,000,000 and paid a P22,500,000 cash dividend. What amount should Gigantic report as investment income for 2019?
|
What amount should be reported as trademark
: The trademark is expected to have an unlimited life. In Zephaniah's December 31, 2019 balance sheet, what amount should be reported as trademark?
|