Automated Weekly Updates
The data is automatically updated every Monday at 6am UTC via GitHub Actions. The workflow:Apply Corrections
Runs
normalize.js to apply local corrections for country names and data quality fixesThe automated workflow runs on the schedule defined in
.github/workflows/update-data.yml and can also be triggered manually via the GitHub Actions interface.Manual Updates
You can update the airline data manually at any time by running the data pipeline locally:Download Latest Data
Fetch the current airlines.dat file from OpenFlights:This downloads the latest airline data in CSV format.
Apply Corrections
Run the normalization script to apply local corrections:This script reads
airlines.dat, applies corrections from COUNTRY_CORRECTIONS and ID_CORRECTIONS, and writes the corrected data back to airlines.dat.After running these commands, you’ll have updated
airlines.dat and airlines.json files ready to commit.Data Pipeline Overview
The update process follows this pipeline:What Gets Updated
When you update the data, the following files are modified:| File | Description | Format |
|---|---|---|
airlines.dat | Raw airline data with corrections applied | CSV |
airlines.json | Structured airline data for the npm package | JSON |
Triggering GitHub Actions Workflow
If you have write access to the repository, you can manually trigger the update workflow:- Go to the Actions tab in the GitHub repository
- Select Update Airline Data from the workflow list
- Click Run workflow
- Choose the branch (usually
master) and click Run workflow
Verifying Updates
After updating, you can verify the changes:Data Freshness
The OpenFlights database is community-maintained and updated regularly. The weekly sync ensures that:- New airlines are added within days of being submitted upstream
- Defunct airlines are marked inactive
- Airline information changes (rebrands, mergers) are reflected
- IATA/ICAO code assignments stay current
The package version is automatically bumped on each data update, so you can track data freshness via the version number in
package.json.