User talk:Yurik

Jump to: navigation, search

About this board

By clicking "Add topic", you agree to our Terms of Use and agree to irrevocably release your text under the CC BY-SA 3.0 License and GFDL

Template:Graph:Chart can x axis values have angle in bar chart?

Ah3kal (talkcontribs)

Hello Yurik!

I used a graph in this transcription in el.wikisource:

The values in x-axis overlap. Is it possible to modify the labels to be at an angle (as in the graph in the image)? Or if not, is there any other solution?

Thank you in advance!

Yurik (talkcontribs)

@Ah3kal, I don't see the graph there. Can you point me to the specific change? And yes, it is possible to place labels at an angle - (search for angle). I am working on a set of templates - Category:Graph Template Collection -- might be what you need.

Ah3kal (talkcontribs)

My bad Yurik, wrong link:

The link I intended is:

Thank you for your answer. I will try the link you gave me.

Reply to "Template:Graph:Chart can x axis values have angle in bar chart?"
Joel Amos (talkcontribs)

Hey Yurik,

I've added 2016 state GDP data here, and I attempted to update Template:Graph:US Map state highlight (and the Wikipedia equivalent) by changing initYear to 2016, but that simple change seemed to break the initial display before one presses play. So I've reverted my edits in expectance that you'll handle the change.

Another point to note is that I am currently unable to click onto 2016 without creating a range. Might be worth looking into. Cheers!

Yurik (talkcontribs)

Hi Joel, I reverted it to init=2016 -- it seems to look fine - I think it is simply that it needs some time to refresh. The 2016 range click is a bug, I need to figure out how to do it better.

Reply to "2016 data ready for Template:Graph:US Map state highlight"
Ah3kal (talkcontribs)

Hello again, Yurik

Is possible to have a time frame for the data? Some times there exists a distant value, and the inclusion of this value, because of the interpolation creates a false impression of population stability. E.g. see the graph in . There is a 150+ years gap from the first value (1689) to the next (1844), during which time, the population certainly wasn't stable (major events happened that had heavy impact in the population:e.g. unsuccesfull greek revolution in 1770, greek war of independence 1821, etc.). It would be more accurate and useful from an encyclopedic point of view to have the choice to frame the graph in a certain time, e.g. >1840, intstead of projecting values for 150 years, or removing a sourced value from the distant past. Is this possible?

Thank you in advance

Yurik (talkcontribs)

Hi, how would you want to display it in that case?

Ah3kal (talkcontribs)

Well I would like to exclude the first value and have the graph starting at 1844, without having to copy the data in commons (

E.g. I'd like if possible, the graph to work like this {Graph:Population history|Q=..........|from=1800|to=1900} with "from" and "to" to be optional

Yurik (talkcontribs)

Done - use the new "filter" expression (much more powerful than simple from/to) -- e.g. filter=datum.year >= 1800 && datum.year < 1900

Ah3kal (talkcontribs)

Thank you very much!

Reply to "Graph:Population history again"

Strange line behaviour in Template:Graph:Population history

Ah3kal (talkcontribs)

Hello Yurik,

First of all a big Thank you for your amazing work with graphs!

I'd like to report a strange behaviour in Template:Graph:Population history, where a connecting line turns in the wrong direction. An example of this can be found at w:el:Χρήστης:Ah3kal/πρόχειρο 10. The line connecting 1881 to 1891 is extending beyond 1891 to 1900 and then turns back. Thank you for your time.

Yurik (talkcontribs)

This is part of the interpolation algorithm called "monotone". I added a new parameter called "interpolate", and updated Greek wiki and your example with it. interpolate=monotone solves your problem. Also, I would highly recommend using shared tabular data on Commons instead of hardcoding them in the template call. This way someone can update the population, and all graphs in all wikis will be automatically updated. Lastly, I'm running for the board, please support and let others know :) Thanks!!

Ah3kal (talkcontribs)

Thank you very much! Hardcoded data were use only to highlight this behaviour in a stable way since the original graph used data from wikidata and the value for 1700 was just for experimentation. I had allready supported you :) Good luck with it. Regards!

Reply to "Strange line behaviour in Template:Graph:Population history"
Mikey641 (talkcontribs)

Hey. Is there a way to use this SPARQL in Kartographer?

SELECT DISTINCT ?item ?itemLabel ?coords {
   	VALUES ?itemclass { wd:Q5710433 wd:Q132821 }
    ?item wdt:P31/wdt:P279* ?itemclass  .
    wd:Q1218 wdt:P625 ?jerusalemloc .

    SERVICE wikibase:around {
      ?item wdt:P625 ?coords .
      bd:serviceParam wikibase:center ?jerusalemloc . 
      bd:serviceParam wikibase:radius "250" . 

  SERVICE wikibase:label {  
    bd:serviceParam wikibase:language "he" .  

Try it!


Yurik (talkcontribs)

@Mikey641, you can use SPARQL in Kartographer to get shapes (polygons) and lines , but you cannot use coordinates at this point. See help page.

Mikey641 (talkcontribs)

Oh. That's too bad. Well, is there any way to convert JSON to the wikimedia GeoJSON?

Yurik (talkcontribs)

@Mikey641, what do you mean by JSON? Also, "Wikimedia GeoJSON" is not different from the standard GeoJSON, just has an optional extra type called "ExternalData", but otherwise it is standard.

Mikey641 (talkcontribs)

by JSON I mean that when you run the query you get a button to download the data to a couple of formats: JSON, TSV and CSV or SVG. My question is if there is a tool to convert it to GeoJSON.

When I converted this query to GeoJSON it didn't work in wikipedia. Look at this edit

Yurik (talkcontribs)

@Mikey641, those downloads only work inside the wikidata query service. With <mapframe>, you need to specify a query inside the "ExternalData" type, with service="geoshape". Mapframe/maplink will draw the shapes (polygons or lines) if the objects in OSM have wikidata tags with the same value as the "id" column:

  "type": "ExternalData",
  "service": "geoshape",
  "query": "
SELECT ?id ?title ?description ...
Reply to "Kartographer"
Ankax Hayastan (talkcontribs)

Здравствуйте уважаемый Юрий, с Новым годом))) Я Вам написал письмо в русской Википедии.

Ankax Hayastan (talkcontribs)

Извините, Вы что нибудь уточнили? Вы можете помочь мне?

Yurik (talkcontribs)

Ankax, ya na etoi nedele budu v SF vstrechatsya s narodom, poprobuu posprashivat'.

Ankax Hayastan (talkcontribs)

Здравствуйте, если Вы ничего не смогли уточнить, то можно эту тему считать закрытым. Удачи...

Yurik (talkcontribs)

@Ankax Hayastan, izvinite, deistvitel'no nichego ne smog uznat' - voobshe ne ponyatno kto etim mozhet zanimatsya.

2A00:8780:8:1:6556:9DEF:33DB:6837 (talkcontribs)

I'm trying to get graph extension to work.

- Checked both Graphs and JsonConfig are installed succesfully. - Example line chart from shows blank/nothing is drawn on screen.

Am I missing something from the installation?

2A00:8780:8:1:6556:9DEF:33DB:6837 (talkcontribs)

Any help would be great and apologies for my not great English. Is JsonConfig the only dependancy Graph needs as mentioned in installation step 1?

Yurik (talkcontribs)

Hi, check that the <graph> tag works for you by copying one of the last graphs at the demo page, without the complex template/lua code.

Reply to "Can't get graph to work"
Pyb (talkcontribs)

Hello Yurik,

I will do a presentation about data visualization during the French WikiCon the 21st August. I will present the Graph extension and also the dataviz part of Wikidata Query Service. Do you have some slides available on this subject?

Yurik (talkcontribs)

This is awesome! Sadly no, I don't have any slides, but i could discuss with you, perhaps over hangout, some of the new graph developments. Also, take a look at this demo (click download on the right) -- this should be available in SPARQL soonish. Overall, my goals for dataviz is to enable tabular data namespace on Commons, making data source visualization much easier. Also, I am hoping of enabling vega lite, and, eventually, integrating vega editor (with the very powerful debugger) into the graph sandbox.

Reply to "Slides about dataviz"

Displaying geographical information on maps

Ad Huikeshoven (talkcontribs)

Can you help User:The Land with displaying geographical information on maps?

Basically what he has is a list of ratings (0-10) for UK postcodes (like AB1 1AB). How can he display this on a map somehow?

Reply to "Displaying geographical information on maps"

Why not link to the Maps extension, from the Maps page?

Samwilson (talkcontribs)

You reverted my edit without explaining why! :( My take on it is that the Maps page is about WMF-specific usage and development, and while those tools look like they're going to be brilliant, this wiki is about MediaWiki in general and so people often come here looking for help with their own wikis. To that end, I think the Maps page should be an overview of all mapping topics in the MediaWiki world — the most stable of which seems to be Extension:Maps. I think WMF-project mapping info more properly belongs on Meta.

Thanks for your consideration! Sam Wilson 01:34, 18 March 2016 (UTC)

Yurik (talkcontribs)

Hi  @Samwilson, I would love to list all maps related extension to be listed there, but they shouldn't be just one. Feel free to add "see also" section that lists them all, or simply link to the Category:Map extensions, as otherwise someone will have to maintain that list. Thanks, and sorry for not explaining.

Reply to "Why not link to the Maps extension, from the Maps page?"
There are no older topics