gtfs_kit 5.2.2__tar.gz → 5.2.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {gtfs_kit-5.2.2 → gtfs_kit-5.2.3}/PKG-INFO +2 -3
- {gtfs_kit-5.2.2 → gtfs_kit-5.2.3}/README.rst +1 -2
- {gtfs_kit-5.2.2 → gtfs_kit-5.2.3}/gtfs_kit/__init__.py +1 -1
- {gtfs_kit-5.2.2 → gtfs_kit-5.2.3}/gtfs_kit/routes.py +0 -8
- {gtfs_kit-5.2.2 → gtfs_kit-5.2.3}/gtfs_kit/shapes.py +9 -5
- {gtfs_kit-5.2.2 → gtfs_kit-5.2.3}/pyproject.toml +1 -1
- gtfs_kit-5.2.3/setup.py +38 -0
- gtfs_kit-5.2.2/setup.py +0 -38
- {gtfs_kit-5.2.2 → gtfs_kit-5.2.3}/LICENSE.txt +0 -0
- {gtfs_kit-5.2.2 → gtfs_kit-5.2.3}/gtfs_kit/calendar.py +0 -0
- {gtfs_kit-5.2.2 → gtfs_kit-5.2.3}/gtfs_kit/cleaners.py +0 -0
- {gtfs_kit-5.2.2 → gtfs_kit-5.2.3}/gtfs_kit/constants.py +0 -0
- {gtfs_kit-5.2.2 → gtfs_kit-5.2.3}/gtfs_kit/feed.py +0 -0
- {gtfs_kit-5.2.2 → gtfs_kit-5.2.3}/gtfs_kit/helpers.py +0 -0
- {gtfs_kit-5.2.2 → gtfs_kit-5.2.3}/gtfs_kit/miscellany.py +0 -0
- {gtfs_kit-5.2.2 → gtfs_kit-5.2.3}/gtfs_kit/stop_times.py +0 -0
- {gtfs_kit-5.2.2 → gtfs_kit-5.2.3}/gtfs_kit/stops.py +0 -0
- {gtfs_kit-5.2.2 → gtfs_kit-5.2.3}/gtfs_kit/trips.py +0 -0
- {gtfs_kit-5.2.2 → gtfs_kit-5.2.3}/gtfs_kit/validators.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: gtfs-kit
|
|
3
|
-
Version: 5.2.
|
|
3
|
+
Version: 5.2.3
|
|
4
4
|
Summary: A Python 3.8+ library for analyzing GTFS feeds.
|
|
5
5
|
Home-page: https://github.com/mrcagney/gtfs_kit
|
|
6
6
|
License: MIT
|
|
@@ -27,8 +27,7 @@ Description-Content-Type: text/x-rst
|
|
|
27
27
|
|
|
28
28
|
GTFS Kit
|
|
29
29
|
********
|
|
30
|
-
.. image:: https://
|
|
31
|
-
:target: https://travis-ci.come/mrcagney/gtfs_kit
|
|
30
|
+
.. image:: https://github.com/mrcagney/gtfs_kit/actions/workflows/run_tests.yml/badge.svg
|
|
32
31
|
|
|
33
32
|
GTFS Kit is a Python 3.8+ library for analyzing `General Transit Feed Specification (GTFS) <https://en.wikipedia.org/wiki/GTFS>`_ data in memory without a database.
|
|
34
33
|
It uses Pandas and Shapely to do the heavy lifting.
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
GTFS Kit
|
|
2
2
|
********
|
|
3
|
-
.. image:: https://
|
|
4
|
-
:target: https://travis-ci.come/mrcagney/gtfs_kit
|
|
3
|
+
.. image:: https://github.com/mrcagney/gtfs_kit/actions/workflows/run_tests.yml/badge.svg
|
|
5
4
|
|
|
6
5
|
GTFS Kit is a Python 3.8+ library for analyzing `General Transit Feed Specification (GTFS) <https://en.wikipedia.org/wiki/GTFS>`_ data in memory without a database.
|
|
7
6
|
It uses Pandas and Shapely to do the heavy lifting.
|
|
@@ -724,21 +724,13 @@ def geometrize_routes(
|
|
|
724
724
|
d["geometry"] = so.linemerge(group.geometry.tolist())
|
|
725
725
|
return pd.Series(d)
|
|
726
726
|
|
|
727
|
-
if use_utm:
|
|
728
|
-
lat, lon = feed.shapes[["shape_pt_lat", "shape_pt_lon"]].values[0]
|
|
729
|
-
crs = hp.get_utm_crs(lat, lon)
|
|
730
|
-
else:
|
|
731
|
-
crs = cs.WGS84
|
|
732
|
-
|
|
733
727
|
return (
|
|
734
728
|
feed.geometrize_trips(trip_ids, use_utm=use_utm)
|
|
735
729
|
.filter(["route_id", "direction_id", "geometry"])
|
|
736
|
-
# GeoDataFrame disappears here
|
|
737
730
|
.groupby(groupby_cols)
|
|
738
731
|
.apply(merge_lines)
|
|
739
732
|
.reset_index()
|
|
740
733
|
.merge(feed.routes)
|
|
741
|
-
.pipe(gp.GeoDataFrame, crs=crs)
|
|
742
734
|
)
|
|
743
735
|
|
|
744
736
|
|
|
@@ -77,18 +77,22 @@ def geometrize_shapes_0(
|
|
|
77
77
|
|
|
78
78
|
If ``use_utm``, then use local UTM coordinates for the geometries.
|
|
79
79
|
"""
|
|
80
|
-
f = shapes.copy().sort_values(["shape_id", "shape_pt_sequence"])
|
|
81
80
|
|
|
82
81
|
def my_agg(group):
|
|
83
82
|
d = {}
|
|
84
83
|
d["geometry"] = sg.LineString(group[["shape_pt_lon", "shape_pt_lat"]].values)
|
|
85
84
|
return pd.Series(d)
|
|
86
85
|
|
|
87
|
-
g =
|
|
88
|
-
|
|
86
|
+
g = (
|
|
87
|
+
shapes.sort_values(["shape_id", "shape_pt_sequence"])
|
|
88
|
+
.groupby("shape_id", sort=False)
|
|
89
|
+
.apply(my_agg)
|
|
90
|
+
.reset_index()
|
|
91
|
+
.pipe(gp.GeoDataFrame, crs=cs.WGS84)
|
|
92
|
+
)
|
|
89
93
|
|
|
90
94
|
if use_utm:
|
|
91
|
-
lat, lon =
|
|
95
|
+
lat, lon = shapes[["shape_pt_lat", "shape_pt_lon"]].values[0]
|
|
92
96
|
crs = hp.get_utm_crs(lat, lon)
|
|
93
97
|
g = g.to_crs(crs)
|
|
94
98
|
|
|
@@ -190,7 +194,7 @@ def get_shapes_intersecting_geometry(
|
|
|
190
194
|
geometry: sg.base.BaseGeometry,
|
|
191
195
|
shapes_g: Optional[gp.GeoDataFrame] = None,
|
|
192
196
|
*,
|
|
193
|
-
geometrized: bool = False
|
|
197
|
+
geometrized: bool = False,
|
|
194
198
|
) -> pd.DataFrame:
|
|
195
199
|
"""
|
|
196
200
|
Return the subset of ``feed.shapes`` that contains all shapes that
|
gtfs_kit-5.2.3/setup.py
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
from setuptools import setup
|
|
3
|
+
|
|
4
|
+
packages = \
|
|
5
|
+
['gtfs_kit']
|
|
6
|
+
|
|
7
|
+
package_data = \
|
|
8
|
+
{'': ['*']}
|
|
9
|
+
|
|
10
|
+
install_requires = \
|
|
11
|
+
['folium>=0',
|
|
12
|
+
'geopandas>=0',
|
|
13
|
+
'json2html>=1',
|
|
14
|
+
'pandas>=1',
|
|
15
|
+
'pycountry>=19',
|
|
16
|
+
'requests>=2',
|
|
17
|
+
'rtree>=0',
|
|
18
|
+
'shapely>=1',
|
|
19
|
+
'utm>=0']
|
|
20
|
+
|
|
21
|
+
setup_kwargs = {
|
|
22
|
+
'name': 'gtfs-kit',
|
|
23
|
+
'version': '5.2.3',
|
|
24
|
+
'description': 'A Python 3.8+ library for analyzing GTFS feeds.',
|
|
25
|
+
'long_description': "GTFS Kit\n********\n.. image:: https://github.com/mrcagney/gtfs_kit/actions/workflows/run_tests.yml/badge.svg\n\nGTFS Kit is a Python 3.8+ library for analyzing `General Transit Feed Specification (GTFS) <https://en.wikipedia.org/wiki/GTFS>`_ data in memory without a database.\nIt uses Pandas and Shapely to do the heavy lifting.\n\nThis project supersedes `GTFSTK <https://github.com/mrcagney/gtfstk>`_.\n\n\nInstallation\n=============\n``poetry add gtfs_kit``.\n\n\nExamples\n========\nYou can find examples in the Jupyter notebook ``notebooks/examples.ipynb``.\n\n\nAuthors\n=========\n- Alex Raichev (2019-09), maintainer\n\n\nDocumentation\n=============\nDocumentation is built via Sphinx from the source code in the ``docs`` directory then published to Github Pages at `mrcagney.github.io/gtfs_kit_docs <https://mrcagney.github.io/gtfs_kit_docs>`_.\n\n\nNotes\n=====\n- This project's development status is Alpha.\n I use GTFS Kit for work and change it breakingly to suit my needs.\n- This project uses semantic versioning.\n- I aim for GTFS Kit to handle `the current GTFS <https://developers.google.com/transit/gtfs/reference>`_.\n In particular, i avoid handling `GTFS extensions <https://developers.google.com/transit/gtfs/reference/gtfs-extensions>`_.\n That is the most reasonable scope boundary i can draw at present, given this project's tiny budget.\n If you would like to fund me to expand that scope, feel free to email me.\n- Thanks to `MRCagney <http://www.mrcagney.com/>`_ for periodically donating to this project.\n- Constructive feedback and contributions are welcome.\n Please issue pull requests from a feature branch into the ``develop`` branch and include tests.\n- GTFS time is measured relative noon minus 12 hours, which can mess things up when crossing into daylight savings time.\n I don't think this issue causes any bugs in GTFS Kit, but you and i have been warned.\n Thanks to user derhuerst for bringing this to my attention in `closed Issue 8 <https://github.com/mrcagney/gtfs_kit/issues/8#issue-1063633457>`_.\n",
|
|
26
|
+
'author': 'Alex Raichev',
|
|
27
|
+
'author_email': 'araichev@mrcagney.com',
|
|
28
|
+
'maintainer': None,
|
|
29
|
+
'maintainer_email': None,
|
|
30
|
+
'url': 'https://github.com/mrcagney/gtfs_kit',
|
|
31
|
+
'packages': packages,
|
|
32
|
+
'package_data': package_data,
|
|
33
|
+
'install_requires': install_requires,
|
|
34
|
+
'python_requires': '>=3.8,<4',
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
setup(**setup_kwargs)
|
gtfs_kit-5.2.2/setup.py
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
# -*- coding: utf-8 -*-
|
|
2
|
-
from setuptools import setup
|
|
3
|
-
|
|
4
|
-
packages = \
|
|
5
|
-
['gtfs_kit']
|
|
6
|
-
|
|
7
|
-
package_data = \
|
|
8
|
-
{'': ['*']}
|
|
9
|
-
|
|
10
|
-
install_requires = \
|
|
11
|
-
['folium>=0',
|
|
12
|
-
'geopandas>=0',
|
|
13
|
-
'json2html>=1',
|
|
14
|
-
'pandas>=1',
|
|
15
|
-
'pycountry>=19',
|
|
16
|
-
'requests>=2',
|
|
17
|
-
'rtree>=0',
|
|
18
|
-
'shapely>=1',
|
|
19
|
-
'utm>=0']
|
|
20
|
-
|
|
21
|
-
setup_kwargs = {
|
|
22
|
-
'name': 'gtfs-kit',
|
|
23
|
-
'version': '5.2.2',
|
|
24
|
-
'description': 'A Python 3.8+ library for analyzing GTFS feeds.',
|
|
25
|
-
'long_description': "GTFS Kit\n********\n.. image:: https://travis-ci.com/mrcagney/gtfs_kit.svg?branch=master\n :target: https://travis-ci.come/mrcagney/gtfs_kit\n\nGTFS Kit is a Python 3.8+ library for analyzing `General Transit Feed Specification (GTFS) <https://en.wikipedia.org/wiki/GTFS>`_ data in memory without a database.\nIt uses Pandas and Shapely to do the heavy lifting.\n\nThis project supersedes `GTFSTK <https://github.com/mrcagney/gtfstk>`_.\n\n\nInstallation\n=============\n``poetry add gtfs_kit``.\n\n\nExamples\n========\nYou can find examples in the Jupyter notebook ``notebooks/examples.ipynb``.\n\n\nAuthors\n=========\n- Alex Raichev (2019-09), maintainer\n\n\nDocumentation\n=============\nDocumentation is built via Sphinx from the source code in the ``docs`` directory then published to Github Pages at `mrcagney.github.io/gtfs_kit_docs <https://mrcagney.github.io/gtfs_kit_docs>`_.\n\n\nNotes\n=====\n- This project's development status is Alpha.\n I use GTFS Kit for work and change it breakingly to suit my needs.\n- This project uses semantic versioning.\n- I aim for GTFS Kit to handle `the current GTFS <https://developers.google.com/transit/gtfs/reference>`_.\n In particular, i avoid handling `GTFS extensions <https://developers.google.com/transit/gtfs/reference/gtfs-extensions>`_.\n That is the most reasonable scope boundary i can draw at present, given this project's tiny budget.\n If you would like to fund me to expand that scope, feel free to email me.\n- Thanks to `MRCagney <http://www.mrcagney.com/>`_ for periodically donating to this project.\n- Constructive feedback and contributions are welcome.\n Please issue pull requests from a feature branch into the ``develop`` branch and include tests.\n- GTFS time is measured relative noon minus 12 hours, which can mess things up when crossing into daylight savings time.\n I don't think this issue causes any bugs in GTFS Kit, but you and i have been warned.\n Thanks to user derhuerst for bringing this to my attention in `closed Issue 8 <https://github.com/mrcagney/gtfs_kit/issues/8#issue-1063633457>`_.\n",
|
|
26
|
-
'author': 'Alex Raichev',
|
|
27
|
-
'author_email': 'araichev@mrcagney.com',
|
|
28
|
-
'maintainer': None,
|
|
29
|
-
'maintainer_email': None,
|
|
30
|
-
'url': 'https://github.com/mrcagney/gtfs_kit',
|
|
31
|
-
'packages': packages,
|
|
32
|
-
'package_data': package_data,
|
|
33
|
-
'install_requires': install_requires,
|
|
34
|
-
'python_requires': '>=3.8,<4',
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
setup(**setup_kwargs)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|