TabularData#
- class wikibaseintegrator.datatypes.tabulardata.TabularData(value=None, **kwargs)[source]#
Bases:
BaseDataTypeImplements the Wikibase data type ‘tabular-data’
Constructor, calls the superclass BaseDataType
- Parameters:
value (
str|None, default:None) – Reference to tabular data file on Wikimedia Commons.
- from_sparql_value(sparql_value)[source]#
Parse data returned by a SPARQL endpoint and set the value to the object
The RDF representation is the full Wikimedia Commons URL of the file (e.g. http://commons.wikimedia.org/data/main/Data:Population+FR+Q1657686.tab), only the page title is kept.
- get_sparql_value(**kwargs)[source]#
The IRI of the value in the RDF export: the URL of the page on Wikimedia Commons, with the page title encoded like MediaWiki’s wfUrlencode() (a space is a ‘+’, ‘:’ and ‘/’ are kept), e.g. <http://commons.wikimedia.org/data/main/Data:Paris.map>
- DTYPE = 'tabular-data'#
- PTYPE = 'http://wikiba.se/ontology#TabularData'#
- SPARQL_IRI_PREFIX = 'http://commons.wikimedia.org/data/main/'#