mwgg / Airports

A JSON database of 28k+ airports with ICAO/IATA codes, names, cities, two-letter country identifiers, elevation, latitude & longitude, and a timezone identifier
MIT License
516 stars 184 forks source link

Added IATA codes for Canadian airports in the Cxxx range missing them #40

Closed mborsetti closed 4 years ago

mborsetti commented 4 years ago

Programmatically tested all ICAO codes starting with "C" (Canada) against an IATA database of 9088 Location Codes obtained from https://www.iata.org/en/publications/directories/code-search and found 16 instances where the cities matched but the database was missing the IATA codes; aadded the IATA code to those instances.

As a result of doing so programmatically, json file has lost trailing zeros after the decimal point, increasing the number of diffs beyond 16 but not affecting precision of data.


database: CYCT city: Coronation             IATA: YCT city: Coronation
database: CYCW city: Chilliwack             IATA: YCW city: Chilliwack
database: CYDL city: Dease Lake             IATA: YDL city: Dease Lake
database: CYHB city: Hudson Bay             IATA: YHB city: Hudson Bay
database: CYJA city: Jasper                 IATA: YJA city: Jasper
database: CYKC city: Collins Bay            IATA: YKC city: Collins Bay
database: CYLB city: Lac La Biche           IATA: YLB city: Lac La Biche
database: CYLQ city: La Tuque               IATA: YLQ city: La Tuque
database: CYMW city: Maniwaki               IATA: YMW city: Maniwaki
database: CYNH city: Hudson's Hope          IATA: YNH city: Hudson's Hope
database: CYPZ city: Burns Lake             IATA: YPZ city: Burns Lake
database: CYRM city: Rocky Mountain House   IATA: YRM city: Rocky Mountain House
database: CYSE city: Squamish               IATA: YSE city: Squamish
database: CYVG city: Vermilion              IATA: YVG city: Vermilion
database: CYYM city: Cowley                 IATA: YYM city: Cowley
database: CZHP city: High Prairie           IATA: ZHP city: High Prairie```
mborsetti commented 4 years ago

This PR has been implemented in fork of this project housed at https://github.com/mborsetti/airportsdata, which is also available for those using Python over pip:

pip install airportsdata

To load the data into a dict:

import airportsdata
airports = airportsdata.load()  # key is ICAO code

or

import airportsdata
airports = airportsdata.load('IATA')  # key is IATA code