Skip to content

Instantly share code, notes, and snippets.

@lmeulen
Last active April 4, 2021 12:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lmeulen/70d69dda09e603c26c5f7460f49d045e to your computer and use it in GitHub Desktop.
Save lmeulen/70d69dda09e603c26c5f7460f49d045e to your computer and use it in GitHub Desktop.
crowdedness_import
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