User:Molarus/graph

  • show the team of a rider and the races, maybe with results as color of the jerseys.
  • SPARQL-query feeds graph that show number of rider articles per Wiki.
    I have an idea for an use case: mountains. Do you remember the pictures of the mountains at the Tour de France - website?
    We could say:
    Cycling race/mountains|Q123|Q456|Q789
    We will get a picture with a en:Slider (computing) to slide over the three mountains. I don´t know if we already have properties to add the data to the mountain items. I have found the website http://www.cyclingcols.com/ while I was writing articles for the TdF 2016. We have to add a references to the data in WDwiki too and somehow show the ref in the article. I will not start with that tomorrow, because I still have to learn writing code for graph, but I will put that on my todo-list. I see as advantage that we don´t have something like that for our articles. And drawing pictures is a lot of work. This way, I would be just adding some data to WDwiki and the lua module does everything else. Another advantage is that we have to read only the items for the mountains - very fast - therefore the creation of the picture is the most time consuming thing. I don´t know if the 10 seconds lua limit will be a problem, but we do not have to show 50 mountains in the picture.
  • vega-editor
  • github vega

Vega-light edit

Example 1 edit

{

 "data": {
   "values": [
     {"a": "C","b": 2,"c": "A"},
     {"a": "C","b": 7,"c": "A"},
     {"a": "C","b": 4,"c": "B"},
     {"a": "D","b": 1,"c": "B"},
     {"a": "D","b": 2,"c": "B"},
     {"a": "D","b": 6,"c": "B"},
     {"a": "E","b": 8,"c": "B"},
     {"a": "E","b": 4,"c": "B"},
     {"a": "E","b": 7,"c": "C"}
   ]
 },
 "mark": "text",
 "encoding": {
   "x": {"field": "a","type": "nominal"},
   "y": {"field": "b","type": "quantitative"},
   "color": {"field": "c","type": "nominal"},
   "size": {"value": 20},
   "text": {"value": "Hello"}
 }

}

Example 2 edit

{

"description": "Google's stock price over time.",
"data": {
 "values": [
    {"date": "1878","b": 2,"c": "A"},
    {"date": "1879","b": 5,"c": "A"},
    {"date": "1880","b": 4,"c": "B"},
    {"date": "1881","b": 1,"c": "B"},
    {"date": "1882","b": 2,"c": "B"},
    {"date": "1883","b": 6,"c": "B"},
    {"date": "1884","b": 8,"c": "B"},
    {"date": "1885","b": 4,"c": "B"},
    {"date": "1886","b": 7,"c": "C"}
  ]
 },
 "mark": "line",
 "encoding": {
   "x": {
     "field": "date",
     "type": "temporal"
   },
   "y": {
     "field": "b",
     "type": "quantitative"
   }
 }

}

Example 3 edit

Quelle: Turorial {

 "data": {
   "values": [
     {"year": "1878","cnt": "1"},
     {"year": "1879","cnt": "5"},
     {"year": "1880","cnt": "2"}
   ]
 },
 "mark": "line",
 "encoding": {
   "x": {"field": "year","type": "temporal"},
   "y": {"field": "cnt","type": "quantitative"}
 }

}

Kapitel 1 edit

Kapitel 2 edit


London population edit