sparql = `SELECT ?placeLabel ?population (COUNT(?movie) as ?movieCount)
WHERE {
?movie wdt:P31 wd:Q11424 ; # Instance of: film
wdt:P840 ?place . # Place of setting: P840
?place wdt:P17 wd:Q30 ; # Country: United States of America (Q30)
wdt:P31/wdt:P279* wd:Q515 ;
rdfs:label ?placeLabel ;
wdt:P1082 ?population . # Population: P1082
FILTER(LANG(?placeLabel) = "en")
}
GROUP BY ?placeLabel ?population
ORDER BY DESC(?movieCount)`