Question: Assignment Specification Description: This assignment has two parts: processing 2 csv files related to City Bike ridership for the same month in different years and
Assignment Specification
Description: This assignment has two parts: processing csv files related to City Bike ridership for the
same month in different years and comparing the two files.
Part :
Input: No input from the user required. The input file names to use in the script are NYCCitiBikeMarcsv
and NYCCitiBikeMarcsv
Please note:
file name has to be without its complete file path. For example: c:stevensem NYCCitiBike
Marcsv is NOT right. If you change platform or move the file to another directory, the script
wouldn't work. Be sure your script and your file are in the same directory.
No data structure management library like pandas should be used for this assignment.
The two files use a slightly different structure. In the Mar one, user type is defined as "User Type",
and this can be "Subscriber" meaning users with a subscription or "Customer" meaning
occasional users In the Mar one, user type is defined as membercasual" and this can be
"member" meaning users with a subscription or "casual" meaning occasional users
Output: Skip a lineprint a blank line, then print per each file:
The file has n lines n will be for Mar n for Mar Of those n :
Mar: x of them have "Customer" as usertype, have "Subscriber" as usertype. "Customer"
are of the total
Mar: x of them have "casual" as membercasual, have "member" as membercasual.
"casual" are of the total
Procedure:
Open the files.
Loop into the files.
For each file:
a Count the number of lines Note: skip the header. You will get number: n for Mar and
n for Mar
b Count of the number of lines with: Mar "Customer" as usertype this is or Mar
"casual" as membercasual this is
c Count of the number of lines with: Mar Subscriber" as usertype this is or Mar
"member" as membercasual this is y
d Calculate the z of "Customer" in Mar Calculate the z of "casual" in Mar
e Print: The file has lines. Of those are occasional users, have a subscription. Occasional
users are of the total. Part :
Input: No input from the user required. Use the data from Part
Output: Comparison of the data in the files. Considering the files are related to different periods, we want
to compare them to optimize the bike availability. In particular, because one file is related to data before the
pandemic while the other is after, we want to evaluate the impact of the pandemic on the ridership.
Procedure:
Check IF nn:
IF nn print: The Mar riders are more than the Mar
else, print: The Mar riders are more or equal than the Mar
Check IF zz:
IF zz print: Before the pandemic there were more occasional users than after the
pandemic
else, print: After the pandemic there were more or equal occasional users than before the
pandemic
Write a page interpretation. The interpretation would be a narrative describingexplaining in
plain English the results of your Python script. It should NOT be a description of your code.
Submit the coding parts as a single py file via Canvas and the interpretation in a separate docpdf file.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
