Skip to content

Instantly share code, notes, and snippets.

@jamesholcomb
Last active January 24, 2020 17:18
Show Gist options
  • Save jamesholcomb/f07129acc927a664a3d88586ef59ad61 to your computer and use it in GitHub Desktop.
Save jamesholcomb/f07129acc927a664a3d88586ef59ad61 to your computer and use it in GitHub Desktop.
mongoimport geonames US zip codes
# https://download.geonames.org/export/zip/US.zip
mongoimport -d mydb -c zipcodes \
--columnsHaveTypes --type tsv --file US.txt \
--stopOnError --drop \
--fields="countryCode.string(),postalCode.string(),placeName.string(),adminName1.string(),adminCode1.string(),adminName2.string(),adminCode2.string(),adminName3.string(),adminCode3.string(),latitude.double(),longitude.double(),accuracy.string()"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment