Skip to content

Create metropolitan-area.json (#1)#148

Open
kempy007 wants to merge 1 commit into
mwgg:masterfrom
kempy007:main
Open

Create metropolitan-area.json (#1)#148
kempy007 wants to merge 1 commit into
mwgg:masterfrom
kempy007:main

Conversation

@kempy007

Copy link
Copy Markdown
  • Create metropolitan-area.json

Data compiled from https://wikitravel.org/en/Metropolitan_Area_Airport_Codes

* Create metropolitan-area.json
@alexander-san

Copy link
Copy Markdown
Collaborator

Hi @kempy007, appreciate the idea and initiative for this contribution.
Do you have a second source for the Metropolitan Area Airport Codes.
And how do you want to handle ambiguous Met Area Codes such as NYC which sometimes includes HPN, however, for most search engine purposes is excluded...

@Jmion

Jmion commented May 2, 2026

Copy link
Copy Markdown

Thanks for the contribution. Adding metropolitan area grouping file is a genuinely useful addition to this dataset.

That said, I think the current schema has some issues worth addressing before merging, and I'd like to propose an alternative structure.

Problems with the current schema:

  • The 4-letter keys (NEWY, LOND, etc.) are non-standard — no official aviation body uses them. IATA already defines metro codes (NYC, LON, etc.) for exactly this purpose.
  • name is repurposed to store a dash-separated airport list (e.g. "JFK-EWR-LGA-HPN"). This is hard to parse and semantically misleading.
  • icao and elevation are always empty/zero — they don't apply to metro areas and add noise.
    state is inconsistently populated: US entries use "United States of America", some European entries use "", others use a region name.
  • All lat/lon values are 0.0 — which is an actual coordinate (Gulf of Guinea). Downtown city coordinates would be more useful and accurate.
    A few data errors: America/Houston is not a valid IANA timezone (should be America/Chicago); Stockholm's entry includes Gothenburg (GOT), which is a separate city ~470 km away.

Proposed schema:

{
  "NYC": {
    "name": "New York City",
    "country": "US",
    "lat": 40.7128,
    "lon": -74.0060,
    "tz": "America/New_York",
    "airports": ["JFK", "EWR", "LGA", "HPN"]
  },
  "LON": {
    "name": "London",
    "country": "GB",
    "lat": 51.5074,
    "lon": -0.1278,
    "tz": "Europe/London",
    "airports": ["LHR", "LGW", "STN", "LTN", "LCY", "SEN", "BQH"]
  },
  "TYO": {
    "name": "Tokyo",
    "country": "JP",
    "lat": 35.6762,
    "lon": 139.6503,
    "tz": "Asia/Tokyo",
    "airports": ["NRT", "HND"]
  }
}

This uses the IATA metro code as the key, makes airports a proper array for easy lookups against airports.json, and drops fields that don't apply at the metro level.

I'm personally not convinced on including lat and lon.

@kempy007

Copy link
Copy Markdown
Author

Please refactor as you see fit @Jmion @alexander-san , Many Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants