naptan: a python package
Get, view, and map NaPTAN data.
The package's functions return the data from the NaPTAN API as a pandas.DataFrame. This allows the data to be easily filtered, queried and manipulated. Once you have the data, you can export the data as a geoJSON, or view it via an interactive map.
"""
Example code to view all the NaPTAN stops within Leicester and
Leicestershire on a map in the browser.
"""
import naptan
# get data as a dataframe
# 260 is Leicestershire and 269 is Leicester
leics_stops = naptan.get_area_stops(['260', '269'])
# View the stops in the browser on an interactive map.
naptan.view_map(leics_stops)
Installation
The latest release can be installed with:
$ pip install naptan
Documentation
All documentation, tutorials, API reference etc can be found at the package's site: https://mullinscr.github.io/naptan/
License
MIT. See LICENSE.txt.
NaPTAN dataset
National public transport access nodes (NaPTAN) is a national dataset of all public transport 'stops' in England, Scotland and Wales. Bus stops form the vast majority of the dataset; but there is data on tram, metro, tube, rail, ferry and air services too.
Included in the dataset, along with the unique identifiers, is common name, locality, stop type, bearing of onward travel, and status (active, inactive or pending).
More information can be found on the UK government's website:
Metadata
Release files for naptan 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| naptan-0.2.1.tar.gz | 701.1 kB | Without provenance | Details for naptan-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| naptan-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for naptan-0.2.1-py3-none-any.whl |
Total release size: 709.1 kB
Release files / naptan-0.2.1.tar.gz
| Download URL | naptan-0.2.1.tar.gz |
|---|---|
| Size | 701.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a11eea2bb1813dde161b5b7ee8fe32389ba36c093a30eb26ed26fa3c59b44385
|
|
BLAKE2b-256 checksum How to use checksums |
2ce7d528669223f9c09ed18e47986a15793c27023dfd02df2b516b748a1c6799
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Release files / naptan-0.2.1-py3-none-any.whl
| Download URL | naptan-0.2.1-py3-none-any.whl |
|---|---|
| Size | 8.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dbad81c2902995a311994dc190f654a40e81cfa510007e80cb86f238f324a0a8
|
|
BLAKE2b-256 checksum How to use checksums |
b97ab75500b8b9f2a6e52f0d16798b708a83d24863a263dd81c60f375b26e407
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Security for naptan 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.