Open main menu

User talk:Yurik

About this board

Previous discussion was archived at User talk:Yurik/Archive 1 on 2016-06-28.

Seating charts and data visualizations

1
Yair rand (talkcontribs)

I've been trying to figure out how visualizations of parliamentary votes and such could be created. One necessary component would be data for the seating plan, where each member of parliament sits, so I started some property proposals at Wikidata:Property proposal/Seating chart properties, for a system where each legislative term would have an associated "seating plan" item, which would include an SVG image with identifiers for each seat, and statements linking each seat to a person.

I don't think we currently have anything that could work with such a system, but does this sound possible to work with long-term? I don't know if there's a better way to store such data, or if there's any existing way to work with SVG's with markers like that.

Reply to "Seating charts and data visualizations"

Reminder: Share your feedback in this Wikimedia survey

1
MediaWiki message delivery (talkcontribs)

WMF Surveys, 01:39, 13 April 2018 (UTC)

Reply to "Reminder: Share your feedback in this Wikimedia survey"

Share your experience and feedback as a Wikimedian in this global survey

1
MediaWiki message delivery (talkcontribs)

WMF Surveys, 18:57, 29 March 2018 (UTC)

Reply to "Share your experience and feedback as a Wikimedian in this global survey"
VIGNERON (talkcontribs)

Hi,

Right now, the number are formatted as English number (10,000), is it possible to add a parametter to format as European numbers (10 000) ? (it is important as the comma is already used as decimal separator in Europe so this can be quite confusing).

Cdlt

Yurik (talkcontribs)

Hi, The graphs should eventually automatically change formatting based on the Wiki's default number formatting, but that requires some work on the server side -- phab:T100444. There might be a way to hack around it, but it might be very unstable without a good result.

Reply to "Template:Graph:Pie chart"
Drbug (talkcontribs)

Привет!

А это так задумано, что Q7303643 сделан отдельным от Q2167520? Dr Bug (Vladimir V. Medeyko) 22:36, 26 January 2017 (UTC)

Yurik (talkcontribs)

Well done sir! Fixed :)

Reply to "Афрасиаб"
Jc86035 (talkcontribs)

Running into some problems with Kartographer, specifically to replace OpenStreetMap Relation identifier (P402) where it's referenced in frwiki with the template {{Bases géographiques}}. I've tried making a few maplinks for demonstration purposes in the deletion discussion. Unfortunately the first two had to be fixed in OSM and are taking time to update (more than one object has the Wikidata ID and Kartographer just gets the first one), and Amazon and Aire just aren't rendering for some reason. I've also tried with public transport relations like Q837601 Kam Sheung Road Station (visible on the item with Abbe98's OpenStreetMap script), but because they're mixed between ways and nodes Kartographer refuses to render them.

Is it technically feasible to (a) render all objects in an OSM relation (and its subrelations) automatically regardless of object type or (b) render all objects which have a particular Wikidata ID?

In addition, as far as I'm aware there's no way in Lua or anything to just pull a relation ID from OSM with a Wikidata ID like you can with {{#property:P402}}, which might be a problem for templates which just want to link to the OSM relation. (Not a problem with Kartographer but the WD property.)

(also maplink doesn't work in Flow, might be a minor problem.)

Yurik (talkcontribs)

Kartographer should show all items (ways and relations only, not nodes) from OSM with the same Wikidata ID (it uses SQL's UNION). It might not show something if it's a broken polygon. Btw, the coordinates template in ruwiki has recently been updated to use <maplink> instead of geohack, e.g. Salzburg. In short, Kartographer should pick up any relations and ways (not super relations or nodes) as polygons and lines. If not, there is some bug that needs to be fixed. Most likely - in OSM data, but it is possible that it is in the osm2pgsql or some other system. Please file a phab: ticket - I am no longer on the project, so I will not be able to do anything beyond my usual volunteer help.

a) in most cases, both a polygon and a line exists with the same Wikidata ID due to how osm2pgsql converts osm data - that's one of the reasons we have geoshape and geoline. And osm2gpsql ignores super relations (relations of relations). b) this should already be the case

As for Lua, it can only access datasets from commons and wikidata properties for a specific entity - the only two forms of external data available to it. In theory, there could be a bot that copies complex query results into datasets on commons, and articles could use those results, but this might be overly complex.

Jc86035 (talkcontribs)

Okay then. Filed three separate bugs, hope something useful comes out of them.

Reply to "Kartographer"
Nikki (talkcontribs)

Hi :) I would've replied on IRC but you're often not around when I am.

For creating items, I would suggest http://tools.wmflabs.org/wikidata-todo/quick_statements.php (if you want to do a large batch you should probably get a flooder flag first).

For Python, the only thing I know of is pywikibot, lots of people seem to be using that.

Reply to "Questions on IRC"
Jura1 (talkcontribs)

Hi Yurik. Thanks for the again for the news.

Looking at the syntax, the main problems I had:

  • the sparql query isn't readable (and editable on the page). User:Multichill mentioned that, I think.
  • it's not easy to figure out which are the variable names that need changing. Default sparql labels tend to be in the form "asdfLabel".
  • there is no preview (supposedly there are technical reasons for that).

It would be good to have few samples for each of the possible graphs: it's easier to learn from changing them than to start from scratch. I guess I should start by reading the tutorial.

Yurik (talkcontribs)

@Jura1, see User:Yurik/sandbox - I rewrote Template:Graph:Pie chart -- now you simply supply the query in the original SPARQL format (and it gives you a link to the query service at the bottom). The query must produce two columns "label" and "value", or you need to supply the name of the columns (e.g. valueColumn=...) This way, the pie chart could plot them without modification. Preview should work ok, not sure what issue you are seeing.

Jura1 (talkcontribs)

Thanks. I got it to work (Property_talk:P3096#Charts). It seems that on preview, I just didn't wait long enough.

Looks like there is a bug in templatedata: "labelColumn" gets rendered as "LabelColumn" ;)

BTW, what would be a good way to specify percentages of total ? Most charts on it:Progetto:Biografie/Wikidata use sparql to output just one line with the total and 1 or 2 values for a percentage. Otherwise it times out. Already, the same wont work for entire Wikidata.

Yurik (talkcontribs)

Feel free to modify the template for the labelcolumn param :) What do you mean by percentage - do you want the input value to be the percentage? Or do you want it to always show percentage instead of the actual value on the graph?

Jura1 (talkcontribs)
Yurik (talkcontribs)

Ah yes, I told User:Multichill - it is very hard to work with values like that, it requires additional lua script to convert. It would be much easier if you modify the SPARQL to produce two column result - "label" and "value".

Jura1 (talkcontribs)

maybe with CONSTRUCT .. still have to learn how to use that.

Jura1 (talkcontribs)

Is this correct what I just added at Category:Pages with graphs. I keep mixing them up. Worse itwiki had had the template names switched ;)

Yurik (talkcontribs)

That category is automatic - any page that has a <graph> tag on it appears in that category.

Jura1 (talkcontribs)

Actually, I had in mind the note on the category description page itself.

BTW, is there a way to do the map from with Graph? I'd like to add it here.

Yurik (talkcontribs)
Jura1 (talkcontribs)

Good news. For this, I think it would be sufficient. I tried adding it, but somehow it worked when previewing it on mediawikiorg, but not here. Same for Smalysev's sample.

Yurik (talkcontribs)

it has just launched, riding the train, should be available on wikidata either today or tomorrow

Jura1 (talkcontribs)

Ok .. good. .. I thought it was another of thoses things that were around since April, but where none was aware of it ;)

Are there other types of graphs available as well?

Yurik (talkcontribs)

maps do not support any kinds of visualizations other than what's available in GeoJSON, plus the the external data thing we just enabled.

Jura1 (talkcontribs)

but forms: there are pie charts, the x/y plot. Any others?

Yurik (talkcontribs)

The graphs support anything you can throw at it - any kinds of marks -- because you control the drawing process - you specify arcs, bars, polygons, etc, to draw, based on the data. Because of its power, it is a bit complex to use :( See Vega.js documentation. I haven't made any ready-made graphs yet, but anyone is welcome to help with it :)

Jura1 (talkcontribs)

I will try to figure out how to do some ..

In the meantime, the map works at Wikidata too. There is just one thing I had noticed: highlighting Russia isn't ideal, as it spreads across 180°. Fiji would have the same problem, but it's fairly rare.

How does one have outlines added, e.g. departments of France?

Yurik (talkcontribs)

It all depends on OSM - if OSM has wikidata IDs for the shapes that you need, we will show them. If they don't, we will need to figure out a way to store them.

Jura1 (talkcontribs)
Yurik (talkcontribs)

no, the geoshapes service can only understand wikidata IDs. Others are much less stable.

Jura1 (talkcontribs)

The property gives for a Wikidata ID the corresponding OSM relation. Supposedly that is linked to a shape at OSM.

The Wikidata property values are meant to be stable.

Yurik (talkcontribs)

yes, but OSM relation IDs are not stable. I don't want to have to deal with multiple systems of IDs - Wikidata is meant to be the most stable of them, plus it makes everything relate to "concepts" rather than "geoshapes". Concepts are much more valuable, as they provide good linking to all other things in wikidata and outside.

Jura1 (talkcontribs)

I think a property for relations was picked over the others as they are considered the only stable thing at OSM.

I suppose the question if you want to source it from here or from there.

Reply to "Dynamic graphs and sparql"

Please take part in the Flow satisfaction survey

1
MediaWiki message delivery (talkcontribs)

(That message in other languages: العربية • ‎bosanski • ‎català • ‎Deutsch • ‎Esperanto • ‎français • ‎עברית • ‎polski • ‎português • ‎português do Brasil • ‎русский • ‎اردو • ‎中文 – ‎translate that message)

Hello!

Like some other community members, you are using Flow.

An increasing number of communities now use Flow or are considering it. Although Flow itself is not scheduled for major development during 2016 fiscal year, the Collaboration Team remains interested in the project and in providing an improved system for structured discussions.

You can help us make decisions about the way forward in this area by sharing your thoughts about Flow — what works, doesn't work or should be improved?

Please fill out this survey (available in multiple languages), which is administered by a third-party service. It will not require an email or your username. See our privacy statement.

Thanks for your ideas and opinions about Flow!

Trizek (WMF), on behalf of the Collaboration team, 11:56, 7 September 2016 (UTC)

Reply to "Please take part in the Flow satisfaction survey"
There are no older topics
Return to the user page of "Yurik".