You can add the RenewMap turbine database to a PowerBI report
Check the API docs
You will need an API key to get started.
Check the Getting Started page for instructions.
Using the GUI
You can add RenewMap API endpoints to a PowerBI project through the user interface. In a new PowerBI project, select Get data >> Web >> Advanced
Enter the following details, replacing <YOUR_API_KEY> with the key you generated from map.renewmap.com.au. These parameters will return the first 10,000 turbines in the RenewMap database. Check the documentation for details regarding these parameters.
There are around 30,000 turbines in total. To get the full set in PowerBI, you must use a query in PowerQuery.
PowerQuery
Power Query uses the M formula language to construct data operations
Using a query allows you to customise the data connection and table structure to a greater degree. In PowerBI, go to Get data >> Blank query, and paste the code snippet below into the script. Replace <YOUR_API_KEY> with the key that you generate from map.renewmap.com.au.
To edit an existing query, select Transform data in PowerBI, then select your query. You can use the Power Query interface to apply transformations, or open Advanced Editor to edit the query code directly.
In this example, we run three queries to return three tranches of 10,000 turbines from the database. All tranches are then combined into one table.
let
// get first tranch of turbines (10,000 max)
Source1 = Json.Document(Web.Contents("https://api.renewmap.com.au/api/v1/turbines?limit=10000", [Headers=[acccept="application/json", Authorization="Bearer <YOUR_API_KEY>"]])),
// get second tranch of turbines (offset = 10,000)
Source2 = Json.Document(Web.Contents("https://api.renewmap.com.au/api/v1/turbines?limit=10000&offset=10000", [Headers=[acccept="application/json", Authorization="Bearer <YOUR_API_KEY>"]])),
// get third tranch of turbines (offset = 20,000)
Source3 = Json.Document(Web.Contents("https://api.renewmap.com.au/api/v1/turbines?limit=10000&offset=20000", [Headers=[acccept="application/json", Authorization="Bearer <YOUR_API_KEY>"]])),
// create table from combined json records
#"Converted to Table" = Table.FromRecords({Source1, Source2, Source3}),
#"Expanded turbines" = Table.ExpandListColumn(#"Converted to Table", "turbines"),
#"Expanded turbines1" = Table.ExpandRecordColumn(#"Expanded turbines", "turbines", {"project_id", "project_name", "mw", "oem", "hub_height", "rotor_diameter", "rotor_tip_height", "model", "point"}, {"project_id", "project_name", "mw", "oem", "hub_height", "rotor_diameter", "rotor_tip_height", "model", "point"}),
// split lat and long points
#"Split Column" = Table.SplitColumn(#"Expanded turbines1", "point", each _, {"point.0", "point.1"}),
#"Changed Type" = Table.TransformColumnTypes(#"Split Column",{{"project_id", type text}, {"project_name", type text}, {"mw", type any}, {"oem", type text}, {"hub_height", type any}, {"rotor_diameter", type any}, {"rotor_tip_height", type any}, {"model", type text}, {"point.0", type number}, {"point.1", type number}}),
#"Extracted Values" = Table.TransformColumns( #"Changed Type" , {
{"hub_height", each if _ = null then "" else Text.Combine(List.Transform(_, Text.From), ","), type text},
{"rotor_diameter", each if _ = null then "" else Text.Combine(List.Transform(_, Text.From), ","), type text},
{"rotor_tip_height", each if _ = null then "" else Text.Combine(List.Transform(_, Text.From), ","), type text},
{"mw", each if _ = null then "" else Text.Combine(List.Transform(_, Text.From), ","), type text}
})
in
#"Extracted Values"
Set the name of the query to Turbines
, then select Done, and then Close & Apply.
You now have a table Turbines
with all 30,000+ turbine records.