Create a C++ program that will quantify and summarize Divvy Biketrip data, using . Your program will have options to analyze
Create a C++ program that will quantify and summarize Divvy Biketrip data, using . Your program will have options to analyze the dataset as awhole and to analyze patterns and similarities between a weekday (September 1st) and aweekend (September 4th). Running your program will look like what is shown below, alsoavailable as a :
Changes made Thursday 10/21:
1. New datafile uploaded to Zybooks, small enough to be usable in thatenvironment. Sample output recreated to reflect results when using that new smallerdataset.
2. Datafile selection sub-menu: Option 2 no longer refers to thesecond datafile as having “50,000+” rides. A new menu option 3 isgiven to refer to the full dataset, which you may want to use for your ownexploration, even though it will not be tested in Zybooks.
3. Notes include hints on how to convert a string to an integer ordouble
4. Menu option 4 (week day vs. weekend) submenu option 2 now is: 2. Proportional50 column graph with @ for weekday and + for weekend
Notes
Youwill need to convert strings to numerical values for some parts of yourprogram. Here is an example of how to do this, assuming it runs in a C++program that has #include<string> at the top:
strings1 = “32767”;
strings2 = “3.14159”;
intintegerValue = stoi( s1); // Convertstring s1 to integer, giving 23767
doubledoubleValue = stod( s2); // Convertstring s2 to double, giving 3.14159
Yourprogram must present the following six menu options:
Selecta menu option:
1.Select datafile, display rides totals and clean data
2.Display overall trip information.
3.Display percentage of members vs. casual riders
4.Display weekday vs weekend usage
5.Extra Credit: find closest station
6.Exit
Yourchoice –>
Theuser must select menu option 1 (select data file…) prior to selecting anyother menu options. Failing to do so results in an error message prompting theuser to first choose menu option 1.
Menu Option 1
Selectthe file you would like to read data from. When menu option 1 is selected, yourprogram will then prompt for a sub-menu option asking for which data file to beused, as follows:
Selectdatafile:
1. Small subset of data with 14 rides to helpcreate your program
2. Week day vs weekend rides
3. All September 2021 data (not tested inZybooks)
Yourselection–> 1
Total# of trips found in datafile: 13
Total# of trips in clean data: 10
Thesample above shows how after the datafile is read, your program then displaysthe total number of trips in the datafile, along with the number of tripsconsidered “clean” data, where all fields for that trip have valuesin them. Subsequent steps all use the clean data.
Menu Option 2
Providesthe following general information on the cleaned data
Total # of miles traveled
Average length of trips in miles
Longest trip ID, start and end locations and distance in miles
Thislooks like the following:
Total# of miles traveled: 12
Averagelength of trips in miles: 1.2
Longesttrip information below:
——————————-
TripID: B465E78B601DB5A8
Tripstart location: Broadway & Belmont Ave
Tripend location: Broadway & Thorndale Ave
Tripdistance in miles: 3.5
Menu Option 3
Displaythe percentage of casual vs member riders. This looks like the following:
CasualRider Percentage: 40.0%
MemberRider Percentage: 60.0%
Menu Option 4
Compute and display the number oftrips by hour, comparing Divvy bike data for September 1st and 4th. This has a sub-menu as follows:
Select type of display:
1. Counts of rides per hour in the day
2. Proportional 50 column graph with @ forweekday and + for weekend
Your selection–> 1
LargestNumberOfRides is: 1317
Rides per hour for weekday and weekend:
0: 66 324
1: 26 245
2: 18 122
3: 7 55
4: 16 36
5: 86 42
6: 301 70
7: 565 144
8: 556 275
9: 382 437
10: 311 671
11: 402 770
12: 495 915
13: 428 852
14: 436 819
15: 602 881
16: 845 876
17: 1317 822
18: 1093 751
19: 821 611
20: 533 461
21: 442 376
22: 305 477
23: 174 375
Selectingthe sub-menu option 2 gives an ASCII graphics scaled graph. To create thisgraph first find the largest number of rides for any hour of either the weekdayor weekend. For each displayed value figure out what it is as a fraction ofthis largest value. Multiply that by 50 to give the number of characters to bedisplayed. See the google doc sample output near the top of this page forsample output after choosing this menu option.
Menu Option 5 (Extra Credit)
SearchGoogle to find a really nice home in Chicago you would like to live in. InGoogle maps and click on that home to create a “pin” at that spot.Then right-click on the pin to display location information. Click on thelatitude, longitude information shown to copy those numbers. Use those numbersas input to your program, which then should figure out and display the Divvystation closest to that location. See the google doc sample output near the topof this page for sample output after choosing this menu option.
Menu Option 6
Exitthe program.
Run the program, again and again, to make sure you know what’s going on, then write c++ in your own version(function names, variable).
After you finish, write 500 words to compare why you chose that version, and why it’s better than the solution program.
You can work on the startercode that I attached.
Collepals.com Plagiarism Free Papers
Are you looking for custom essay writing service or even dissertation writing services? Just request for our write my paper service, and we'll match you with the best essay writer in your subject! With an exceptional team of professional academic experts in a wide range of subjects, we can guarantee you an unrivaled quality of custom-written papers.
Get ZERO PLAGIARISM, HUMAN WRITTEN ESSAYS
Why Hire Collepals.com writers to do your paper?
Quality- We are experienced and have access to ample research materials.
We write plagiarism Free Content
Confidential- We never share or sell your personal information to third parties.
Support-Chat with us today! We are always waiting to answer all your questions.