Last active
May 8, 2019 11:18
-
-
Save floatingpurr/490df22fdbeff0f127f71f83eff6a284 to your computer and use it in GitHub Desktop.
Query suggestions
This file contains 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
Hello Daniel, | |
sorry for the late! Regarding your query, I noticed that you get some reduntant geo data in the resultset, such as: | |
wd:Q25 Point(-3.637848 52.349602) wd:Q21257225 | |
wd:Q25 Point(-3.637848 52.349602) wd:Q21560979 | |
Usually that is not a problem when you visualize your data with #defaultView:Map mode. They just overlap. This time, the | |
resulset you are going to render is quite heavy (100k+ entities). So, why not transforming that problem in a coloring | |
rule? : ) | |
For example, you might want to design a query for getting all the cited locations with their own frequency of citation: | |
#defaultView:Map{"layer":"?topicsBin"} | |
SELECT ?topicLabel ?geoloc ?topicsBin ?topicCitations | |
WHERE{ | |
BIND( | |
IF(?topicCitations < 10, "Log < 1", | |
IF(?topicCitations < 100, "Log < 2", | |
IF(?topicCitations < 1000, "Log < 3", | |
"Log >= 3"))) | |
AS ?topicsBin) | |
{ | |
SELECT ?topic ?geoloc (count(?topic) as ?topicCitations) | |
WHERE { | |
?paper wdt:P921 ?topic ; | |
wdt:P31 wd:Q13442814 . | |
?topic wdt:P625 ?geoloc. | |
} | |
GROUP BY ?topic ?geoloc | |
} | |
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } | |
} | |
order by DESC(?topicCitations) | |
..and here is the result: http://tinyurl.com/y9blhkkh. | |
Same map as before but colored (Log10 clustered) and with 100x less geo points (mainly redundat information). | |
I hope this will help in some way :) | |
Good luck for your recording! | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey @Daniel-Mietchen. I'm sorry, I missed your updates! I've seen them just now! Thanks : )