This document describes the WebIndex Data Portal developed as part of the Web Index project.

Initial version

Introduction

The WebIndex Project has been developed by The World Wide Web Foundation. Taking the format of an 81 country ranking, the Web Index is the world’s first measure of the World Wide Web’s contribution to development and human rights globally. Scores are given in the areas of access; freedom and openness; relevant content; and empowerment. First released in 2012, the 2013 Index has been expanded and refined to include 20 new countries and features an enhanced data set, particularly in the areas of gender, Open Data, privacy rights and security.

The sources of data are indicators that can be primary (questionaries made to experts) or secondary (external sources)

The computation structure of the web index is developed in a hierarchical way, where indicators (primary or secondary) are grouped into components, components are grouped into subindexes and finally, subindexes are grouped into the index.

The WebIndex data portal follows the RDF Data Cube vocabulary where there are single observations with different dimensions grouped by slices and datasets.

Further information

Namespace Prefixes

This is the list of namespace prefixes employed
cex
http://purl.org/weso/ontology/computex#
dbpedia
http://dbpedia.org/resource/
dcterms
http://purl.org/dc/terms/
geo
http://www.w3.org/2003/01/geo/wgs84_pos#
odb
http://data.webfoundation.org/odb/v2013/
odb-component
http://data.webfoundation.org/odb/v2013/component/
odb-computation
http://data.webfoundation.org/odb/v2013/computation/
odb-country
http://data.webfoundation.org/odb/v2013/country/
odb-dataset
http://data.webfoundation.org/odb/v2013/dataset/
odb-index
http://data.webfoundation.org/odb/v2013/index/
odb-indicator
http://data.webfoundation.org/odb/v2013/indicator/
odb-obs
http://data.webfoundation.org/odb/v2013/observation/
odb-ranking
http://data.webfoundation.org/odb/v2013/ranking/
odb-region
http://data.webfoundation.org/odb/v2013/region/
odb-slice
http://data.webfoundation.org/odb/v2013/slice/
odb-weightSchema
http://data.webfoundation.org/odb/v2013/weightSchema/
org
http://www.w3.org/ns/org#
owl
http://www.w3.org/2002/07/owl#
qb
http://purl.org/linked-data/cube#
rdf
http://www.w3.org/1999/02/22-rdf-syntax-ns#
rdfs
http://www.w3.org/2000/01/rdf-schema#
sdmxAttribute
http://purl.org/linked-data/sdmx/2009/attribute#
sdmxCode
http://purl.org/linked-data/sdmx/2009/code#
sdmxConcept
http://purl.org/linked-data/sdmx/2009/concept#
sdmxSubject
http://purl.org/linked-data/sdmx/2009/subject#
skos
http://www.w3.org/2004/02/skos/core#
test
http://data.webfoundation.org/test/v2013/
time
http://www.w3.org/2006/time#
webindex
http://data.webfoundation.org/webindex/v2013/
wf-onto
http://data.webfoundation.org/ontology/
wf-org
http://data.webfoundation.org/organization/
wf-people
http://data.webfoundation.org/people/
wi-component
http://data.webfoundation.org/webindex/v2013/component/
wi-computation
http://data.webfoundation.org/webindex/v2013/computation/
wi-country
http://data.webfoundation.org/webindex/v2013/country/
wi-dataset
http://data.webfoundation.org/webindex/v2013/dataset/
wi-index
http://data.webfoundation.org/webindex/v2013/index/
wi-indicator
http://data.webfoundation.org/webindex/v2013/indicator/
wi-obs
http://data.webfoundation.org/webindex/v2013/observation/
wi-ranking
http://data.webfoundation.org/webindex/v2013/ranking/
wi-region
http://data.webfoundation.org/webindex/v2013/region/
wi-slice
http://data.webfoundation.org/webindex/v2013/slice/
wi-weightSchema
http://data.webfoundation.org/webindex/v2013/weightSchema/
xsd
http://www.w3.org/2001/XMLSchema#

Base URI

The base URI of the WebIndex 2013 version is http://data.webfoundation.org/webindex/v2013. Along this document {base} refers to the previous URI.

Entities

For each entity we give a description, the URI template, an example and a Schema using the ShEx RDF schema language. The schema file employed is available here.

Structural elements

Observations

A single observation. It is usually a cell value from an excel sheet.

There are three main dimensions for each observation:

An observation has a cex:value which is a number

URI Template

{base}/observation/{observationId}
where
{base} = Base URI for WebIndex
{Dataset} = Sheet or source from which this observation has been obtained
{observationId} = Id of this observation

Example

http://data.webfoundation.org/webindex/v2013/observation/obs6704

Schema

<Observation> { 
      cex:md5-checksum xsd:string ,                    # MD5 from observationId#weso#Area#year     
      cex:computation @<Computation> ,              # 
      dcterms:issued xsd:integer ,                         # timestamp 
      dcterms:publisher ( wi-org:WebFoundation ), 
      qb:dataSet @<Dataset> ,                       # Represents the dataset to which an observation belongs
      rdf:type ( qb:Observation wi-onto:Observation ),
      rdfs:label (@en) ,
      sdmx-concept:obsStatus @<ObsStatus> ,			 
      wi-onto:ref-area @<Area>,                     # In WebIndex, the ref-area are usually countries 
      ( wi-onto:ref-indicator @<Indicator>
      | wi-onto:ref-indicator @<Component> 
      | wi-onto:ref-indicator @<Subindex> 
	  | wi-onto:ref-indicator @<Index>) ,          # Indicators can be single indicators, components, subindexes or indexes
      wi-onto:ref-year xsd:int ,                       # Year of the observation
      cex:value xsd:double                             # Value of the observation
 } 

Indicators

There are primary indicators (answers from questionnaries) and secondary indicators (obtained from external sources). Indicators are grouped into components.

URI Template

{base}/indicator/{indicatorId}
where
{base} = Base URI for WebIndex
{indicatorId} = Id of this indicator

Example

http://data.webfoundation.org/webindex/v2013/indicator/WEF_L

Schema

<Indicator> { 
      wf-onto:country-coverage xsd:integer ,              # 
      wf-onto:provider-link @<Organization> ,
	  wf-onto:republish xsd:integer ,
	  cex:component @<Component> ,
	  cex:highLow (cex:High cex:Low) ,
	  rdf:type (wf-onto:PrimaryIndicator 
				wf-onto:SecondaryIndicator ),
	  rdfs:label xsd:string,
	  rdfs:comment xsd:string,
	  skos:notation xsd:string,
	  time:intervalStarts xsd:integer,
	  time:intervalEnds xsd:integer
 } 

Components

Components are grouped into subindexes.

URI Template

{base}/component/{componentId}
where
{base} = Base URI for WebIndex
{componentId} = Id of this component

Example

http://data.webfoundation.org/webindex/v2013/component/economic

Schema

<Component> { 
      wf-onto:order xsd:integer ,              # In which position is should be visualized
      dcterms:contributor wf-onto:WESO ,
	  dcterms:issued xsd:integer ,             # timestamp
	  cex:element @<Indicator> ,
	  rdf:type cex:Component, 
	  rdfs:label xsd:string,
	  skos:notation xsd:string,
 } 

Subindexes

Subindexes form the index

URI Template

{base}/subindex/{subindexId}
where
{base} = Base URI for WebIndex
{subindexId} = Id of this subindex

Example

http://data.webfoundation.org/webindex/v2013/subindex/access

Schema

<Subindex> { 
      wf-onto:order xsd:integer ,              # In which position is should be visualized
      wf-onto:colour xsd:string ,              # In which colour is should be visualized
	  cex:element @<Component> ,
	  rdf:type cex:SubIndex, 
	  rdfs:label xsd:string,
	  skos:notation xsd:string,
 } 

Index

Index

URI Template

{base}/index/{indexId}
where
{base} = Base URI for WebIndex
{indexId} = Id of this index

Example

http://data.webfoundation.org/webindex/v2013/index/index

Schema

<index> { 
      wf-onto:order xsd:integer ,              # In which position is should be visualized
      wf-onto:colour xsd:string ,              # In which colour is should be visualized
	  cex:element @<Subindex> ,
	  rdf:type cex:Index, 
	  rdfs:label xsd:string,
	  skos:notation xsd:string,
 } 

Slice

A Slice is a grouping of observations. In the case of the WebIndex slices are usually groupings of observations with the same indicator, year and dataset but different countries.

URI Template

{base}/slice/{sliceId}
where
{base} = Base URI for WebIndex
{sliceId} = Id of this slice

Example

http://data.webfoundation.org/webindex/v2013/slice/computed_2013_1386752461095_89400

Schema

<Slice> { 
	  rdf:type qb:Slice ,
	  cex:indicator @<Indicator> ,
	  wf-onto:ref-year xsd:int ,
	  qb:observation (@<Observation>*)
 } 

Dataset

A Dataset is a grouping of slices. In the case of the WebIndex there are two main types of datasets: datasets that are imported from excel sheets and computed datasets that correspond with the different computation phases. This concept is the same as the qb:DataSet concept from RDF Data Cube

URI Template

{base}/dataset/{datasetId}
where
{base} = Base URI for WebIndex
{datasetId} = Id of this dataset

Examples

Schema

<DataSet> { 
      cex:computation @<DatasetComputation> ,
	  rdf:type qb:DataSet ,
	  qb:structure wf-onto:DSD ,
	  sdmxAttribute:unitMeasure dbpedia:Year ,
	  qb:slice (@<Slice>*)
 } 

Countries and regions

Country

Country concept

URI Template

{base}/country/{countryCode}
where
{base} = Base URI for WebIndex
{countryCode} = Iso-Code Alpha 3

Example

http://data.webfoundation.org/webindex/v2013/country/ESP

Schema

<Country> { 
   rdf:type	                   wf-onto:Country,
   wf-onto:has-iso-alpha2-code xsd:string ,
   wf-onto:has-iso-alpha3-code xsd:string ,
   rdfs:label				   xsd:string,
 } 

Region

Region concept

URI Template

{base}/region/{regionId}
where
{base} = Base URI for WebIndex
{regionId} = Region Id

Example

http://data.webfoundation.org/webindex/v2013/region/Europe

Schema

<Region> { 
   rdf:type	                   wf-onto:Region,
   rdfs:label				   xsd:string,
   wf-onto:has-country		   @<Country>
 } 

Organization

Organization

URI Template

{base}/organization/{orgId}
where
{base} = Base URI for WebIndex
{orgId} = Organization Id

Example

http://data.webfoundation.org/organization/IEA

Schema

<Organization> { 
   rdf:type	                   org:Organization,
   rdfs:label				   xsd:string
 } 

Computations

Computations between observations

Describes the Computation that has been done to obtain a value

URI Template

{base}/computation/{compId}
where
{base} = Base URI for WebIndex
{compId} = Computation Id

Example

http://data.webfoundation.org/webindex/v2013/computation/computed_2009_1386752461095_123323

Schema

The schema depends on the type of computation.

Raw value

<Raw> { 
   rdf:type	            ( cex:Raw )
 } 

Ranking of values

<Ranking> { 
   rdf:type	            ( cex:Ranking),
   rdfs:reason			xsd:string,
   cex:slice			@<Slice>          # Slice that has been ranked
   cex:observation      @<Observation>    # Observation that has been ranked
   cex:dimension		( wf-onto:ref-area ) # In WebIndex, rankings are made by area (Country)
 } 

Normalize values

<Normalize> { 
   rdf:type	            ( cex:Normalize ),
   cex:mean				xsd:decimal        # Mean of the values in the slice
   cex:observation      @<Observation>  # Observation that has been normalized
   cex:stdDesv			xsd:decimal		   # Standard deviation of the values in the slice
   cex:slice			@<Slice>		   # Reference slice of the normalization
 } 

Score values

<Score> { 
   rdf:type	            ( cex:Score ),
   cex:rangeMax			( 100 ),			 # Maximum target
   cex:rangeMin			( 0 ),				 # Minimum target
   cex:valueMax			xsd:decimal, 	 # Maximum of all the values in the slice to score
   cex:valueMin			xsd:decimal,	 # Minimum of all the values in the slice to score
   cex:observation		@<Observation # Observation to score
   cex:slice			@<Slice       # Slice that is being scored
 } 

Group clusters

<GroupClusters> { 
   rdf:type	            ( cex:GroupClusters ),
   cex:component		@<Component>  	# Component(s) that are being grouped
   cex:dataSet			@<Dataset>		# Dataset that is being grouped
   cex:dimension		wf-onto:ref-area	# Dimension that is being grouped
   cex:filterDimension	wf-onto:ref-year	# Dimension that is being applied to filter
   cex:filterValue		xsd:integer			# Value that acts as the filter
 } 

Group subindex

<GroupSubIndex> { 
   rdf:type	            ( cex:GroupSubIndex ),
   cex:component		@<Component>  	# Component(s) that are being grouped
   cex:dataSet			@<Dataset>		# Dataset that is being grouped
   cex:dimension		wf-onto:ref-area	# Dimension that is being grouped
   cex:filterDimension	wf-onto:ref-year	# Dimension that is being applied to filter
   cex:filterValue		xsd:integer			# Value that acts as the filter
 } 

Group index

<GroupIndex> { 
   rdf:type	            ( cex:GroupIndex ),
   cex:component		@<Component>  	# Component(s) that are being grouped
   cex:dataSet			@<Dataset>		# Dataset that is being grouped
   cex:dimension		wf-onto:ref-area	# Dimension that is being grouped
   cex:filterDimension	wf-onto:ref-year	# Dimension that is being applied to filter
   cex:filterValue		xsd:integer			# Value that acts as the filter
 } 

Weights and Weight schemas

Weight schema

Weight schema

URI Template

{base}/weightSchema/{weightSchemaId}
where
{base} = Base URI for WebIndex
{weightSchemaId} = Weight Schema Id

Example

http://data.webfoundation.org/odb/v2013/weightSchema/indicatorWeights

Schema

<WeightSchema> { 
   rdf:type	                   cex:Weight,
   cex:weight				   @<Weight>      # weight(s) that belong to the weight schema
 } 

Weight

Weight

Schema

<Weight> { 
   rdf:type	            cex:Weight,
   cex:element			@lt;Indicator>,      # Element to weight
   cex:value			xsd:decimal			 # value of the weight
 } 

Computations between datasets

Ontology

The WebIndex data portal terms are defined in the following ontologies:

Example queries

This section contains a list of common queries. The queries appear without their prefixes

List all the countries, their label and their ranking in 2013

select distinct ?country ?label ?value where {
 ?country a wf-onto:Country ;
          rdfs:label ?label .
 ?observation cex:computation [a cex:Ranking] ;
      wf-onto:ref-area ?country ;
      wf-onto:ref-year 2013 ;
      cex:value ?value .
 ?slice cex:indicator wi-index:index ;
        qb:observation ?observation .
}
order by asc(?value)
Try It

List the rankings in 2011 and 2012 of all the countries


select distinct ?country ?label ?value2011 ?value2012 where {
 ?country a wf-onto:Country ;
          rdfs:label ?label .
 
  ?obs2011 cex:indicator wi-index:index ;
          cex:computation [a cex:Score] ;
          wf-onto:ref-area ?country ;
          wf-onto:ref-year 2011 ;
          cex:value ?value2011 .
 
  ?obs2012 cex:indicator wi-index:index ;
          cex:computation [a cex:Score] ;
          wf-onto:ref-area ?country ;
          wf-onto:ref-year 2012 ;
          cex:value ?value2012 .

} order by ?country
Try It

List all the primary indicators and their label

SELECT ?indicator ?label WHERE {
 ?indicator a wf-onto:PrimaryIndicator ;
    rdfs:label ?label .
}
ORDER BY ?indicator
Try It

List all the weights

SELECT ?weight ?indicator ?value WHERE {
 ?weight a cex:WeightSchema .
 ?weight cex:weight 
   [ cex:element ?indicator ;
     cex:value ?value ;
   ] .
}
Try It

Get values of a given country for a given indicator

Get the values of country France for indicator ITU_A

SELECT ?year ?value 
WHERE {
 ?obs rdf:type qb:Observation ;
      wf-onto:ref-area wi-country:FRA ;
      wf-onto:ref-year ?year ;
      sdmxConcept:obsStatus cex:Normalized ;
      cex:indicator wi-indicator:ITU_A ;
      cex:value ?value .
} 
ORDER BY ?year
Try it

Get the countries in first position for all components

Obtains the countries in first position for all components.

select ?country ?element 
FROM 
where {
 ?country a wf-onto:Country .
 ?sliceRanking wf-onto:ref-year 2013 ;
               qb:observation ?obsRanking ;
               cex:indicator ?element .
 ?element a cex:Component ;
          wf-onto:order ?order .
 ?obsRanking wf-onto:ref-area ?country ;
	     cex:value 1 ;
	     cex:computation [a cex:Ranking] .
}
ORDER BY ?order 
Try it

Get the scores of all countries in 2013

The scores are values between 0 and 100

select distinct ?country ?code3 ?score where {
 ?country a wf-onto:Country ;
    rdfs:label ?countryName ;
    wf-onto:has-iso-alpha3-code ?code3 .
 ?obs wf-onto:ref-area ?country ;
      wf-onto:ref-year 2013 ;
      cex:indicator wi-index:index ;
      cex:computation [ a cex:Score ] ;
      cex:value ?score .
}
order by asc(?code3)
Try it