Skip to main content

Python package to quickly and easily get public transport access node data from the UK's NaPTAN API.

Project description

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)

coalville-example

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:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

naptan-0.2.1.tar.gz (701.1 kB view hashes)

Uploaded Source

Built Distribution

naptan-0.2.1-py3-none-any.whl (8.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page