forerad

Utilities for collecting and analyzing with Citibike data in Python
Log | Files | Refs | README

commit 113556897b454281deb8858ff9998a4ab30c4f76
parent 137dcd04ffb7d6c091f2a98b0e64892806e358ba
Author: Steve Gattuso <steve@stevegattuso.me>
Date:   Sun,  5 Nov 2023 13:49:51 +0100

account for weird in-between schema

Diffstat:
Mforerad/persistence.py | 11+++++++++++
1 file changed, 11 insertions(+), 0 deletions(-)

diff --git a/forerad/persistence.py b/forerad/persistence.py @@ -68,6 +68,17 @@ class SQLiteStore(): Stores a dataframe of historical trips in the v1 schema format """ df = df.rename(columns={ + # Account for a weird in-between schema that starts on 2016-10 + 'Start Time': 'started_at', + 'Stop Time': 'ended_at', + 'Start Station ID': 'start_station_id', + 'End Station ID': 'end_station_id', + 'Start Station Latitude': 'start_lat', + 'Start Station Longitude': 'start_lng', + 'End Station Latitude': 'end_lat', + 'End Station Longitude': 'end_lng', + + # ...back to our normally scheduled program: 'starttime': 'started_at', 'stoptime': 'ended_at', 'start station id': 'start_station_id',