Nice! #6 reveals a lot of dupli/tripli/multiplications. 2016-10-30 11:20 GMT+01:00 Léa Lacroix <lea.lacr...@wikimedia.de>:
> Hello all, > > This is the second day of our birthday-celebrating week, and I have some > very cool news for you. > > The Wikidata Query Service already had very nice ways to display the > results, as graphs, bubble chart and map. Now we have improved this with *four > new types of charts:* line chart, bar chart, scatter chart and area chart! > > This is already deployed on the Query Service > <https://query.wikidata.org/> and you can try it directly by using one of > the example queries : line chart > <https://query.wikidata.org/embed.html#%23Population%20of%20countries%20sharing%20a%20border%20with%20Germany%0A%0A%23defaultView%3ALineChart%0ASELECT%20%3Fcountry%20%20%3Fyear%20%3Fpopulation%20%3FcountryLabel%20WHERE%20%7B%0A%20%20%7B%0A%20%20%20%20SELECT%20%3Fcountry%20%3Fyear%20%28AVG%28%3Fpopulation%29%20AS%20%3Fpopulation%29%20WHERE%20%7B%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20SELECT%20%3Fcountry%20%28str%28YEAR%28%3Fdate%29%29%20AS%20%3Fyear%29%20%3Fpopulation%20WHERE%20%7B%0A%20%20%20%20%20%20%20%20%20%20%3Fcountry%20wdt%3AP47%20wd%3AQ183.%0A%20%20%20%20%20%20%20%20%20%20%3Fcountry%20p%3AP1082%20%3FpopulationStatement.%0A%20%20%20%20%20%20%20%20%20%20%3FpopulationStatement%20ps%3AP1082%20%3Fpopulation.%0A%20%20%20%20%20%20%20%20%20%20%3FpopulationStatement%20pq%3AP585%20%3Fdate.%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%20%20GROUP%20BY%20%3Fcountry%20%3Fyear%0A%20%20%7D%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22en%22.%20%7D%0A%7D>, > bar chart > <https://query.wikidata.org/embed.html#%23Battles%20per%20year%20per%20continent%20and%20country%20last%2080%20years%20%28animated%29%0A%0A%23defaultView%3ABarChart%0ASELECT%20%28SAMPLE%28%3F_continentLabel%29%20AS%20%3Fcontient%29%20%28COUNT%28%3F_country%29%20AS%20%3Fbattles%29%20%28SAMPLE%28%3F_countryLabel%29%20AS%20%3F_countryLabel%29%20%28SAMPLE%28%3Fyear%29%20AS%20%3Fyear%29%20%20WHERE%20%7B%0A%20%20%3Fsubj%20wdt%3AP31%20wd%3AQ178561.%0A%20%20OPTIONAL%20%7B%20%3Fsubj%20wdt%3AP580%20%3Fd1.%20%7D%0A%20%20OPTIONAL%20%7B%20%3Fsubj%20wdt%3AP585%20%3Fd2.%20%7D%0A%20%20OPTIONAL%20%7B%20%3Fsubj%20wdt%3AP582%20%3Fd3.%20%7D%0A%20%20BIND%28IF%28%21BOUND%28%3Fd1%29%2C%20IF%28%21BOUND%28%3Fd2%29%2C%20%3Fd3%2C%20%3Fd2%29%2C%20%3Fd1%29%20AS%20%3Fdate%29%0A%20%20BIND%28str%28YEAR%28%3Fdate%29%29%20AS%20%3Fyear%29%0A%20%20%3Fsubj%20wdt%3AP276%20%3F_loc.%0A%20%20%3F_loc%20wdt%3AP17%20%3F_country.%0A%20%20%3F_country%20wdt%3AP30%20%3F_continent.%0A%20%20%3F_country%20rdfs%3Alabel%20%3F_countryLabel.%0A%20%20%3F_continent%20rdfs%3Alabel%20%3F_continentLabel.%0A%20%20%0A%20%20BIND%28%28NOW%28%29%29%20-%20%3Fdate%20AS%20%3Fdistance%29%0A%20%20FILTER%28BOUND%28%3Fyear%29%29%0A%20%20FILTER%28%28LANG%28%3F_countryLabel%29%29%20%3D%20%22en%22%29%0A%20%20FILTER%28%28LANG%28%3F_continentLabel%29%29%20%3D%20%22en%22%29%0A%20%20FILTER%28%280%20%3C%3D%20%3Fdistance%29%20%26%26%20%28%3Fdistance%20%3C%2031%20%2a%2012%20%2a%2080%29%29%0A%7D%0AGROUP%20BY%20%3Fyear%20%3F_country%0AORDER%20BY%20%3F_countryLabel>, > scatter chart > <https://query.wikidata.org/embed.html#%23Number%20of%20films%20by%20year%20and%20genre%0A%0A%23defaultView%3AScatterChart%0ASELECT%20%20%20%3Fyear%20%20%28COUNT%28%3F_genre%29%20AS%20%3Fcount%20%29%20%28SAMPLE%28%3F_genreLabel%29%20AS%20%3Flabel%20%29%20%20%28%3Fyear%20as%20%3Fyear_shown%29%20WHERE%20%7B%0A%20%20%3Fitem%20wdt%3AP31%20wd%3AQ11424.%0A%20%20%3Fitem%20wdt%3AP577%20%3F_publication_date.%0A%20%20%3Fitem%20wdt%3AP136%20%3F_genre.%0A%20%20%3F_genre%20rdfs%3Alabel%20%3F_genreLabel.%0A%20%20BIND%28str%28YEAR%28%3F_publication_date%29%29%20AS%20%3Fyear%29%0A%20%20FILTER%28%28LANG%28%3F_genreLabel%29%29%20%3D%20%22en%22%29%0A%20%20%0A%20FILTER%20%28%3F_publication_date%20%3E%3D%20%222000-00-00T00%3A00%3A00Z%22%5E%5Exsd%3AdateTime%29%0A%7D%0AGROUP%20BY%20%3F_genreLabel%20%3Fyear%0AHAVING%20%28%3Fcount%20%3E%2030%29>, > area chart > <https://query.wikidata.org/embed.html#%23Cancer%20deaths%20per%20year%20and%20cancer%20type%0A%0A%23defaultView%3AAreaChart%0ASELECT%20%3Fcid%20%28str%28SAMPLE%28%3Fyear%29%29%20AS%20%3Fyear%20%29%20%20%28COUNT%28%2a%29%20AS%20%3Fcount%29%20%20%3Fcause%20WHERE%20%7B%0A%20%20%3Fpid%20wdt%3AP31%20wd%3AQ5.%0A%20%20%3Fpid%20wdt%3AP509%20%3Fcid.%0A%20%20%3Fcid%20wdt%3AP279%2a%20wd%3AQ12078.%0A%20%20%0A%20%20OPTIONAL%20%7B%0A%20%20%20%20%3Fcid%20rdfs%3Alabel%20%3Fcause.%0A%20%20%20%20FILTER%28%28LANG%28%3Fcause%29%29%20%3D%20%22en%22%29%0A%20%20%7D%0A%20%20%20%3Fpid%20wdt%3AP570%20%3F_date_of_death.%20%0A%20%20BIND%20%28%20YEAR%28%3F_date_of_death%29%20AS%20%3Fyear%20%29%0A%20%20FILTER%28%20BOUND%28%3Fcause%29%20%20%29%0A%20%20FILTER%28%20BOUND%28%3Fyear%29%20%20%29%0A%20%20FILTER%28%20%3Fyear%20%3E%201960%20%29%0A%7D%0AGROUP%20BY%20%3Fcid%20%3Fcause%20%3Fyear>. > Some of these views are animated, and you can play with it by moving the > cursor over the chart, clicking on the legend labels to filter... > > Thanks a lot to Jonas who worked very hard on this so these new features > are perfectly ready for the birthday! If you have questions or find a bug, > please ping one of us. > > We also worked on documentation: have a look to the page *presenting all > the types of views > <https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/Wikidata_Query_Help/Result_Views>* > that WDQS can provide. Don't hesitate to improve it or translate it in your > language! Again, thank you Jonas for spending time on improving the doc. > > Speaking about documentation, I need to present you this very cool *guide > to SPARQL and the Wikidata Query Service > <https://www.wikidata.org/wiki/User:TweetsFactsAndQueries/A_Guide_To_WDQS>* > written by WikidataFacts. We know that understanding how SPARQL works is > not easy for beginners, and every help is welcomed to improve our actual > documentation :) Feel free to give your feedbacks about this work. Thanks > WikidataFacts for this birthday present! > > Last but not least, we have a story about queries. Jens and Cornelius > wrote a blog post called *"10 cool queries for Wikidata that will blow > your mind. Number 7 will shock you. > <https://blog.wikimedia.de/2016/10/30/10-cool-queries-for-wikidata-that-will-blow-your-mind-number-7-will-shock-you/>"* > (also available in German > <https://blog.wikimedia.de/2016/10/30/10-coole-wikidata-abfragen-die-dir-neue-horizonte-eroeffnen-nummer-7-wird-dich-schockieren/>) > That's not on BuzzFeed (Q5003490) <https://www.wikidata.org/wiki/Q5003490> > but on the WMDE blog and it's a nice way to introduce newcomers to queries. > Thanks for sharing! > > That's all for today, I let you enjoy your Sunday and I'll be back > tomorrow. By the way, Sunday is a good day to try new queries: if you want > to share yours, ask for help on a difficult one or give some advices, join > us on Twitter with the hashtag #SundayQuery > <https://twitter.com/search?f=tweets&vertical=default&q=%23SundayQuery&src=typd> > ;) > Cheers, > > -- > Léa Lacroix > Community Communication Manager for Wikidata > > Wikimedia Deutschland e.V. > Tempelhofer Ufer 23-24 > 10963 Berlin > www.wikimedia.de > > Wikimedia Deutschland - Gesellschaft zur Förderung Freien Wissens e. V. > > Eingetragen im Vereinsregister des Amtsgerichts Berlin-Charlottenburg > unter der Nummer 23855 Nz. Als gemeinnützig anerkannt durch das Finanzamt > für Körperschaften I Berlin, Steuernummer 27/029/42207. > > _______________________________________________ > Wikidata mailing list > Wikidata@lists.wikimedia.org > https://lists.wikimedia.org/mailman/listinfo/wikidata > > -- Bináris
_______________________________________________ Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata