DataHerb
Flora Add Data Articles
Ecosystem
Python Package
Community
Telegram
About

DataHerb:

Geonames Postal Codes and Geocoordinates

• [ #Geo ]

DataHerb Metadata

  • DataHerb ID: geonames_postal_codes_geocoordinates
  • DataHerb Name: Geonames Postal Codes and Geocoordinates
  • Contributors: Datumorphism
  • Description: Postal codes and their geocoordinates parsed from geonames data. The dataset covers the following countries: AD, AR, AS, AT, AU, AX, AZ, BD, BE, BG, BM, BR, BY, CA, CH, CL, CO, CR, CZ, DE, DK, DO, DZ, EE, ES, FI, FM, FO, FR, GB, GF, GG, GL, GP, GT, GU, HR, HU, IE, IM, IN, IS, IT, JE, JP, KR, LI, LK, LT, LU, LV, MC, MD, MH, MK, MP, MQ, MT, MW, MX, MY, NC, NL, NO, NZ, PH, PK, PL, PM, PR, PT, PW, RE, RO, RS, RU, SE, SG, SI, SJ, SK, SM, TH, TR, UA, US, UY, VA, VI, WF, YT, ZA.
  • GitHub Repository: datumorphism/geonames-postal-codes-geocoordinates

DataHerb Leaves: Files in Dataset

  • Metadata
  • Usage
  • File:
  • Format: csv
  • Size: 23M

Fields

  1. country_code: Alpha 2 country code where the postal code is affiliated with
  2. postal_code: postal code in string format
  3. latitude: latitude of the postal code
  4. longitude: longitude of the postal code

Preview

Import Data

Copy the following code and paste into a Google Spreadsheet cell.
=IMPORTDATA("https://raw.githubusercontent.com/datumorphism/geonames-postal-codes-geocoordinates/master/dataset/postal_codes_and_coordinates.csv")
Load data into a Pandas DataFrame:
import pandas as pd
url = "https://raw.githubusercontent.com/datumorphism/geonames-postal-codes-geocoordinates/master/dataset/postal_codes_and_coordinates.csv"
df = pd.read_csv(url)
  • File:
  • Format: json
  • Size: 69M

Fields

  1. country_code: alpha 2 country code the postal code belongs
  2. postal_code: postal code in string format
  3. latitude: latitude of the postal code
  4. longitude: longitude of the postal code

Import Data

Load data into a Pandas DataFrame:
import pandas as pd
url = "https://raw.githubusercontent.com/datumorphism/geonames-postal-codes-geocoordinates/master/dataset/postal_codes_and_coordinates.json"
df = pd.read_json(url)

References:

  • Geonames Zip Download Server
explorer@dataherb: ~
The DataHerb Terminal — Type help.
➜ ~

The DataHerb Index by DataHerb.