You can add RenewMap network infrastructure data to a PowerBI report.
Check the API docs
https://renewmap.readme.io/reference/get-a-list-of-network-infra
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 1000 network infrastructure items from the RenewMap database. Check the documentation for details regarding these parameters.
There are 3,000+ network items 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 1,000 network infrastructure items from the database. All tranches are then combined into one table.
let
// get first tranch of network items (1,000 max)
Source1 = Json.Document(Web.Contents("https://api.renewmap.com.au/api/v1/network?limit=1000", [Headers=[acccept="application/json", Authorization="Bearer <YOUR_API_KEY>"]])),
// get second tranch of network items (offset = 1,000)
Source2 = Json.Document(Web.Contents("https://api.renewmap.com.au/api/v1/network?limit=1000&offset=1000", [Headers=[acccept="application/json", Authorization="Bearer <YOUR_API_KEY>"]])),
// get third tranch of network items (offset = 2,000)
Source3 = Json.Document(Web.Contents("https://api.renewmap.com.au/api/v1/network?limit=1000&offset=2000", [Headers=[acccept="application/json", Authorization="Bearer <YOUR_API_KEY>"]])),
// get fourth tranch of network items (offset = 3,000)
Source4 = Json.Document(Web.Contents("https://api.renewmap.com.au/api/v1/network?limit=1000&offset=3000", [Headers=[acccept="application/json", Authorization="Bearer <YOUR_API_KEY>"]])),
// create table from combined json records
#"Converted to Table" = Table.FromRecords({Source1, Source2, Source3, Source4}),
#"Expanded network" = Table.ExpandListColumn(#"Converted to Table", "network"),
#"Expanded network1" = Table.ExpandRecordColumn(#"Expanded network", "network", {"id", "infrastructure_name", "line_id", "infrastructure_status", "description", "voltage", "construction_type", "state", "country", "network", "operator", "source_text", "geometry"}, {"id", "infrastructure_name", "line_id", "infrastructure_status", "description", "voltage", "construction_type", "state", "country", "network", "operator", "source_text", "geometry"}),
#"Expanded network.geometry" = Table.ExpandRecordColumn(#"Expanded network1", "geometry", {"type", "coordinates"}, {"geometry.type", "geometry.coordinates"}),
#"Expanded network.geometry.coordinates" = Table.ExpandListColumn(#"Expanded network.geometry", "geometry.coordinates"),
#"Changed Type" = Table.TransformColumnTypes(#"Expanded network.geometry.coordinates",{{"id", type text}, {"infrastructure_name", type text}, {"line_id", type text}, {"infrastructure_status", type text}, {"description", type text}, {"voltage", Int64.Type}, {"construction_type", type text}, {"state", type text}, {"country", type text}, {"network", type text}, {"operator", type text}, {"source_text", type text}, {"geometry.type", type text}, {"geometry.coordinates", type any}})
in
#"Changed Type"
Set the name of the query to Network Infrastructure
, then select Done, and then Close & Apply.
You now have a table Network Infrastructure
with all 3,000+ turbine records.