Skip to content
This repository was archived by the owner on Aug 18, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
gtfs-realtime-performance
==============================

This library makes it easy to calculate transity performance statistics (e.g., segment speeds, bus bunching) using archival GTFS-realtime data. It is intended to be used in conjuction with the GTFS-realtime archiving tool being developed in [gtfs-realtime-capsule](https://github.com/tsdataclinic/gtfs-realtime-capsule).
This library makes it easy to calculate transit performance statistics (e.g., segment speeds, bus bunching) using archival GTFS-realtime data. It is intended to be used in conjunction with the GTFS-realtime archiving tool being developed in [gtfs-realtime-capsule](https://github.com/tsdataclinic/gtfs-realtime-capsule).

### Project Organization

Expand All @@ -14,6 +14,6 @@ We have also included a number of utility functions to simplify the process of w

### Notebooks

This repository contains a number of notebooks that contain figures, tables, and maps created using our speed estimates. Some of these are old and messy - I'd reccommend looking at `notebooks/basic_plots_and_mta.ipynb` for comparisons of our speeds to speeds published by the MTA and at `notebooks/holidays.ipynb` to see bus speed comparisons on holidays.
This repository contains a number of notebooks that contain figures, tables, and maps created using our speed estimates. Some of these are old and messy - I'd recommend looking at `notebooks/basic_plots_and_mta.ipynb` for comparisons of our speeds to speeds published by the MTA and at `notebooks/holidays.ipynb` to see bus speed comparisons on holidays.

<p><small>Project based on the <a target="_blank" href="https://drivendata.github.io/cookiecutter-data-science/">cookiecutter data science project template</a>. #cookiecutterdatascience</small></p>
12 changes: 12 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,15 @@ coverage
awscli
flake8
python-dotenv>=0.5.1
pandas
geopandas
shapely
requests
numpy
tqdm
contextily
matplotlib
plotnine
geopy
xyzservices
statsmodels
5 changes: 0 additions & 5 deletions src/gtfs_segments.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
import os
import pandas as pd
import os
os.chdir("/home/canyon/Bus-Weather-Impacts")
import numpy as np
import geopandas as gpd
import numpy as np
from shapely.ops import nearest_points
pd.options.mode.chained_assignment = None
from shapely.geometry import Point, LineString
import src.api as api
from shapely.ops import linemerge
from shapely.ops import substring

class GTFS_shape_processor:
Expand Down
3 changes: 0 additions & 3 deletions src/process_batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
os.chdir("/home/canyon/Bus-Weather-Impacts")
from src.utils import *
import pandas as pd
import numpy as np
import geopandas as gpd
import numpy as np
pd.options.mode.chained_assignment = None
from src.api import parse_zipped_gtfs
from src.gtfs_segments import GTFS_shape_processor
Expand Down
1 change: 0 additions & 1 deletion src/speeds.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from shapely.ops import linemerge
import bisect
from tqdm import tqdm
import logging

class BusSpeedCalculator:
"""
Expand Down
5 changes: 0 additions & 5 deletions src/utils.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
import requests
import gzip
import pandas as pd
import tempfile
import shutil
import os
import geopandas as gpd
import numpy as np
import tarfile
import traceback

def read_parquet_from_tar_gz(url):
"""
Expand Down