Skip to content

Scripts to download and parse geonames.org data

Notifications You must be signed in to change notification settings

nojacko/geonames-data

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

geonames-data

Scripts to download geonames.org data and convert to other formats.

Good To Know

The data from geonames.org is not committed to this repo.

This project gives you scripts to download and convert the original data into formats more friendly to JavaScript/TypeScript projects.

You should copy only the generated files you need into your projects and update on your own schedule.

Supported Geonames Data Dumps

See: https://download.geonames.org/export/dump/

The following files are downloaded and converted.

  • countryInfo.txt
  • timeZones.txt
  • admin1CodesASCII.txt
  • admin2Codes.txt
  • Continent codes are also generated.

Usage

npm install
npm run download

Generate Formats

JSON (Required to generate other formats)

Generate .json files in data/json.

npm run generate-json

TypeScript

Generate .ts files with interfaces in data/typescript.

npm run generate-ts

ECMAScript / ESM

Generate .mjs files with JSDoc comments in data/esm.

npm run generate-esm

CommonJS

Generate .js files with JSDoc comments in data/cjs.

npm run generate-cjs

...everything

Generate all file formats.

npm run generate-all

Support

Buy Me A Coffee

Other Projects

✈️ Travel Focused An app to access weather forecasts, convert currencies, save favorite locations, and enjoy essential travel information offline. Download on the App Store and Google Play.

🏎️ Race Calendar All upcoming races, sprints, qualifying and practice sessions for Formula 1 Calendar, Formula 2 Calendar, Formula 3 Calendar, Formula E Calendar and F1 Academy Calendar.

⚡️ Agile Octopus Price Tracker Quickly see the live, upcoming and average electricity prices for Octopus Energy's Agile Octopus tariff.

🔥 datafury.io The landing page for my projects.

🌐 node-country-to-iso Convert country names to ISO codes.

🌐 Geo Data Searchable GeoNames data.

About

Scripts to download and parse geonames.org data

Resources

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

 
 
 

Contributors