I am interested in using Entity Functions such as EntityValue, FilteredEntityClass, EntityFunction, EntityClass, EntityList, and GeoEntities to help me find N most populous cities in each state. I have figured out how to calculate the most populous cities in 1 state, but when I try to scale it to all 50 states it takes a really long time. I found a similar question about how to find to the twenty most populous cities. I am thinking of applying Map to the function CityData for each state and then applying a function to get the N number of most populous cities for each state to the result of the first mapping.
EntityList[
EntityClass[
"City", {EntityProperty["City", "AdministrativeDivision"] ->
Entity["AdministrativeDivision", {"California",
"UnitedStates"}]}]]
returns
{}
and
GeoEntities[
Entity["AdministrativeDivision", {"Alaska", "UnitedStates"}], "City"]
returns
GeoEntities::servermessage: Server message: Internal server error.
My goal is to first find a way to find the most populous cities in a state and then map that function to all 50 states. My broader interest is in applying Mathematica to geographical computation.
Map
on all this? You said you could find the most populous city in one state but the code you have shown presents no such output. $\endgroup$