Created
September 8, 2014 10:13
-
-
Save anonymous/14849763b4135283f88c to your computer and use it in GitHub Desktop.
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 9 columns, instead of 10 in line 1.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ID,METRO,METRO.POP,CITY.POP,CITY_AS_PERCENT_OF_METRO,NOTES,YEAR,SOURCE,COMMENTS | |
| 0,Tokyo,36.7,13.2,36.0,Tokyo City,2014,http://www.citypopulation.de/php/indonesia-admin.php?adm1id=31,, | |
| 1,Jakarta,30.0,10.1,33.7,Jakarta Special Capital Region,2011,, | |
| 2,Shanghai,23.8,23,96.6,Shanghai Municipal Province,2010,http://www.citypopulation.de/php/china-admin.php?adm1id=31, | |
| 3,Beijing,20.7,19.6,94.7,Beijing Municipal City,2010,http://www.citypopulation.de/php/china-admin.php?adm2id=1101, | |
| 4,São Paulo,20.3,11,54.7,Municipality of Sao Paulo,2010,http://www.citypopulation.de/Brazil-SaoPaulo.html, | |
| 5,New York,19.1,8.4,44.0,New York City,2013,http://www.citypopulation.de/php/usa-newyorkcity.php, | |
| 6,Mexico City,19.0,8.9,46.8,Mexico City,2014,http://www.citypopulation.de/php/mexico-mexicocity.php, | |
| 7,Mumbai,18.7,12.4,66.3,Greater Mumbai Municipal Corporation,2011,http://www.citypopulation.de/php/india-maharashtra.php?cityid=2742201000, | |
| 8,Osaka,18.6,2.7,14.5,Osaka City,2013,http://www.citypopulation.de/Japan-Osaka.html, | |
| 9,Delhi,17.6,11,62.5,Delhi Municipal Corporation,2011,http://www.citypopulation.de/php/india-delhi.php, | |
| 10,Dhaka,15.9,7,44.0,Dhaka City,2011,http://www.citypopulation.de/Bangladesh-Mun.html, | |
| 11,London,14.3,8.4,58.7,Greater London,,, | |
| 12,Karachi,14.3,9.3,65.0,Karachi City District,2011,, | |
| 13,Kolkata,14.2,4.5,31.7,Kolkatta City District,2011,http://www.citypopulation.de/php/india-admin.php?adm2id=D1916, | |
| 14,Tianjin,14.1,14.1,100.0,Tianjin Municipal Province,2012,http://www.citypopulation.de/China-Tianjin.html, | |
| 15,Buenos Aires,13.6,2.9,21.3,Autonomous City of Buenos Aires,2010,http://www.censo2010.indec.gov.ar/preliminares/cuadro_totalpais.asp, | |
| 16,Istanbul,14.1,14.1,100.0,Istanbul Metropolitan Region,2013,http://www.turkstat.gov.tr/UstMenu.do?metod=temelist, | |
| 17,Los Angeles-Long Beach-Anaheim,13.0,3.9,30.0,City of Los Angeles,2013,http://en.wikipedia.org/wiki/Los_Angeles, | |
| 18,Guangzhou,12.9,12.7,98.4,Guangzhou,2011,http://www.citypopulation.de/China-Guangdong.html, | |
| 19,Cairo,16.9,8.9,52.7,Cairo,2013,http://esa.un.org/unpd/wup/CD-ROM/Default.aspx,Metro Pop as of 2006 (compare to 12 million according to OE) | |
| 20,Paris - Metro,12.4,2.3,18.5,City of Paris,2011,http://www.citypopulation.de/php/france-cityofparis.php, | |
| 21,Rio De Janeiro,12.1,6.4,52.9,Municipality of Rio de Janeiro,2013,http://www.citypopulation.de/php/brazil-riodejaneiro.php?cityid=3304557, | |
| 22,Bangkok,11.9,6.4,53.8,Krung Thep Metropolitan Region,2010,http://www.citypopulation.de/Thailand-Cities.html, | |
| 23,Manila,11.9,1.7,14.3,Manila City,2010,http://www.citypopulation.de/php/philippines-admin.php?adm2id=133900, | |
| 24,Moscow - Metro,11.7,11.7,100.0,Moscow,2010,http://www.citypopulation.de/php/russia-moskvacityadm.php, | |
| 25,Lagos,11.6,11.6,100.0,,,, | |
| 26,Bogota,7.8,7.6,97.4,,,, | |
| 27,Berlin,4.3,3.4,79.1,,,, | |
| 28,Johannesburg,8.1,4.4,54.3,Johannesburg Metropolitan Municipality,2011,, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <style> | |
| body { | |
| font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; | |
| width: 960px; | |
| height: 500px; | |
| position: relative; | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <div class="cities"></div> | |
| <script src="http://d3js.org/d3.v3.min.js"></script> | |
| <script> | |
| var width = 960, | |
| height = 500, | |
| chart_selector = '.cities'; | |
| d3.csv('cities.csv', function(data) { | |
| var | |
| cities = d3.select(chart_selector); | |
| cities.selectAll("div") | |
| .data(data) | |
| .enter() | |
| .append('div') | |
| .attr('id', function(d) { return 'city' + d.ID); | |
| }); | |
| </script> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment