Skip to content

Instantly share code, notes, and snippets.

@dottyz
Created May 2, 2019 18:24
Show Gist options
  • Save dottyz/2261bb2dba2b5c8bf552a1195f6ca2f2 to your computer and use it in GitHub Desktop.
Save dottyz/2261bb2dba2b5c8bf552a1195f6ca2f2 to your computer and use it in GitHub Desktop.
from datetime import timedelta
from fuzzywuzzy import fuzz
import matplotlib.pyplot as plt
import pandas as pd
import requests
import seaborn as sns
import json
import os
r = requests.get('https://tor.publicbikesystem.net/ube/gbfs/v1/en/station_information')
bikeshare_stations = pd.DataFrame(json.loads(r.content)['data']['stations'])[['station_id', 'name', 'lat', 'lon']].astype({
'station_id': 'float64',
})
bikeshare_stations.to_csv('./data/bikeshare_stations.csv', index=False)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment