Created
May 25, 2021 17:55
-
-
Save lmeulen/8c6866493b00351a935d3c36fda40838 to your computer and use it in GitHub Desktop.
AllPT2UT_input
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 pandas as pd | |
import geopandas as gpd | |
import numpy as np | |
import urllib, json, csv, zipfile, sys | |
import matplotlib.pyplot as plt | |
from geopandas.tools import sjoin | |
from shapely.geometry import LineString, Point | |
with zipfile.ZipFile('gtfs-nl.zip') as z: | |
with z.open('stops.txt') as f: | |
routes = pd.read_csv(f) | |
routes = routes[['stop_lat', 'stop_lon']] | |
routes['Date'] = '03/17/2021' | |
routes['Time'] = '04:00PM' | |
routes['utc_lat'] = '52.088208' | |
routes['utc_lon'] = '5.113234' | |
routes = routes[['Date', 'Time', 'utc_lat', 'utc_lon', 'stop_lat', 'stop_lon']] | |
routes = routes.drop_duplicates() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment