https://googledrive.com/host/0B2GQktu-wcTicEI5VUZaYnM1emM/
https://googledrive.com/host/0B_n1OLMaOursX2hsRUhZNElwZmc/
https://googledrive.com/host/0B4G_4-zdiD1gU2NoX285dmxpTXM/
I have also wrapped this in a self-contained "Chrome Packaged App" that can run in Google's Chrome browser. You can get the app on the chrome app store here.
I was able to round up world city names and locations, so that this could be included as well. Specifically, I came across Josh Smith's worldwide-city-database on github, which itself is based on the Maxmind WorldCities Database. This is a tab-delimited ~130MB file of a more than two million world cities/places, their population, and latitude/longitude. Since I already had US cities and their location, I parsed out just the non-us cities with a population of at least 10,000 via a sequence of awk commands (included for my future reference):
awk -F $'\t' '{if ($3!="us") {print $0}}' cities.sql > non_us_cities.tab
awk -F $'\t' '{if ($2>10000) {print $0}}' non_us_cities.tab > non_us_cities_with_population_10000.tab
This resulted in a file of about 1MB containing information on about 21,000 cities. I then needed to convert it from ISO-8859-1 to UTF-8 via this commandiconv -f ISO-8859-1 -t UTF-8 non_us_cities_with_population_10000.tab > non_us_cities_with_population_10000_utf8.tab
which resulted in the data file used in the visualization (I only realized I needed to do this conversion after some of the characters were not rendering correctly).Here's an example record from the data file (with the header row included)
combined | population | country_code | region | latitude | longitude |
Andorra la Vella, Andorra | 20430 | ad | 07 | 42.5 | 1.5166667 |
A recent screenshot is below. Clicking on one of the cities in the lists will perform a google search on that city in a new window. I still need to deal with the challenge of displaying the events on the map as they occur in a way that makes it easier to discern the specific places.
Note: The simulation described here includes data created by MaxMind, available from http://www.maxmind.com/.
No comments:
Post a Comment