Skip to content

Instantly share code, notes, and snippets.

@davidsbatista
Created January 19, 2023 20:27
Show Gist options
  • Save davidsbatista/365d09fb6578c6b0a73dae0a0d2a3f81 to your computer and use it in GitHub Desktop.
Save davidsbatista/365d09fb6578c6b0a73dae0a0d2a3f81 to your computer and use it in GitHub Desktop.
plot on map headquarters of companies in the german stock market (query.wikidata.org)
#defaultView:Map
SELECT DISTINCT ?companyLabel ?company ?headquarters ?headquartersLabel ?coordinates WHERE {
VALUES ?stock_markets {wd:Q155718 wd:Q378967 wd:Q595622 wd:Q874430} .
?company wdt:P361 ?stock_markets .
?company rdfs:label ?companyLabel . FILTER(LANG(?companyLabel) = "en")
?company wdt:P159 ?headquarters.
?headquarters rdfs:label ?headquartersLabel . FILTER(LANG(?headquartersLabel) = "en")
?headquarters wdt:P625 ?coordinates
}
ORDER BY ASC(?companyLabel)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment