News for hackers. Stuff that matters.
Re:OpenFlights – airport and airline data by phsource on Tuesday April 27, 2021 @11:46AM (#26957531)
It's ridiculous that the only original source of this data, the IATA [0], charges $700+ for this list, so kudos to OpenFlights.

I can't stress just how important (and how hard) it is to get a great source of data for airports -- I've now built 3 travel-related projects (the latest, Wanderlog [https://wanderlog.com], keeps people's flight reservations, so uses it for an autocomplete), and it's been a key building block for all of them.

The main datasets we use are:

- OpenFlights [1]: mentioned in this post, but this dataset was great since it had timezone too.

- OurAirports [2]: no timezone here, but the "type" and "scheduled_service" columns in this dataset are essential. "Type" lets you distinguish between small/medium/large airports, and "scheduled_service" lets you easily filter out airports without real flights (which you often might not care about).

- Random other GitHub Gist [3]: I have no idea where this data comes from, but it was surprisingly complete and has a few golden nuggets like "num_flights" and "runway_length" in addition to "timezone". The presence of a "woeid" suggests Yahoo-related origins, but it's hard to be sure.

- We now supplement this with airports from autocomplete APIs like Skyscanner's, because they're still the most up-to-date.

Long story short, it'd be AWESOME to have one complete, updated database with all this data in one place. This kind of data really should be public and a public service, but until then it's unfortunately up to the community.

[0] https://www.iata.org/en/publications/store/airline-coding-di...

[1] https://github.com/jpatokal/openflights/

[2] http://ourairports.com/data/

[3] https://gist.github.com/tdreyno/4278655

Re:OpenFlights – airport and airline data by squeaky-clean on Tuesday April 27, 2021 @12:17PM (#26957985)
I've done something similar for my current job. I've used all these same data sources, even got access to the IATA stuff eventually. I also used GeoNames a lot, it's not specific to airports but it has decent airport data and I need a lot of the surrounding features as well.

Every source was definitely useful, but I think ultimately crawling Wikipedia was the most useful and highest quality set of data for me (after some significant data cleaning). The List of Airports By IATA Code [0] is almost as comprehensive as the official list from IATA, and you can follow the links to crawl info about the airport and city served. Getting info about what city the airport is considered to "serve" is so useful, as most airports are technically not in the city people consider them to be the major airports of, and some "serve" multiple cities.

Of course the difficult part there is that Wikipedia data isn't really clean or standardized. The page HTML isn't standard, even things that look very standardized like the sidebar will have 30 variations when you crawl all the airport pages. There is WikiData, but I found it still wasn't simple to get the data from there, and it also didn't include most of the page content which I wanted. [1]

Nowadays we have direct relationships with the airlines/GDS/so on, and also a department of people to add and manage the data ourselves, because even the direct source gives you pretty poor quality data. The project was way more fun when I was wrangling data from a dozen places around the web :) Now it's more of an enterprise CRUD webapp with some fancy localization and GIS tooling.

[0] https://en.wikipedia.org/wiki/List_of_airports_by_IATA_airpo...

[1] This was a while ago, so maybe WikiData has changed

Re:OpenFlights – airport and airline data by ctippett on Tuesday April 27, 2021 @01:14PM (#26958751)
FlightStats / Cirium have an API for airport data[0] that I’ve found to be mostly complete (sans a few rural Australian airports). It includes historical records for airports that are no longer active, such as Hong Kong’s Kai Tak airport that previously went by the HKG IATA code.

FlightAware have a similar API[1].

These aren’t free or open mind you, but are at least readily accessible for those that need/want it.

[0] https://developer.flightstats.com/api-docs/airports/v1

[1] https://uk.flightaware.com/commercial/aeroapi/

Re:OpenFlights – airport and airline data by nonameiguess on Tuesday April 27, 2021 @02:28PM (#26959609)
Are you just looking for airports, routes, and schedules? FlightAware provides that: https://flightaware.com/

Not sure what you get with the commercial services, but even the free services are pretty good. It's what we used in 1st CAV to track the redeployment of the last units to leave Iraq in 2011.

Re:OpenFlights – airport and airline data by sokoloff on Tuesday April 27, 2021 @12:38PM (#26958284)
If it’s important and hard to get this data, is it really ridiculous that a provider of the data charges $700 for it?
Re:OpenFlights – airport and airline data by squeaky-clean on Tuesday April 27, 2021 @02:18PM (#26959483)
It's only hard to get because IATA doesn't easily provide it. IATA isn't "a" provider of the data, they are the data. It would be like if you had to purchase a list of the bus stops and schedule in your city from your transportation department.
Re:OpenFlights – airport and airline data by sokoloff on Tuesday April 27, 2021 @02:36PM (#26959724)
Many (most?) standards bodies charge for their standards documents and data feeds. There are obviously costs associated with running IATA; I don't see why they should be obliged to provide their data for free, especially when the typical user of such data is likely to build a for-profit business on top of it.

I don't think IATA actually assigns the codes, but rather aggregates them. In the US, the FAA assigns the airport identifiers: https://www.faa.gov/nextgen/cip/airport_facility/

Re:OpenFlights – airport and airline data by realityking on Tuesday April 27, 2021 @02:56PM (#26959965)
I think the FAA will only assign the four letter ICAO code. The 3 letter IATA code is assigned by them directly: https://www.iata.org/contentassets/1277d04d575843dc80a3f613d...
Re:OpenFlights – airport and airline data by realityking on Wednesday April 28, 2021 @03:07AM (#26966592)
That’s a good point. The US has a somewhat unique system there. I’ve been googling this and I can find any definitive reference. All I can turn up is that the application for an IATA code is supposed to be made by an an airline or CSR, not the airport itself. What I can’t find is an explanation for the “coincidence” of the K prefix.
Re:OpenFlights – airport and airline data by sokoloff on Tuesday April 27, 2021 @06:54PM (#26963007)
If you tell me the FAA code for a US airport, I can tell you the IATA code without a database lookup and without checking with IATA.
Re:OpenFlights – airport and airline data by dmitrygr on Tuesday April 27, 2021 @07:57PM (#26963690)
C83

Good luck

Re:OpenFlights – airport and airline data by sokoloff on Wednesday April 28, 2021 @03:52AM (#26966843)
I’d have returned that it has no IATA code assigned, which appears to be correct from spot-checking it on several online sites.

I’m guessing you know that’s not correct or you’d have not asked, so what is it?

Re:OpenFlights – airport and airline data by vkou on Tuesday April 27, 2021 @02:37PM (#26959735)
I have to pay the bus company to ride the bus, it doesn't seem insane that the bus company may want to charge me money if I asked them for a full, comprehensive, organized list of stops and schedules.

Sure, there are reasons for why they would want to make it available for free, but there are also reasons for why they would want to charge me, and they aren't unreasonable. I don't have any fundamental, natural right to a transportation network curating and providing their data for my consumption. It might not care enough about my needs to spend money do so. It might not care enough about my needs to spend money to do so for free.

Re:OpenFlights – airport and airline data by Pasorrijer on Tuesday April 27, 2021 @09:08PM (#26964169)
Oh they charge way more than $700. For a recent project, for four months of flights in North America cost roughly $5000.
Re:OpenFlights – airport and airline data by chillydawg on Tuesday April 27, 2021 @12:13PM (#26957927)
openstreetmap might happen to have a list of airports with decent metadata, but it'll have zero info about actual flights.
Re:OpenFlights – airport and airline data by angott on Tuesday April 27, 2021 @01:04PM (#26958623)
Yep. It is quite good for some data that volunteers can provide from open data. Things like runway numbers, surface material and length.