Skip to content

tzmaps branch is missing a couple of new popular airports #167

@ysangkok

Description

@ysangkok

By using the following sparql query on http://query.wikidata.org/

SELECT DISTINCT ?item ?itemLabel ?iata
WHERE
{
  ?item wdt:P3872 ?patronage.
  ?item wdt:P238 ?iata.
  FILTER (?patronage > 500000).
  FILTER NOT EXISTS {?item wdt:P576 ?demolishedDate}.
  FILTER NOT EXISTS {?item wdt:P1366 ?replacedBy}.
  FILTER NOT EXISTS {?item wdt:P31 wd:Q15893266}. # filter out instances of 'former entity'
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}

and saving to CSV as wikidata.csv, and then running this script, I find a couple of airports that aren't in here:

import csv

m={}
with open("iata.tzmap") as f:
    reader = csv.reader(f, delimiter='\t')
    for row in reader:
      assert row[0]
      assert row[1]
      m[row[0]] = row[1]

with open('wikidata.csv') as f:
    reader = csv.DictReader(f)
    for row in reader:
      iata = row['iata']
      airport_name = row['itemLabel']
      if iata not in m:
          print(f'{airport_name=} with {iata=} is missing in iata.tzmap')

emits

airport_name='Gagarin International Airport' with iata='GSV' is missing in iata.tzmap
airport_name='Nursultan Nazarbayev International Airport' with iata='NQZ' is missing in iata.tzmap
airport_name='Dazhou Jinya Airport' with iata='DZH' is missing in iata.tzmap
airport_name='Rize–Artvin Airport' with iata='RZV' is missing in iata.tzmap
airport_name='Bicol International Airport' with iata='DRP' is missing in iata.tzmap
airport_name='Chengdu Tianfu International Airport' with iata='TFU' is missing in iata.tzmap

Gagarin opened in 2019. Bicol and Chengdu in 2021. Dazhou Jinya Airport opened in 2022. Rize-Artvin also in 2022. Them being recent might explain why they are missing.

Wikipedia notes that Nursultan changed it's IATA code:

On 8 June 2020 the airport officially changed its three-character IATA airport code from TSE to NQZ.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions