Created
July 26, 2019 03:02
-
-
Save ChicagoDev/649829c5cc1d0ac99a146e0897ebfa54 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def __init__(self, mta_week_numbers): | |
""" | |
MtaRidership class constructor | |
:param mta_week_numbers: A list of YYMMDD strings for the turnstile week files to load. | |
:return: MtaRidership | |
""" | |
self.turnstiles_df = [] | |
self.turnstiles_daily = [] | |
self.get_data(mta_week_numbers) | |
self.bootstrap() | |
def bootstrap(self): | |
""" | |
Called by __init__. Logic for parsing MTA data. | |
:return: None | |
""" | |
self.format_columns() | |
self.remove_duplicates() | |
self.drop_misc_columns() | |
self.group_by_station_and_date() | |
self.count_ridership() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment