
Here’s an example that fetches our dataset from Wikidata and renders it as a line graph, when this web page is loaded into your web browser:Ĭoncerns, next steps, alternative approaches. Visualisations based on the upload dataset can be embedded into web pages quite easily. As an example, I edited the Wikipedia article Council areas of Scotland to insert into its main table, the new column “ Number of people (latest estimate)” whose values are pulled (each time the page is rendered) directly from the data that I uploaded into Wikidata: The uploaded dataset can be pulled ( de-referenced) into Wikipedia articles quite easily. Unfortunately QuickStatements does not yet support a means to set the rank of a statement so I had to individually edit the 32 council area pages to mark, in each, its 2019 population value as the Preferred rank population value …indicating that it is the most up-to-date population value.īut, is having this dataset in Wikidata useful? 2232 edits were executed against Wikidata through QuickStatements (taking about 30 mins). SPARQL is used to pull data from both Wikidata and the data is compared and the QuickStatements tool is used to help automate the creation and modification of Wikidata records. This executable notebook steps through the nitty-gritty of doing that. There is interest in “ per council area” and “ per citizen“ waste data so I thought that I’d start by uploading into Wikidata, a dataset that describes the populations per Scottish council area per year (source: the Population Estimates data cube at ). Would having such datasets in Wikidata, be useful? amounts of waste generated & recycled per Scottish council area, ‘carbon impact’ figures) into Wikidata. It was an interesting session and it got me thinking about how we might upload some our datasets of interest (e.g. Graph ( graph-data= "aphData" active-item= "ctrl.activeItem" mode= "ctrl.mode" size-log-scale= "ctrl.A week ago, I attended Ian Watt‘s workshop on Wikidata at the Scottish Open Data Unconference 2020.
#Wikidata graph builder example code
footer The source code released under # at #. | Wikidata Graph Builder requires JavaScript to be enabled Md-content ( ng-hide= "ctrl.showSvg & ctrl.wdqs" md-scroll-y layout-padding ) Md-progress-linear ( md-mode= "query" ng-show= "ctrl.isLoading" ) Md-button ( ng-click= "ctrl.list()" ng-disabled= "!(ctrl.validate() & (ctrl.mode = 'forward' || ctrl.mode = 'reverse'))" ) Wikidata generic tree Md-button ( ng-click= "ctrl.query()" ng-disabled= "!ctrl.validate()" ) Wikidata Query Service - md-checkbox(ng-model="ctrl.size_log_scale") Log10 Sizeĭiv ( layout= "row" style= "margin: 9px 4px 9px 0" ) - md-checkbox(ng-model="ctrl.size_recursive") Recursive Size +propertyField( "ctrl.size_property", "Size Property") Input ( ng-model= "ctrl.limit" type= "number" value= "0" min= "0" size= "2" ) Input ( ng-model= "erations" type= "number" value= "0" min= "0" ) +propertyField( "ctrl.property", "Traversal Property") Textarea ( ng-model= "ctrl.wdqs" ng-show= "ctrl.mode = 'wdqs'" ng-focus= "wdqs_edit = true" ng-blur= "wdqs_edit = false" ) query

Input ( ng-model= "ctrl.lang" type= "text" placeholder= "?" size= "4" ) Md-input-container ( flex ng-show= "ctrl.mode != 'wdqs'" ) Md-menu-class= "autocomplete-header-template" Md-items= "item in emSearch(" + ob + "Text)"
