country geonames_id inconsitencies

132 views
Skip to first unread message

Osvaldo Banuelos

unread,
May 31, 2019, 1:43:54 AM5/31/19
to GeoNames
Hello,

Some Geonames IDs for Countries are missing from http://download.geonames.org/export/dump/countryInfo.txt, but they can be found in http://download.geonames.org/export/dump/allCountries.zip.

Can consistency checks be added across these two tables?

Take for example, the United States.

From allCountries.txt:

{
"geonames_id" : 6252001,
"name_local" : "United States",
"name_ascii" : "United States",
"lat" : 39.76,
"lon" : -98.5,
"type" : "A",
"code" : "PCLI",
"country_iso2" : "US",
"country_iso3" : "USA",
"country_iso_numeric" : 840,
"country_fips" : "US",
"country_name" : "United States",
"country_capital_name" : "Washington",
"country_continent_code" : "NA"
}

From countryInfo.txt:
{
"geonames_id" : null
"world_region_name" : "North America",
"updated_at" : "2019-05-26T05:20:25Z",
"iso2" : "US",
"name" : "United States",
"iso3" : "USA",
"iso_numeric" : 840,
"fips" : "US",
"capital_name" : "Washington",
"area" : 9629091,
"population" : 310232863,
"continent_code" : "NA",
"tld" : ".us",
"currency_code" : "USD",
"currency_name" : "Dollar",
"languages" : null,
"neighbors" : null,

}

Marc Wick

unread,
May 31, 2019, 1:50:31 AM5/31/19
to geon...@googlegroups.com, Osvaldo Banuelos
Hi Oswaldo

I think something went wrong with your conversion from csv to json.
The csv file does include the geonameid (and also languages and
neighbours which are both null in your json).

Best Regards

Marc

Osvaldo Banuelos wrote:
> Hello,
>
> Some Geonames IDs for Countries are missing from
> http://download.geonames.org/export/dump/countryInfo.txt, but they can
> be found in http://download.geonames.org/export/dump/allCountries.zip.
>
> Can consistency checks be added across these two tables?
>
> Take for example, the United States.
>
> From allCountries.txt:
>
> {
> *"geonames_id" : 6252001,*
> "name_local" : "United States",
> "name_ascii" : "United States",
> "lat" : 39.76,
> "lon" : -98.5,
> "type" : "A",
> "code" : "PCLI",
> "country_iso2" : "US",
> "country_iso3" : "USA",
> "country_iso_numeric" : 840,
> "country_fips" : "US",
> "country_name" : "United States",
> "country_capital_name" : "Washington",
> "country_continent_code" : "NA"
> }
>
> From countryInfo.txt:
> {
> *"geonames_id" : null*
> "world_region_name" : "North America",
> "updated_at" : "2019-05-26T05:20:25Z",
> "iso2" : "US",
> "name" : "United States",
> "iso3" : "USA",
> "iso_numeric" : 840,
> "fips" : "US",
> "capital_name" : "Washington",
> "area" : 9629091,
> "population" : 310232863,
> "continent_code" : "NA",
> "tld" : ".us",
> "currency_code" : "USD",
> "currency_name" : "Dollar",
> "languages" : null,
> "neighbors" : null,
>
> }
>
> --
> You received this message because you are subscribed to the Google
> Groups "GeoNames" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to geonames+u...@googlegroups.com
> <mailto:geonames+u...@googlegroups.com>.
> To post to this group, send email to geon...@googlegroups.com
> <mailto:geon...@googlegroups.com>.
> Visit this group at https://groups.google.com/group/geonames.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/geonames/567ffb05-5ded-46db-9a65-af06e3242575%40googlegroups.com
> <https://groups.google.com/d/msgid/geonames/567ffb05-5ded-46db-9a65-af06e3242575%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

Osvaldo Banuelos

unread,
May 31, 2019, 4:52:04 PM5/31/19
to GeoNames
Aha! It's my usage of Panda's read_csv() which treats cells starting with '#' as comments. Postal Code Format in countryInfo.txt was throwing things off.

False alarm.

Thanks,
Osvaldo
Reply all
Reply to author
Forward
0 new messages