Skip to main content

A toolbox for manipulating and analysing air traffic data

Project description

A toolbox for processing and analysing air traffic data

Documentation Status Build Status Code Coverage Codacy Badge Checked with mypy Code style: black License
JOSS badge

The traffic library helps working with common sources of air traffic data.

Its main purpose is to offer basic cumbersome data analysis methods commonly applied to trajectories and ATC sectors. When a specific function is not provided, the access to the underlying structure is direct, through an attribute pointing to a pandas dataframe.

The library also offers facilities to parse and/or access traffic data from open sources of ADS-B traffic like the OpenSky Network or Eurocontrol DDR files. It is designed to be easily extendable to other sources of data.

Static visualisation (images) exports are accessible via Matplotlib/Cartopy. More dynamic visualisation frameworks are easily accessible in Jupyter environments with ipyleaflet and altair; or through exports to other formats, including CesiumJS or Google Earth.

Installation

Latest release:

pip install --upgrade traffic

Development version:

pip install git+https://github.com/xoolive/traffic

Warning: cartotools and shapely have strong dependencies to dynamic libraries which may not be available on your system by default.

Before reporting an issue, please try to use an Anaconda environment. Other installations (You may check them in the .travis.yml configuration file.) should work but the Anaconda way proved to work smoothly.

conda install cartopy shapely

For troubleshootings, refer to the appropriate documentation section.

Credits

JOSS badge

If you find this project useful for your research and use it in an academic work, you may cite it as:

@article{olive2019traffic,
    author={Xavier {Olive}},
    journal={Journal of Open Source Software},
    title={traffic, a toolbox for processing and analysing air traffic data},
    year={2019},
    volume={4},
    pages={1518},
    doi={10.21105/joss.01518},
    issn={2475-9066},
}

Additionally, you may consider adding a star to the repository. This token of appreciation is often interpreted as a positive feedback and improves the visibility of the library.

Documentation

Documentation Status

Documentation available at https://traffic-viz.github.io/

Tests and code quality

Build Status Code Coverage Codacy Badge Checked with mypy

Unit and non-regression tests are written in the tests/ directory. You may run pytest or tox from the root directory. Tests are currently performed with Python 3.6 and 3.7.

Tests are checked on travis continuous integration platform upon each commit. Latest status and coverage are displayed with standard badges hereabove.

In addition, code is checked against static typing with mypy (pre-commit hooks are available in the repository) and extra quality checks performed by Codacy.

Command line tool

The traffic tool scripts around the library for common usecases.

The most basic use case revolves around exploring the embedded data. You may check the help with traffic data -h.

traffic data -p Tokyo
     altitude country iata  icao   latitude   longitude                                name
3820       21   Japan  HND  RJTT  35.552250  139.779602  Tokyo Haneda International Airport
3821      135   Japan  NRT  RJAA  35.764721  140.386307  Tokyo Narita International Airport

More details in the documentation.

Graphical user interface

A Qt application is provided for exploring and recording data.
More details in the GUI section of the documentation.

GUI screenshot

Feedback and contribution

Any input, feedback, bug report or contribution is welcome.

Should you encounter any issue, you may want to file it in the issue section of this repository. Please first activate the DEBUG messages recorded using Python logging mechanism with the following snippet:

from traffic.core import loglevel
loglevel('DEBUG')

Bug fixes and improvements in the library are also helpful.

If you share a fix together with the issue, I can include it in the code for you. But since you did the job, pull requests (PR) let you keep the authorship on your additions. For details on creating a PR see GitHub documentation Creating a pull request. You can add more details about your example in the PR such as motivation for the example or why you thought it would be a good addition. You will get feed back in the PR discussion if anything needs to be changed. To make changes continue to push commits made in your local example branch to origin and they will be automatically shown in the PR.

You may find the process troublesome but please keep in mind it is actually easier that way to keep track of corrections and to remember why things are the way they are.

Frequently asked questions

  • I want to know more about Eurocontrol NM files

We download these files from Eurocontrol Network Manager Demand Data Repository (DDR) under Dataset Files > Airspace Environment Datasets. Access conditions are managed by EUROCONTROL.

Should you have no such access, basic FIRs are provided in eurofirs from traffic.data.

  • I want to know more about Eurocontrol AIXM files

When you import aixm_airspaces from traffic.data, you need to set a path to a directory containing AIRAC files. These are XML files following the AIXM standard and produced by Eurocontrol. We download these files from Eurocontrol Network Manager B2B web services. You have to own a B2B certificate granted by EUROCONTROL to get access to this data.

  • What does AIRAC mean?

Aeronautical Information Publications are updated every 28 days according to fixed calendar. This cycle is known as AIRAC (Aeronautical Information Regulation And Control) cycle.

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

traffic-2.5.tar.gz (29.5 MB view details)

Uploaded Source

Built Distribution

traffic-2.5-py3-none-any.whl (29.5 MB view details)

Uploaded Python 3

File details

Details for the file traffic-2.5.tar.gz.

File metadata

  • Download URL: traffic-2.5.tar.gz
  • Upload date:
  • Size: 29.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

File hashes

Hashes for traffic-2.5.tar.gz
Algorithm Hash digest
SHA256 d7caf30df9ce51f95c40e7d0bd83e191fa9f6b8075e2cede2a92000e2810330d
MD5 4eff66a4911b7d597dd39afa17fe6d60
BLAKE2b-256 1da459a86b3b6a52a0c0f5736832d42451e777847ae1069c9b18201ebbc8f208

See more details on using hashes here.

File details

Details for the file traffic-2.5-py3-none-any.whl.

File metadata

  • Download URL: traffic-2.5-py3-none-any.whl
  • Upload date:
  • Size: 29.5 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

File hashes

Hashes for traffic-2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 611e0b97b9cf3aa11cc918e61cffc1b331bb617a837f964695d2082e722fce34
MD5 57bafd99f804160e18ddb17a5a0e0999
BLAKE2b-256 899cf9c93f5f85bf5e4a41db0a319ceb29b8e964e1feb027e5afb92fa45ae4ba

See more details on using hashes here.

Supported by

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