make map in async listmap async
This commit is contained in:
parent
14174136d8
commit
93408b0b4d
4 changed files with 167 additions and 135 deletions
|
|
@ -1127,6 +1127,18 @@ import wikipedia
|
|||
|
||||
if __name__ == '__main__':
|
||||
|
||||
file = '../txt/geonames.org/cities1000.txt'
|
||||
geo['keys'] = read_json('../json/oxjs.org/geonames.keys.json')
|
||||
keys = geo['keys']['place']['geonames.org']
|
||||
drop = ['alternatenames']
|
||||
# filter = lambda x: x['feature_code'] != 'PPLX' and x['population'] >= 100000
|
||||
filter = lambda x: x['feature_code'] == 'PPLC' or x['population'] >= 10000
|
||||
sort = lambda x: -x['population']
|
||||
data = read_table(file, keys, drop=drop, filter=filter, sort=sort)
|
||||
write_json('../json/geonames.org/cities10000.json', data, False)
|
||||
print len(data)
|
||||
sys.exit()
|
||||
|
||||
write_json('../json/geo.json', geo)
|
||||
|
||||
countries = get_countries()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue