Last active
April 4, 2021 12:58
-
-
Save lmeulen/70d69dda09e603c26c5f7460f49d045e to your computer and use it in GitHub Desktop.
crowdedness_import
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
import os, sys, requests, zipfile | |
import pandas as pd | |
from geojson import LineString, Feature, FeatureCollection, dump | |
GTFSDIR = 'gtfs-nl' | |
NDOVDIR = 'ndov' | |
displaydate = '20210309' | |
def min2str(minutes): | |
return "{:02d}:{:02d}".format(int((int(minutes) / 60) % 24), int(minutes % 60)) | |
def str2min(time_str): | |
h, m, s = time_str.strip().split(":") | |
return int(h) * 60 + int(m) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment