Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

I want to create a list of all world cities named "Alexandria", along with their populations. Can a search engine do that? What could the query look like?

share|improve this question
1  
Have you tried geonames.org? –  barrycarter May 15 '13 at 20:26
    
@barrycarter Yes, thanks. Even though it does not show population for all cities, it's still valuable. Thank you. –  Hosam Aly Jun 4 '13 at 21:48
    
You might want to play around with a db I created from the geonames.org data. Sample query: 69d09f284af2d9321d9a6863d0defa2d.geonames.db.barrycarter.info This isn't very detailed, includes cities whose alternate name is Alexandria, and exposes a duplicate in the geonames.org database. –  barrycarter Jun 6 '13 at 4:10

2 Answers 2

up vote 2 down vote accepted

Mathematica could answer this with CityData:

data=CityData["Alexandria"];
Table[{data[[i]],CityData[data[[i]],"Population"]},{i,1,Length[data]}]

Giving the following output:

{
{{Alexandria,Alexandria,Egypt},4230569},
{{Alexandria,Virginia,UnitedStates},139966},
{{Alexandria,Piemonte,Italy},90446},
{{Alexandria,Kirovograd,Ukraine},88916},
{{Alexandria,Teleorman,Romania},51737},
{{Alexandria,Louisiana,UnitedStates},47723},
{{Alexandria,Imathia,Greece},13665},
{{Alexandria,WestDunbartonshire,UnitedKingdom},13480},
{{Alexandria,Minnesota,UnitedStates},11070},
{{Alexandria,RioGrandeDoNorte,Brazil},9769},
{{Alexandria,Kentucky,UnitedStates},8477},
{{Alexandria,Indiana,UnitedStates},5145},
{{Alexandria,NewYork,UnitedStates},4061},
{{Alexandria,Alabama,UnitedStates},3917},
{{Alexandria,Ontario,Canada},3559},
{{Alexandria,SaintAnn,Jamaica},1927},
{{Alexandria,NewHampshire,UnitedStates},1613},
{{Alexandria,Tennessee,UnitedStates},966},
{{Alexandria,SouthDakota,UnitedStates},615},
{{Alexandria,Ohio,UnitedStates},517},
{{Alexandria,Pennsylvania,UnitedStates},346},
{{Alexandria,Nebraska,UnitedStates},177},
{{Alexandria,Missouri,UnitedStates},159}
}

But unfortunately the list of outputs, accessible by CityData["Alexandria"] in Mathematica isn't available in Wolfram|alpha at the moment.

share|improve this answer

A search enging would not be an effective way to accomplish what you want since it would not distinguish between different Alexandrias. Instead, see Wikipedia's article on Alexandria http://en.wikipedia.org/wiki/Alexandria_(disambiguation) and click on the links in the article to see the population for each place.

share|improve this answer
    
Thanks for your answer. I was hoping there would be a way to use something like Wolfram Alpha to generate that data, but it seems I'll have to do it manually for now. –  Hosam Aly Mar 12 '13 at 18:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.