Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.

StatisticalTable, a JSON-stat-based vocabulary

11 261 vues

Publié le

This presentation was part of the introductory JSON-stat presentation (July, 2013):

http://www.slideshare.net/badosa/json-stat

That presentation was split into three presentations between December 2015 and January 2016 and only updated to reflect the latest changes in the format (v. 2.0).

Publié dans : Données & analyses
  • Soyez le premier à commenter

StatisticalTable, a JSON-stat-based vocabulary

  1. 1. StatisticalTable a JSON-stat-based vocabulary Xavier Badosa @badosa http://xavierbadosa.com http://json-stat.org July, 2013 (updated to JSON-stat 2.0 in January, 2016)
  2. 2. JSON-stat is the perfect format for statistical Open Data APIs. It can represent any statistical table in your website in lightweight JSON. Tables for humans → Services for machines
  3. 3. But JSON-stat can also be used to enrich HTML tables Making your website for humans into a service for machines too. Tables for humans → Services for machines
  4. 4. Bringing JSON-stat back to (HTML) tables Introducing the StatisticalTable schema a JSON-stat-based vocabulary HTML microdata syntax will be used in the following slides, but the same schema can be expressed in other semantic technologies like microformats or RDFa.
  5. 5. The JSON-stat Ecosystem format libs conn. schema
  6. 6. or JSON-stat in the Browser the StatisticalTable schema
  7. 7. HTML is semantically poor. Likewise, HTML tables are semantically poor. There is a need to enrich them for special uses. the StatisticalTable schema
  8. 8. Other industries, like the news industry, have felt the urge to semantically enrich HTML. (By the way, rNews does not support enriched tables.)
  9. 9. Extending the schema.org Table vocabulary (By the way, the schema.org Table has no property of its own: all its properties are inherited.) How?
  10. 10. > StatisticalTable
  11. 11. > StatisticalTable a simple JSON-stat response{ "version" : "2.0", "class" : "dataset", "label" : "Population in Tuvalu in 2002. By sex", "value" : [4729, 4832, 9561], "id" : ["metric", "time", "geo", "sex"], "size" : [1, 1, 1, 3], "dimension" : { "sex" : { "label" : "Sex", "category" : { "index" : { "M" : 0, "F" : 1, "T" : 2 }, "label" : { "M" : "Men", "F" : "Women", "T" : "Total" } } }, … } }
  12. 12. > StatisticalTable same information in a table in some website
  13. 13. > StatisticalTable <table> <caption> Population in Tuvalu</span> in 2002. By sex </caption> <thead> <tr><th>Sex</th><th>Persons</th></tr> </thead> <tbody> <tr><th>Men</th><td>4729</td></tr> <tr><th>Women</th><td>4832</td></tr> <tr><th>Total</th><td>9561</td></tr> </tbody> </table> HTML code
  14. 14. > StatisticalTable <table itemscope itemtype="http://schema.org/Table/Stats"> <caption itemprop="label"> <span itemprop="metric">Population</span> in <span itemprop="geo" itemscope itemtype="http://schema.org/Place"> <span itemprop="name">Tuvalu</span> <meta itemprop="latitude" content="-8.516667" /> <meta itemprop="longitude" content="179.216667" /> </span> in <time datetime="2002-12-31">2002</time>. By sex </caption> <thead> <tr><th itemprop="dimension">Sex</th><th itemprop="units">Persons</th></tr> </thead> <tbody> <tr><th>Men</th><td>4729</td></tr> <tr><th>Women</th><td>4832</td></tr> <tr><th>Total</th><td>9561</td></tr> </tbody> </table> enriched HTML code
  15. 15. > StatisticalTable <table itemscope itemtype="http://schema.org/Table/Stats"> <caption itemprop="label"> <span itemprop="metric">Population</span> in <span itemprop="geo" itemscope itemtype="http://schema.org/Place"> <span itemprop="name">Tuvalu</span> <meta itemprop="latitude" content="-8.516667" /> <meta itemprop="longitude" content="179.216667" /> </span> in <time datetime="2002-12-31">2002</time>. By sex </caption> <thead> <tr><th itemprop="dimension">Sex</th><th itemprop="units">Persons</th></tr> </thead> <tbody> <tr><th>Men</th><td>4729</td></tr> <tr><th>Women</th><td>4832</td></tr> <tr><th>Total</th><td>9561</td></tr> </tbody> </table> This is just a very small sample of the possibilities.
  16. 16. > StatisticalTable <tr> <th itemid="http://jsonstat.dataprovider.org/dimension/sex.json#M">Men</th> <td>4729</td> </tr> <tr> <th itemid="http://jsonstat.dataprovider.org/dimension/sex.json#F">Women</th> <td>4832</td> </tr> <tr> <th itemid="http://jsonstat.dataprovider.org/dimension/sex.json#T">Total</th> <td>9561</td> </tr> Standard codes can be provided.
  17. 17. > StatisticalTable <th itemprop="dimension" itemid="http://jsonstat.dataprovider.org/dimension/sex.json" > <meta itemprop="index" content="3" /> Sex </th> Dimension order can also be provided.
  18. 18. A browser plug-in could allow you to import a table (data & metadata) into several formats (tabular & non-tabular). the StatisticalTable schema Benefits
  19. 19. A browser plug-in could allow you to manipulate & transform a table (for example, creating the right visualization on the fly). the StatisticalTable schema Benefits
  20. 20. Search engines could answer questions like: “How many women live in Canada between ages 30 and 34?” the StatisticalTable schema Benefits
  21. 21. A middleware could automatically convert your webpages into API endpoints, & those endpoints could be used by third party apps. the StatisticalTable schema Benefits
  22. 22. thank you
  23. 23. all pictures from Blocks picture in slide 1: Soma, by Dru! (CC BY-NC) Atomium in slide 5: Fighting Gravity – Atomium, Brussels, by Jan Faborsky (CC BY-NC-ND) Corner in slide 6: Cubism, by Ilya Khamushkin (CC BY-SA) Egg in slide 22 : Egg, by Auntie P (CC BY-NC-SA)

×