gtfs_kit 5.2.0__tar.gz → 5.2.2__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.
@@ -0,0 +1,74 @@
1
+ Metadata-Version: 2.1
2
+ Name: gtfs-kit
3
+ Version: 5.2.2
4
+ Summary: A Python 3.8+ library for analyzing GTFS feeds.
5
+ Home-page: https://github.com/mrcagney/gtfs_kit
6
+ License: MIT
7
+ Author: Alex Raichev
8
+ Author-email: araichev@mrcagney.com
9
+ Requires-Python: >=3.8,<4
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.10
13
+ Classifier: Programming Language :: Python :: 3.8
14
+ Classifier: Programming Language :: Python :: 3.9
15
+ Requires-Dist: folium (>=0)
16
+ Requires-Dist: geopandas (>=0)
17
+ Requires-Dist: json2html (>=1)
18
+ Requires-Dist: pandas (>=1)
19
+ Requires-Dist: pycountry (>=19)
20
+ Requires-Dist: requests (>=2)
21
+ Requires-Dist: rtree (>=0)
22
+ Requires-Dist: shapely (>=1)
23
+ Requires-Dist: utm (>=0)
24
+ Project-URL: Documentation, https://mrcagney.github.io/gtfs_kit_docs
25
+ Project-URL: Repository, https://github.com/mrcagney/gtfs_kit
26
+ Description-Content-Type: text/x-rst
27
+
28
+ GTFS Kit
29
+ ********
30
+ .. image:: https://travis-ci.com/mrcagney/gtfs_kit.svg?branch=master
31
+ :target: https://travis-ci.come/mrcagney/gtfs_kit
32
+
33
+ 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
+ It uses Pandas and Shapely to do the heavy lifting.
35
+
36
+ This project supersedes `GTFSTK <https://github.com/mrcagney/gtfstk>`_.
37
+
38
+
39
+ Installation
40
+ =============
41
+ ``poetry add gtfs_kit``.
42
+
43
+
44
+ Examples
45
+ ========
46
+ You can find examples in the Jupyter notebook ``notebooks/examples.ipynb``.
47
+
48
+
49
+ Authors
50
+ =========
51
+ - Alex Raichev (2019-09), maintainer
52
+
53
+
54
+ Documentation
55
+ =============
56
+ Documentation 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>`_.
57
+
58
+
59
+ Notes
60
+ =====
61
+ - This project's development status is Alpha.
62
+ I use GTFS Kit for work and change it breakingly to suit my needs.
63
+ - This project uses semantic versioning.
64
+ - I aim for GTFS Kit to handle `the current GTFS <https://developers.google.com/transit/gtfs/reference>`_.
65
+ In particular, i avoid handling `GTFS extensions <https://developers.google.com/transit/gtfs/reference/gtfs-extensions>`_.
66
+ That is the most reasonable scope boundary i can draw at present, given this project's tiny budget.
67
+ If you would like to fund me to expand that scope, feel free to email me.
68
+ - Thanks to `MRCagney <http://www.mrcagney.com/>`_ for periodically donating to this project.
69
+ - Constructive feedback and contributions are welcome.
70
+ Please issue pull requests from a feature branch into the ``develop`` branch and include tests.
71
+ - GTFS time is measured relative noon minus 12 hours, which can mess things up when crossing into daylight savings time.
72
+ I don't think this issue causes any bugs in GTFS Kit, but you and i have been warned.
73
+ Thanks to user derhuerst for bringing this to my attention in `closed Issue 8 <https://github.com/mrcagney/gtfs_kit/issues/8#issue-1063633457>`_.
74
+
@@ -0,0 +1,46 @@
1
+ GTFS Kit
2
+ ********
3
+ .. image:: https://travis-ci.com/mrcagney/gtfs_kit.svg?branch=master
4
+ :target: https://travis-ci.come/mrcagney/gtfs_kit
5
+
6
+ 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
+ It uses Pandas and Shapely to do the heavy lifting.
8
+
9
+ This project supersedes `GTFSTK <https://github.com/mrcagney/gtfstk>`_.
10
+
11
+
12
+ Installation
13
+ =============
14
+ ``poetry add gtfs_kit``.
15
+
16
+
17
+ Examples
18
+ ========
19
+ You can find examples in the Jupyter notebook ``notebooks/examples.ipynb``.
20
+
21
+
22
+ Authors
23
+ =========
24
+ - Alex Raichev (2019-09), maintainer
25
+
26
+
27
+ Documentation
28
+ =============
29
+ Documentation 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>`_.
30
+
31
+
32
+ Notes
33
+ =====
34
+ - This project's development status is Alpha.
35
+ I use GTFS Kit for work and change it breakingly to suit my needs.
36
+ - This project uses semantic versioning.
37
+ - I aim for GTFS Kit to handle `the current GTFS <https://developers.google.com/transit/gtfs/reference>`_.
38
+ In particular, i avoid handling `GTFS extensions <https://developers.google.com/transit/gtfs/reference/gtfs-extensions>`_.
39
+ That is the most reasonable scope boundary i can draw at present, given this project's tiny budget.
40
+ If you would like to fund me to expand that scope, feel free to email me.
41
+ - Thanks to `MRCagney <http://www.mrcagney.com/>`_ for periodically donating to this project.
42
+ - Constructive feedback and contributions are welcome.
43
+ Please issue pull requests from a feature branch into the ``develop`` branch and include tests.
44
+ - GTFS time is measured relative noon minus 12 hours, which can mess things up when crossing into daylight savings time.
45
+ I don't think this issue causes any bugs in GTFS Kit, but you and i have been warned.
46
+ Thanks to user derhuerst for bringing this to my attention in `closed Issue 8 <https://github.com/mrcagney/gtfs_kit/issues/8#issue-1063633457>`_.
@@ -12,4 +12,4 @@ from .validators import *
12
12
  from .feed import *
13
13
 
14
14
 
15
- __version__ = "5.2.0"
15
+ __version__ = "5.2.2"
@@ -43,7 +43,9 @@ def clean_ids(feed: "Feed") -> "Feed":
43
43
  for column in cs.GTFS_REF.loc[cs.GTFS_REF["table"] == table, "column"]:
44
44
  if column in f.columns and column.endswith("_id"):
45
45
  try:
46
- f[column] = f[column].str.strip().str.replace(r"\s+", "_")
46
+ f[column] = (
47
+ f[column].str.strip().str.replace(r"\s+", "_", regex=True)
48
+ )
47
49
  setattr(feed, table, f)
48
50
  except AttributeError:
49
51
  # Column is not of string type
@@ -584,11 +584,9 @@ def geometrize_stops_0(
584
584
  ``'stop_lat'``.
585
585
  """
586
586
  g = (
587
- stops.assign(
588
- geometry=lambda x: [sg.Point(p) for p in x[["stop_lon", "stop_lat"]].values]
589
- )
587
+ stops.assign(geometry=gp.points_from_xy(x=stops.stop_lon, y=stops.stop_lat))
590
588
  .drop(["stop_lon", "stop_lat"], axis=1)
591
- .pipe(lambda x: gp.GeoDataFrame(x, crs=cs.WGS84))
589
+ .pipe(gp.GeoDataFrame, crs=cs.WGS84)
592
590
  )
593
591
 
594
592
  if use_utm:
@@ -1477,7 +1477,7 @@ def check_transfers(
1477
1477
  )
1478
1478
 
1479
1479
  # Check transfer_type
1480
- v = lambda x: pd.isna(x) or x in range(5)
1480
+ v = lambda x: pd.isna(x) or x in range(4)
1481
1481
  problems = check_column(
1482
1482
  problems, table, f, "transfer_type", v, column_required=False
1483
1483
  )
@@ -0,0 +1,38 @@
1
+ [tool.poetry]
2
+ name = "gtfs_kit"
3
+ version = "5.2.2"
4
+ description = "A Python 3.8+ library for analyzing GTFS feeds."
5
+ authors = ["Alex Raichev <araichev@mrcagney.com>"]
6
+ readme = "README.rst"
7
+ license = "MIT"
8
+ repository = "https://github.com/mrcagney/gtfs_kit"
9
+ documentation = "https://mrcagney.github.io/gtfs_kit_docs"
10
+ exclude = ["tests", "docs"]
11
+
12
+ [tool.poetry.dependencies]
13
+ python = ">=3.8, <4"
14
+ pandas = ">=1"
15
+ shapely = ">=1"
16
+ pycountry = ">=19"
17
+ utm = ">=0"
18
+ json2html = ">=1"
19
+ geopandas = ">=0"
20
+ rtree = ">=0"
21
+ folium = ">=0"
22
+ requests = ">=2"
23
+
24
+ [tool.poetry.dev-dependencies]
25
+ jupyter = "*"
26
+ pytest = ">=6"
27
+ sphinx = ">=3"
28
+ pre-commit = ">=0"
29
+ black = ">22"
30
+ publish_sphinx_docs = ">=1.0"
31
+ matplotlib = ">=1"
32
+ pytest-socket = ">=0"
33
+ nbstripout = ">=0.5"
34
+
35
+ [build-system]
36
+ requires = ["poetry>=1"]
37
+ build-backend = "poetry.masonry.api"
38
+
@@ -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.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)
gtfs_kit-5.2.0/PKG-INFO DELETED
@@ -1,67 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: gtfs-kit
3
- Version: 5.2.0
4
- Summary: A Python 3.7+ library for analyzing GTFS feeds.
5
- Home-page: https://github.com/mrcagney/gtfs_kit
6
- License: MIT
7
- Author: Alex Raichev
8
- Author-email: araichev@mrcagney.com
9
- Requires-Python: >=3.7,<4.0
10
- Classifier: License :: OSI Approved :: MIT License
11
- Classifier: Programming Language :: Python :: 3
12
- Classifier: Programming Language :: Python :: 3.10
13
- Classifier: Programming Language :: Python :: 3.7
14
- Classifier: Programming Language :: Python :: 3.8
15
- Classifier: Programming Language :: Python :: 3.9
16
- Requires-Dist: folium (<1)
17
- Requires-Dist: geopandas (<1)
18
- Requires-Dist: json2html (<2)
19
- Requires-Dist: pandas (<2)
20
- Requires-Dist: pycountry (<20)
21
- Requires-Dist: requests (<3)
22
- Requires-Dist: rtree (<1)
23
- Requires-Dist: shapely (<2)
24
- Requires-Dist: utm (<1)
25
- Project-URL: Documentation, https://mrcagney.github.io/gtfs_kit_docs
26
- Project-URL: Repository, https://github.com/mrcagney/gtfs_kit
27
- Description-Content-Type: text/x-rst
28
-
29
- GTFS Kit
30
- ********
31
- .. image:: https://travis-ci.com/mrcagney/gtfs_kit.svg?branch=master
32
- :target: https://travis-ci.come/mrcagney/gtfs_kit
33
-
34
- GTFS Kit is a Python 3.7+ kit for analyzing `General Transit Feed Specification (GTFS) <https://en.wikipedia.org/wiki/GTFS>`_ data in memory without a database.
35
- It uses Pandas and Shapely to do the heavy lifting.
36
-
37
- This project supersedes `GTFSTK <https://github.com/mrcagney/gtfstk>`_.
38
-
39
-
40
- Installation
41
- =============
42
- ``pip install gtfs_kit``.
43
-
44
-
45
- Examples
46
- ========
47
- Examples are in the Jupyter notebook ``notebooks/examples.ipynb``.
48
-
49
-
50
- Authors
51
- =========
52
- - Alex Raichev, 2019-09
53
-
54
-
55
- Documentation
56
- =============
57
- On Github Pages `here <https://mrcagney.github.io/gtfs_kit_docs>`_.
58
-
59
-
60
- Notes
61
- =====
62
- - Development status is Alpha
63
- - This project uses semantic versioning
64
- - Thanks to `MRCagney <http://www.mrcagney.com/>`_ for donating to this project
65
- - Constructive feedback and code contributions welcome. Please issue pull requests into the ``develop`` branch and include tests.
66
- - GTFS time is measured relative noon minus 12 hours, which can mess things up when crossing into daylight savings time. I don't think this issue causes any bugs in GTFS Kit, but you and i have been warned. Thanks to derhuerst for bringing this to my attention in `closed Issue 8 <https://github.com/mrcagney/gtfs_kit/issues/8#issue-1063633457>`_.
67
-
gtfs_kit-5.2.0/README.rst DELETED
@@ -1,38 +0,0 @@
1
- GTFS Kit
2
- ********
3
- .. image:: https://travis-ci.com/mrcagney/gtfs_kit.svg?branch=master
4
- :target: https://travis-ci.come/mrcagney/gtfs_kit
5
-
6
- GTFS Kit is a Python 3.7+ kit for analyzing `General Transit Feed Specification (GTFS) <https://en.wikipedia.org/wiki/GTFS>`_ data in memory without a database.
7
- It uses Pandas and Shapely to do the heavy lifting.
8
-
9
- This project supersedes `GTFSTK <https://github.com/mrcagney/gtfstk>`_.
10
-
11
-
12
- Installation
13
- =============
14
- ``pip install gtfs_kit``.
15
-
16
-
17
- Examples
18
- ========
19
- Examples are in the Jupyter notebook ``notebooks/examples.ipynb``.
20
-
21
-
22
- Authors
23
- =========
24
- - Alex Raichev, 2019-09
25
-
26
-
27
- Documentation
28
- =============
29
- On Github Pages `here <https://mrcagney.github.io/gtfs_kit_docs>`_.
30
-
31
-
32
- Notes
33
- =====
34
- - Development status is Alpha
35
- - This project uses semantic versioning
36
- - Thanks to `MRCagney <http://www.mrcagney.com/>`_ for donating to this project
37
- - Constructive feedback and code contributions welcome. Please issue pull requests into the ``develop`` branch and include tests.
38
- - GTFS time is measured relative noon minus 12 hours, which can mess things up when crossing into daylight savings time. I don't think this issue causes any bugs in GTFS Kit, but you and i have been warned. Thanks to derhuerst for bringing this to my attention in `closed Issue 8 <https://github.com/mrcagney/gtfs_kit/issues/8#issue-1063633457>`_.
@@ -1,38 +0,0 @@
1
- [tool.poetry]
2
- name = "gtfs_kit"
3
- version = "5.2.0"
4
- description = "A Python 3.7+ library for analyzing GTFS feeds."
5
- authors = ["Alex Raichev <araichev@mrcagney.com>"]
6
- readme = "README.rst"
7
- license = "MIT"
8
- repository = "https://github.com/mrcagney/gtfs_kit"
9
- documentation = "https://mrcagney.github.io/gtfs_kit_docs"
10
- exclude = ["tests", "docs"]
11
-
12
- [tool.poetry.dependencies]
13
- python = "^3.7 || ^3.8 || ^3.9"
14
- pandas = "<2"
15
- shapely = "<2"
16
- pycountry = "<20"
17
- utm = "<1"
18
- json2html = "<2"
19
- geopandas = "<1"
20
- rtree = "< 1"
21
- folium = "<1"
22
- requests = "<3"
23
-
24
- [tool.poetry.dev-dependencies]
25
- jupyter = "*"
26
- pytest = "<7"
27
- sphinx = "<4"
28
- pre-commit = "*"
29
- black = "=19.3b0"
30
- publish_sphinx_docs = "^1.0"
31
- matplotlib = "*"
32
- pytest-socket = "*"
33
- nbstripout = "^0.4.0"
34
-
35
- [build-system]
36
- requires = ["poetry>=0.12"]
37
- build-backend = "poetry.masonry.api"
38
-
gtfs_kit-5.2.0/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<1',
12
- 'geopandas<1',
13
- 'json2html<2',
14
- 'pandas<2',
15
- 'pycountry<20',
16
- 'requests<3',
17
- 'rtree<1',
18
- 'shapely<2',
19
- 'utm<1']
20
-
21
- setup_kwargs = {
22
- 'name': 'gtfs-kit',
23
- 'version': '5.2.0',
24
- 'description': 'A Python 3.7+ 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.7+ kit 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``pip install gtfs_kit``.\n\n\nExamples\n========\nExamples are in the Jupyter notebook ``notebooks/examples.ipynb``.\n\n\nAuthors\n=========\n- Alex Raichev, 2019-09\n\n\nDocumentation\n=============\nOn Github Pages `here <https://mrcagney.github.io/gtfs_kit_docs>`_.\n\n\nNotes\n=====\n- Development status is Alpha\n- This project uses semantic versioning\n- Thanks to `MRCagney <http://www.mrcagney.com/>`_ for donating to this project\n- Constructive feedback and code contributions welcome. Please issue pull requests 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. I don't think this issue causes any bugs in GTFS Kit, but you and i have been warned. Thanks to 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.7,<4.0',
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