Connecting Wikidata to Power BI using R

4958 Views
DataKnowledge
Advocate I
Advocate I

Connecting Wikidata to Power BI using R

ShipwrecksPBI.png

Description

Provides the ability to run a query written for Wikidata and create a dataset from the output for import into Power BI. 

Example

Taking Wikidata relating to the location of where ships were wrecked off the coast of Scotland UK and plotting these locations on a map provided by esri which shows oil & gas licencing blocks on the UK Continental Shelf. This provides an example of how easy it can be to combine two different resources into one map. 

Note:  This report has been created purely to demonstrate how datasets from distinct providers can be combined on a map. The accuracy of the underlying data has not been checked by the report owner. Also note that the locations are where the ships were wrecked, it does not mean that the ships are still there today.

 

Prerequisite

  • R required to be installed on local computer along with required R package.
  • In Power BI ensure 'R scripting' is set up in 'Options'

Required R package

WikidataQueryServiceR

 

R code used in example 

Shipwrecks R code.png

Disclaimers: 

The pbix file attached contains third party data and third party resources.  Their terms of service and licensing requirements should be respected and compiled with. 

 

Pauline Cairns

avatar user