yaph / geonamescache

geonamescache - a Python library for quick access to a subset of GeoNames data.
https://pypi.org/project/geonamescache/
MIT License
99 stars 38 forks source link

Various fields should be an int or float #8

Closed mlissner closed 9 years ago

mlissner commented 9 years ago

In the cities database a bunch of fields are provided as strings. Can we convert these to an int?

For example:

{u'countrycode': u'US',
 u'geonameid': u'5385955',
 u'latitude': u'34.1064',
 u'longitude': u'-117.59311',
 u'name': u'Rancho Cucamonga',
 u'population': u'165269',
 u'timezone': u'America/Los_Angeles'},

Of these, geonameid and population could be ints, while lat/long could be floats.

yaph commented 9 years ago

Yes, I see no problem with that, this should be done in geonamescache/scripts/cities.py when the data is fetched. Do you want to submit a pull request?