Skip to content

Commit

Permalink
Version 20211228
Browse files Browse the repository at this point in the history
  • Loading branch information
mborsetti committed Dec 28, 2021
1 parent f26695d commit 733be51
Show file tree
Hide file tree
Showing 7 changed files with 116 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ default_language_version:
# A list of repository mappings.
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
rev: v4.1.0
hooks:
# see https://github.com/pre-commit/pre-commit-hooks
# - id: check-added-large-files
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ on the UTC date of the release.

`Contributions <https://github.com/mborsetti/airportdata/blob/master/CHANGELOG.rst>`__ always welcomed!

Version 20211228
================
* Added KO69 Petaluma Municipal Airport (contributed upstream by `Michel Vidal-Naquet <https://github.com/micvn>`__ in
`#55 <https://github.com/mwgg/Airports/pull/55>`__)

Version 20211030.1
==================
* Added VEKI/KBK Kushinagar Airport, Kushinagar, Uttar Pradesh, India (started operations on 20 October 2021)
Expand Down
105 changes: 105 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
============
airportsdata
============

.. |ICAO| replace:: 28,869

.. |IATA| replace:: 6,564

.. |version| image:: https://img.shields.io/pypi/v/airportsdata.svg
:target: https://pypi.org/project/airportsdata/
:alt: pypi version

.. |support| image:: https://img.shields.io/pypi/pyversions/airportsdata.svg
:target: https://pypi.org/project/airportsdata/
:alt: supported Python version

.. |license| image:: https://img.shields.io/pypi/l/airportsdata.svg
:target: https://pypi.org/project/airportsdata/
:alt: license

.. |issues| image:: https://img.shields.io/github/issues-raw/mborsetti/airportsdata
:target: https://github.com/mborsetti/airportsdata/issues
:alt: issues

.. |CI| image:: https://github.com/mborsetti/airportsdata/workflows/Tests/badge.svg?branch=main
:target: https://github.com/mborsetti/airportsdata/actions
:alt: CI testing status

.. |coveralls| image:: https://coveralls.io/repos/github/mborsetti/airportsdata/badge.svg?branch=main
:target: https://coveralls.io/github/mborsetti/airportsdata?branch=main
:alt: code coverage by Coveralls


Extensive database of location and timezone data for nearly every airport and landing strip in the world, with |ICAO|
entries.

Each entry consists of the following data:

* ``icao``: ICAO (or FAA/TD LID prefaced by "K") 4-alphanumeric code
* ``iata``: IATA 3-letter code (for |IATA| entries) or an empty string
* ``name``: Official name (latin script)
* ``city``: City
* ``subd``: Subdivision (e.g. state, province, region, etc.)
* ``country``: `ISO 3166-1 <https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes>`__ alpha-2 country code
(plus ``XK`` for Kosovo)
* ``elevation``: MSL elevation (the highest point of the landing area) in feet
* ``lat``: Latitude (decimal)
* ``lon``: Longitude (decimal)
* ``tz``: Timezone expressed as a `tz database name <https://en.wikipedia.org/wiki/List_of_tz_database_time_zones>`__
(IANA-compliant)

Best efforts are placed to review all contributions for accuracy, but accuracy cannot be guaranteed nor should be
expected by users.

Known issues:

* 219 aerodromes have IATA codes that are not in the `IATA database;
<https://www.iata.org/en/publications/directories/code-search/>`__ and may be incorrect;
* A small, but unknown, number of aerodromes are missing their IATA code (none are major ones);
* Timezone was originally sourced from `TimeZoneDB <https://timezonedb.com>`__ and is missing for Antarctica;
* No historical data.

Please report any issues you may find `here
<https://github.com/mborsetti/airportsdata/blob/main/CONTRIBUTING.rst>`__.

This project is a fork of https://github.com/mwgg/Airports. All IATA codes submitted in this fork have been
validated against `IATA <https://www.iata.org/en/publications/directories/code-search/>`__.

Raw data
========

A CSV (comma separated values) file with headers (UTF-8 encoding) is downloadable from GitHub `here
<https://github.com/mborsetti/airportsdata/raw/main/airportsdata/airports.csv>`__.

Python
======
|version| |support| |CI| |coveralls| |issues|

Install from `PyPi <https://pypi.org/project/airportsdata/>`__ using pip:

.. code-block:: bash
pip install -U airportsdata
Once installed, to load the data into a dict:

.. code-block:: python
import airportsdata
airports = airportsdata.load() # key is ICAO code, the default
or

.. code-block:: python
import airportsdata
airports = airportsdata.load('IATA') # key is IATA code
License
=======

|license|

Released under the `MIT License <https://opensource.org/licenses/MIT>`__ (see license `here
<https://github.com/mborsetti/airportsdata/blob/main/LICENSE>`__).
3 changes: 2 additions & 1 deletion RELEASE.rst
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
* Added VEKI/KBK Kushinagar Airport, Kushinagar, Uttar Pradesh, India (started operations on 20 October 2021)
* Added KO69 Petaluma Municipal Airport (contributed upstream by `Michel Vidal-Naquet <https://github.com/micvn>`__ in
`#55 <https://github.com/mwgg/Airports/pull/55>`__)
2 changes: 1 addition & 1 deletion airportsdata/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

__project_name__ = __package__
# Release numbering follows the release data
__version__ = '20211030.1'
__version__ = '20211228'
__min_python_version__ = (3, 6)
__author__ = 'Mike Borsetti <mike@borsetti.com>'
__copyright__ = 'Copyright 2020- Mike Borsetti'
Expand Down
1 change: 1 addition & 0 deletions airportsdata/airports.csv
Original file line number Diff line number Diff line change
Expand Up @@ -14028,6 +14028,7 @@
"KO59","","Cedarville Airport","Cedarville","California","US",4623,41.5527000427,-120.1660003662,"America/Los_Angeles"
"KO61","","Cameron Airpark","Cameron Park","California","US",1286,38.6839981079,-120.9879989624,"America/Los_Angeles"
"KO65","","Christman Airfield","Okeene","Oklahoma","US",1205,36.1124992371,-98.3087005615,"America/Chicago"
"KO69","","Petaluma Municipal Airport","Petaluma","California","US",90,38.2578333333,-122.6053333333,"America/Los_Angeles"
"KO79","","Sierraville Dearwater Airport","Sierraville","California","US",4984,39.5810012817,-120.3539962769,"America/Los_Angeles"
"KO81","","Tulelake Municipal Airport","Tulelake","California","US",4044,41.8874015808,-121.3590011597,"America/Los_Angeles"
"KO86","","Trinity Center Airport","Trinity Center","California","US",2390,40.9832000732,-122.6940002441,"America/Los_Angeles"
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ commands = pytest tests/ -v

[testenv:pre-commit]
# Settings defined in the top-level testenv section are automatically inherited if not overwritten
# We run pre-commit in Python 3.8 to satisfy https://docs.readthedocs.io/en/stable/config-file/v2.html?#build-image
# We run pre-commit in Python 3.8 to be same as the one in https://github.com/readthedocs/readthedocs-docker-images
basepython = python3.8
deps =
pre-commit
Expand Down

0 comments on commit 733be51

Please sign in to comment.