Connecting to the NOMIS API in PowerBI

Office for National Statistics
Office for National StatisticsOffice for National Statistics

This guide was prepared by Suffolk County Council to support others in constructing their dashboards, using the NOMIS API through PowerBI.

Public Health & Communities Analytics | Suffolk County Council | Version 1.2 (September 2023)
phc_analytics@suffolk.gov.uk
Connecting to the NOMIS API in Power BI
Introduction
Using the NOMIS API allows data to be updated automatically when the dataset is refreshed
in the Power BI Service or Power BI Desktop. The method described in this guide was initially
created with assistance from colleagues at Norfolk County Council.
Using the NOMIS website to get queries
Queries are compiled using the NOMIS website. This allows you to select variables of
interest and set parameters for data to download. Once you have made your selections,
choose the NOMIS API data format.
Click Download Data. From this screen, right-click on Link (data.csv) and copy this link.
Public Health & Communities Analytics | Suffolk County Council | Version 1.2 (September 2023)
phc_analytics@suffolk.gov.uk
This link will be used as a query in Power BI Desktop to connect to the API. No API key is
required.
Using NOMIS queries in Power BI
In Power BI desktop, click ‘Get data’ then select the ‘Web’ source. Paste the copied URL (this
is known as the Query to the API) from the NOMIS website and click OK. Click Transform
data from the Preview window.
Once the query has been added, you may wish to use the formula bar or advanced editor to
remove the date parameter. This means your query will return data for all available dates.
To use Advanced Editor, click on the Home tab, then Advanced Editor.
Remove the part of the query that contains the word date. Delete everything from the start
of the word ‘date’ to the following ampersand (&). For example, in the query below, the text
highlighted in red would be deleted.
https://www.nomisweb.co.uk/api/v01/dataset/NM_17_5.data.csv?geography=1853882369
...1853882372,1853882374...1853882379&date=latest&variable=18,45,248,249,84,83,111,1
Public Health & Communities Analytics | Suffolk County Council | Version 1.2 (September 2023)
phc_analytics@suffolk.gov.uk
487,1488,27,54,250,251,93,92,120,1489,1490,36,63,252,253,102,101,129,1491,1492,1532..
.1540,594,820,841,290,720...722,335,344&measures=20599,21001,21002,21003
If asked which credentials to use for this data source, select Anonymous credentials and
Public privacy level.
Transforming data for use in the report
To use the data to build reports in Power BI Desktop, transformations will need to be
applied. From the Transform tab, select Use first row as headers. Now that each column is
correctly labelled, only keep the columns that are required. This is good practice as it
reduces the size of the dataset. From the Home tab, click Choose Columns. The columns
that will usually be required are:
• DATE
• DATE_NAME
• GEOGRAPHY_NAME
• GEOGRAPHY_CODE
• GEOGRAPHY_TYPE
• VARIABLE_NAME
• VARIABLE_SORTORDER
• MEASURES_NAME
• OBS_VALUE
Next, pivot the MEASURES_NAME column to obtain a separate column for each measure.
That is, a column for the numerator, denominator and percentage (where applicable). Click
the MEASURES_NAME column, then click Pivot Column from the Transform tab. The values
column is OBS_VALUE. Under the Advanced options, select Don’t Aggregate for the
Aggregate Value Function.
Public Health & Communities Analytics | Suffolk County Council | Version 1.2 (September 2023)
phc_analytics@suffolk.gov.uk
The MEASURES_NAME and OBS_VALUE columns of the table should have been replaced by
columns in the format below:
Further recommended transformations on this data (not detailed here) are:
• Renaming columns as appropriate.
• Changing data types for each column as appropriate.
• Dividing values in the Variable column by 100 to get data as a percentage.
Refreshing data
Queries to the NOMIS API will return the latest available data whenever they are refreshed.
This can include scheduled dataset refreshes in the Power BI service. When NOMIS are
updating the data in the API, the query will fail and any Power BI dataset including a query
to the NOMIS API refreshed during this period will fail. This is usually a temporary issue that
will be automatically resolved once NOMIS have finished updating the data in the API.
More information
https://www.nomisweb.co.uk/api/v01/help

Recomendados

Connecting to the StatXplore API in PowerBI por
Connecting to the StatXplore API in PowerBIConnecting to the StatXplore API in PowerBI
Connecting to the StatXplore API in PowerBIOffice for National Statistics
98 vistas22 diapositivas
Power bi components por
Power bi components Power bi components
Power bi components Rajasekhar Kolla
310 vistas9 diapositivas
ONS Local presents Suffolk County Council's Cost of Living Dashboard por
ONS Local presents Suffolk County Council's Cost of Living DashboardONS Local presents Suffolk County Council's Cost of Living Dashboard
ONS Local presents Suffolk County Council's Cost of Living DashboardOffice for National Statistics
175 vistas17 diapositivas
DBpedia InsideOut por
DBpedia InsideOutDBpedia InsideOut
DBpedia InsideOutCristina Pattuelli
1.7K vistas64 diapositivas
Building a Dashboard in an hour with Power Pivot and Power BI por
Building a Dashboard in an hour with Power Pivot and Power BIBuilding a Dashboard in an hour with Power Pivot and Power BI
Building a Dashboard in an hour with Power Pivot and Power BINR Computer Learning Center
689 vistas37 diapositivas
BPEL, BPEL vs ESB (Integration) por
BPEL, BPEL vs ESB (Integration)BPEL, BPEL vs ESB (Integration)
BPEL, BPEL vs ESB (Integration)ejlp12
4.2K vistas59 diapositivas

Más contenido relacionado

La actualidad más candente

Power BI Zero to Hero by Rajat Jaiswal por
Power BI Zero to Hero by Rajat JaiswalPower BI Zero to Hero by Rajat Jaiswal
Power BI Zero to Hero by Rajat JaiswalIndiandotnet
698 vistas21 diapositivas
Power BI for CEO por
Power BI for CEOPower BI for CEO
Power BI for CEOVishal Pawar
6K vistas15 diapositivas
ONS Local and Data Science Community Workshop 1: How to use APIs por
ONS Local and Data Science Community Workshop 1: How to use APIsONS Local and Data Science Community Workshop 1: How to use APIs
ONS Local and Data Science Community Workshop 1: How to use APIsOffice for National Statistics
119 vistas12 diapositivas
The Relational Database Model por
The Relational Database ModelThe Relational Database Model
The Relational Database ModelShishir Aryal
462 vistas21 diapositivas
Database Management Systems 4 - Normalization por
Database Management Systems 4 - NormalizationDatabase Management Systems 4 - Normalization
Database Management Systems 4 - NormalizationNickkisha Farrell
6.5K vistas20 diapositivas
Power BI Advance Modeling por
Power BI Advance ModelingPower BI Advance Modeling
Power BI Advance ModelingCCG
598 vistas121 diapositivas

La actualidad más candente(20)

Power BI Zero to Hero by Rajat Jaiswal por Indiandotnet
Power BI Zero to Hero by Rajat JaiswalPower BI Zero to Hero by Rajat Jaiswal
Power BI Zero to Hero by Rajat Jaiswal
Indiandotnet698 vistas
The Relational Database Model por Shishir Aryal
The Relational Database ModelThe Relational Database Model
The Relational Database Model
Shishir Aryal462 vistas
Database Management Systems 4 - Normalization por Nickkisha Farrell
Database Management Systems 4 - NormalizationDatabase Management Systems 4 - Normalization
Database Management Systems 4 - Normalization
Nickkisha Farrell6.5K vistas
Power BI Advance Modeling por CCG
Power BI Advance ModelingPower BI Advance Modeling
Power BI Advance Modeling
CCG598 vistas
RDA and Editing Bibliographic Records por Shana McDanold
RDA and Editing Bibliographic RecordsRDA and Editing Bibliographic Records
RDA and Editing Bibliographic Records
Shana McDanold2.4K vistas
What Is Power BI? | Introduction To Microsoft Power BI | Power BI Training | ... por Edureka!
What Is Power BI? | Introduction To Microsoft Power BI | Power BI Training | ...What Is Power BI? | Introduction To Microsoft Power BI | Power BI Training | ...
What Is Power BI? | Introduction To Microsoft Power BI | Power BI Training | ...
Edureka!1.7K vistas
Introduction of DBMS por YouQue ™
Introduction of DBMSIntroduction of DBMS
Introduction of DBMS
YouQue ™884 vistas
ER DIAGRAM TO RELATIONAL SCHEMA MAPPING por ARADHYAYANA
ER DIAGRAM TO RELATIONAL SCHEMA MAPPING ER DIAGRAM TO RELATIONAL SCHEMA MAPPING
ER DIAGRAM TO RELATIONAL SCHEMA MAPPING
ARADHYAYANA226.7K vistas
Introduction to Power BI por HARIHARAN R
Introduction to Power BIIntroduction to Power BI
Introduction to Power BI
HARIHARAN R2.2K vistas
Functional dependencies and normalization por daxesh chauhan
Functional dependencies and normalizationFunctional dependencies and normalization
Functional dependencies and normalization
daxesh chauhan7.2K vistas
Database Management System por FellowBuddy.com
Database Management System Database Management System
Database Management System
FellowBuddy.com1.9K vistas
Power BI Tutorial For Beginners | Power BI Tutorial | Power BI Demo | Power B... por Edureka!
Power BI Tutorial For Beginners | Power BI Tutorial | Power BI Demo | Power B...Power BI Tutorial For Beginners | Power BI Tutorial | Power BI Demo | Power B...
Power BI Tutorial For Beginners | Power BI Tutorial | Power BI Demo | Power B...
Edureka!1K vistas
What is Power BI por Naseeba P P
What is Power BIWhat is Power BI
What is Power BI
Naseeba P P352 vistas
MSBI Classroom Training with Realtime Project por SequelGate
MSBI Classroom Training with Realtime ProjectMSBI Classroom Training with Realtime Project
MSBI Classroom Training with Realtime Project
SequelGate162 vistas
Microsoft Power BI por Geetika
Microsoft Power BIMicrosoft Power BI
Microsoft Power BI
Geetika 542 vistas
ER model to Relational model mapping por Shubham Saini
ER model to Relational model mappingER model to Relational model mapping
ER model to Relational model mapping
Shubham Saini42.1K vistas

Similar a Connecting to the NOMIS API in PowerBI

Developing a ssrs report using a ssas data source por
Developing a ssrs report using a ssas data sourceDeveloping a ssrs report using a ssas data source
Developing a ssrs report using a ssas data sourcerelekarsushant
3.6K vistas32 diapositivas
JKJ_SSRS PPS Excel Services Project.Documentation por
JKJ_SSRS PPS Excel Services Project.DocumentationJKJ_SSRS PPS Excel Services Project.Documentation
JKJ_SSRS PPS Excel Services Project.DocumentationJeff Jacob
373 vistas31 diapositivas
William Schaffrans Bus Intelligence Portfolio por
William Schaffrans Bus Intelligence PortfolioWilliam Schaffrans Bus Intelligence Portfolio
William Schaffrans Bus Intelligence Portfoliowschaffr
241 vistas35 diapositivas
SSRS 2008 R2 por
SSRS 2008 R2SSRS 2008 R2
SSRS 2008 R2tomerl
2.5K vistas26 diapositivas
Informatica PowerAnalyzer 4.0 1 of 3 por
Informatica PowerAnalyzer 4.0 1 of 3Informatica PowerAnalyzer 4.0 1 of 3
Informatica PowerAnalyzer 4.0 1 of 3ganblues
2K vistas59 diapositivas
Oracle-Whitepaper-Optimizer-with-Oracle-Database-12c.pdf por
Oracle-Whitepaper-Optimizer-with-Oracle-Database-12c.pdfOracle-Whitepaper-Optimizer-with-Oracle-Database-12c.pdf
Oracle-Whitepaper-Optimizer-with-Oracle-Database-12c.pdfDetchDuvanGaelaCamar
2 vistas38 diapositivas

Similar a Connecting to the NOMIS API in PowerBI(20)

Developing a ssrs report using a ssas data source por relekarsushant
Developing a ssrs report using a ssas data sourceDeveloping a ssrs report using a ssas data source
Developing a ssrs report using a ssas data source
relekarsushant3.6K vistas
JKJ_SSRS PPS Excel Services Project.Documentation por Jeff Jacob
JKJ_SSRS PPS Excel Services Project.DocumentationJKJ_SSRS PPS Excel Services Project.Documentation
JKJ_SSRS PPS Excel Services Project.Documentation
Jeff Jacob373 vistas
William Schaffrans Bus Intelligence Portfolio por wschaffr
William Schaffrans Bus Intelligence PortfolioWilliam Schaffrans Bus Intelligence Portfolio
William Schaffrans Bus Intelligence Portfolio
wschaffr241 vistas
SSRS 2008 R2 por tomerl
SSRS 2008 R2SSRS 2008 R2
SSRS 2008 R2
tomerl2.5K vistas
Informatica PowerAnalyzer 4.0 1 of 3 por ganblues
Informatica PowerAnalyzer 4.0 1 of 3Informatica PowerAnalyzer 4.0 1 of 3
Informatica PowerAnalyzer 4.0 1 of 3
ganblues2K vistas
MS Bi Portfolio Gregory Lee por keeperx99
MS Bi Portfolio Gregory LeeMS Bi Portfolio Gregory Lee
MS Bi Portfolio Gregory Lee
keeperx99355 vistas
Ssis Ssas Ssrs Sp Pps Hong Bing Li por Hong-Bing Li
Ssis Ssas Ssrs Sp Pps Hong Bing LiSsis Ssas Ssrs Sp Pps Hong Bing Li
Ssis Ssas Ssrs Sp Pps Hong Bing Li
Hong-Bing Li949 vistas
ETL Microsoft Material por Ahmed Hashem
ETL Microsoft MaterialETL Microsoft Material
ETL Microsoft Material
Ahmed Hashem86 vistas
SSIS_SSRS_PPS_SP_SSAS_Hong_Bing Li por Hong-Bing Li
SSIS_SSRS_PPS_SP_SSAS_Hong_Bing LiSSIS_SSRS_PPS_SP_SSAS_Hong_Bing Li
SSIS_SSRS_PPS_SP_SSAS_Hong_Bing Li
Hong-Bing Li274 vistas
C:\fakepath\ssis ssas sssrs_pps_hong_bingli_v2003 por Hong-Bing Li
C:\fakepath\ssis ssas sssrs_pps_hong_bingli_v2003C:\fakepath\ssis ssas sssrs_pps_hong_bingli_v2003
C:\fakepath\ssis ssas sssrs_pps_hong_bingli_v2003
Hong-Bing Li271 vistas
Kevin Fahy Bi Portfolio por KevinPFahy
Kevin Fahy   Bi PortfolioKevin Fahy   Bi Portfolio
Kevin Fahy Bi Portfolio
KevinPFahy488 vistas
Tony Von Gusmann & MS BI por vongusmann
Tony Von Gusmann & MS BITony Von Gusmann & MS BI
Tony Von Gusmann & MS BI
vongusmann691 vistas
Cognos framework manager por maxonlinetr
Cognos framework managerCognos framework manager
Cognos framework manager
maxonlinetr619 vistas
6 bosch rexroth_eng_01 por vanclea2004
6 bosch rexroth_eng_016 bosch rexroth_eng_01
6 bosch rexroth_eng_01
vanclea2004240 vistas
Optimizing Queries over Partitioned Tables in MPP Systems por EMC
Optimizing Queries over Partitioned Tables in MPP SystemsOptimizing Queries over Partitioned Tables in MPP Systems
Optimizing Queries over Partitioned Tables in MPP Systems
EMC1.4K vistas
SSIS_SSAS_SSRS_SP_PPS_HongBingLi por Hong-Bing Li
SSIS_SSAS_SSRS_SP_PPS_HongBingLiSSIS_SSAS_SSRS_SP_PPS_HongBingLi
SSIS_SSAS_SSRS_SP_PPS_HongBingLi
Hong-Bing Li412 vistas
10400_SGF_DDPO_Final_03_21_2016 por Sachin Verma
10400_SGF_DDPO_Final_03_21_201610400_SGF_DDPO_Final_03_21_2016
10400_SGF_DDPO_Final_03_21_2016
Sachin Verma93 vistas
CREATING A DATASET FROM EXCEL IN POWER BI REPORT BUILDER por SagarDuttPhuloria
CREATING A DATASET FROM EXCEL IN POWER BI REPORT BUILDERCREATING A DATASET FROM EXCEL IN POWER BI REPORT BUILDER
CREATING A DATASET FROM EXCEL IN POWER BI REPORT BUILDER
SagarDuttPhuloria152 vistas

Más de Office for National Statistics

SlideShare ONS Economic Forum Slidepack - 13 November 2023 por
SlideShare ONS Economic Forum Slidepack - 13 November 2023SlideShare ONS Economic Forum Slidepack - 13 November 2023
SlideShare ONS Economic Forum Slidepack - 13 November 2023Office for National Statistics
67 vistas40 diapositivas
SlideShare ONS Economic Forum Slidepack - 16 October 2023 por
SlideShare ONS Economic Forum Slidepack - 16 October 2023SlideShare ONS Economic Forum Slidepack - 16 October 2023
SlideShare ONS Economic Forum Slidepack - 16 October 2023Office for National Statistics
8 vistas36 diapositivas
So what does ‘Beyond GDP’ mean for the UK – 12 October 2023 por
So what does ‘Beyond GDP’ mean for the UK – 12 October 2023So what does ‘Beyond GDP’ mean for the UK – 12 October 2023
So what does ‘Beyond GDP’ mean for the UK – 12 October 2023Office for National Statistics
158 vistas37 diapositivas
GDP after 2025: updating national accounts and balance of payments – 11 Octob... por
GDP after 2025: updating national accounts and balance of payments – 11 Octob...GDP after 2025: updating national accounts and balance of payments – 11 Octob...
GDP after 2025: updating national accounts and balance of payments – 11 Octob...Office for National Statistics
145 vistas66 diapositivas
SlideShare Measuring the Economy Slidepack - 29 September 2023 por
SlideShare Measuring the Economy Slidepack - 29 September 2023SlideShare Measuring the Economy Slidepack - 29 September 2023
SlideShare Measuring the Economy Slidepack - 29 September 2023Office for National Statistics
92 vistas23 diapositivas
Why dashboards? por
Why dashboards?Why dashboards?
Why dashboards?Office for National Statistics
7 vistas3 diapositivas

Más de Office for National Statistics(20)

Último

Mrs. Tsitsi Makombe - 2023 ReSAKSS Conference por
Mrs. Tsitsi Makombe - 2023 ReSAKSS Conference Mrs. Tsitsi Makombe - 2023 ReSAKSS Conference
Mrs. Tsitsi Makombe - 2023 ReSAKSS Conference AKADEMIYA2063
6 vistas8 diapositivas
UNiTE- Invest to Prevent Violence against Women & Girls! por
UNiTE- Invest to Prevent Violence against Women & Girls!UNiTE- Invest to Prevent Violence against Women & Girls!
UNiTE- Invest to Prevent Violence against Women & Girls!Christina Parmionova
15 vistas4 diapositivas
AABS project overview por
AABS project overviewAABS project overview
AABS project overviewWorldFish
26 vistas17 diapositivas
Dr Getaw Tadesse - 2023 ReSAKSS Conference .pptx por
Dr Getaw Tadesse - 2023 ReSAKSS Conference .pptxDr Getaw Tadesse - 2023 ReSAKSS Conference .pptx
Dr Getaw Tadesse - 2023 ReSAKSS Conference .pptxAKADEMIYA2063
11 vistas19 diapositivas
Dr Jean Paul Latyr FAYE - 2023 ReSAKSS Conference.pptx por
Dr Jean Paul Latyr FAYE - 2023 ReSAKSS Conference.pptxDr Jean Paul Latyr FAYE - 2023 ReSAKSS Conference.pptx
Dr Jean Paul Latyr FAYE - 2023 ReSAKSS Conference.pptxAKADEMIYA2063
8 vistas24 diapositivas
Mukhya Mantri Gramin Peyjal Nishchay Yojana (MGPNY) – Bihar_Pankaj Kumar_AKRS... por
Mukhya Mantri Gramin Peyjal Nishchay Yojana (MGPNY) – Bihar_Pankaj Kumar_AKRS...Mukhya Mantri Gramin Peyjal Nishchay Yojana (MGPNY) – Bihar_Pankaj Kumar_AKRS...
Mukhya Mantri Gramin Peyjal Nishchay Yojana (MGPNY) – Bihar_Pankaj Kumar_AKRS...India Water Portal
13 vistas15 diapositivas

Último(20)

Mrs. Tsitsi Makombe - 2023 ReSAKSS Conference por AKADEMIYA2063
Mrs. Tsitsi Makombe - 2023 ReSAKSS Conference Mrs. Tsitsi Makombe - 2023 ReSAKSS Conference
Mrs. Tsitsi Makombe - 2023 ReSAKSS Conference
AKADEMIYA20636 vistas
UNiTE- Invest to Prevent Violence against Women & Girls! por Christina Parmionova
UNiTE- Invest to Prevent Violence against Women & Girls!UNiTE- Invest to Prevent Violence against Women & Girls!
UNiTE- Invest to Prevent Violence against Women & Girls!
AABS project overview por WorldFish
AABS project overviewAABS project overview
AABS project overview
WorldFish26 vistas
Dr Getaw Tadesse - 2023 ReSAKSS Conference .pptx por AKADEMIYA2063
Dr Getaw Tadesse - 2023 ReSAKSS Conference .pptxDr Getaw Tadesse - 2023 ReSAKSS Conference .pptx
Dr Getaw Tadesse - 2023 ReSAKSS Conference .pptx
AKADEMIYA206311 vistas
Dr Jean Paul Latyr FAYE - 2023 ReSAKSS Conference.pptx por AKADEMIYA2063
Dr Jean Paul Latyr FAYE - 2023 ReSAKSS Conference.pptxDr Jean Paul Latyr FAYE - 2023 ReSAKSS Conference.pptx
Dr Jean Paul Latyr FAYE - 2023 ReSAKSS Conference.pptx
AKADEMIYA20638 vistas
Mukhya Mantri Gramin Peyjal Nishchay Yojana (MGPNY) – Bihar_Pankaj Kumar_AKRS... por India Water Portal
Mukhya Mantri Gramin Peyjal Nishchay Yojana (MGPNY) – Bihar_Pankaj Kumar_AKRS...Mukhya Mantri Gramin Peyjal Nishchay Yojana (MGPNY) – Bihar_Pankaj Kumar_AKRS...
Mukhya Mantri Gramin Peyjal Nishchay Yojana (MGPNY) – Bihar_Pankaj Kumar_AKRS...
India Water Portal13 vistas
COP 28 GHANA DELEGATES.docx por Kweku Zurek
COP 28 GHANA DELEGATES.docxCOP 28 GHANA DELEGATES.docx
COP 28 GHANA DELEGATES.docx
Kweku Zurek4.3K vistas
Taking care of the elders por SERUDS INDIA
Taking care of the eldersTaking care of the elders
Taking care of the elders
SERUDS INDIA8 vistas
Social behavioural change to drive community ownership_ Divyang Waghela_Tata ... por India Water Portal
Social behavioural change to drive community ownership_ Divyang Waghela_Tata ...Social behavioural change to drive community ownership_ Divyang Waghela_Tata ...
Social behavioural change to drive community ownership_ Divyang Waghela_Tata ...
India Water Portal10 vistas
Dr. Ousmane Badiane - 2023 ReSAKSS Conference.pptx por AKADEMIYA2063
Dr. Ousmane Badiane - 2023 ReSAKSS Conference.pptxDr. Ousmane Badiane - 2023 ReSAKSS Conference.pptx
Dr. Ousmane Badiane - 2023 ReSAKSS Conference.pptx
AKADEMIYA20638 vistas
Support Girl students with Education por SERUDS INDIA
Support Girl students with EducationSupport Girl students with Education
Support Girl students with Education
SERUDS INDIA6 vistas
Case study of Gokarna Multi-village scheme, Kumta, Karnataka_IIM-B_2023.pdf por India Water Portal
Case study of Gokarna Multi-village scheme, Kumta, Karnataka_IIM-B_2023.pdfCase study of Gokarna Multi-village scheme, Kumta, Karnataka_IIM-B_2023.pdf
Case study of Gokarna Multi-village scheme, Kumta, Karnataka_IIM-B_2023.pdf
Taking care for elders por SERUDS INDIA
Taking care for eldersTaking care for elders
Taking care for elders
SERUDS INDIA14 vistas
ΕΚΘΕΣΗ ΚΟΜΙΣΙΟΝ ΓΙΑ ΤΟΥΡΚΙΑ por ssuser9e6212
ΕΚΘΕΣΗ ΚΟΜΙΣΙΟΝ ΓΙΑ ΤΟΥΡΚΙΑΕΚΘΕΣΗ ΚΟΜΙΣΙΟΝ ΓΙΑ ΤΟΥΡΚΙΑ
ΕΚΘΕΣΗ ΚΟΜΙΣΙΟΝ ΓΙΑ ΤΟΥΡΚΙΑ
ssuser9e6212171 vistas
Ms. Julie Collins - 2023 ReSAKSS Conference.pptx por AKADEMIYA2063
Ms. Julie Collins - 2023 ReSAKSS Conference.pptxMs. Julie Collins - 2023 ReSAKSS Conference.pptx
Ms. Julie Collins - 2023 ReSAKSS Conference.pptx
AKADEMIYA206312 vistas

Connecting to the NOMIS API in PowerBI

  • 1. Public Health & Communities Analytics | Suffolk County Council | Version 1.2 (September 2023) phc_analytics@suffolk.gov.uk Connecting to the NOMIS API in Power BI Introduction Using the NOMIS API allows data to be updated automatically when the dataset is refreshed in the Power BI Service or Power BI Desktop. The method described in this guide was initially created with assistance from colleagues at Norfolk County Council. Using the NOMIS website to get queries Queries are compiled using the NOMIS website. This allows you to select variables of interest and set parameters for data to download. Once you have made your selections, choose the NOMIS API data format. Click Download Data. From this screen, right-click on Link (data.csv) and copy this link.
  • 2. Public Health & Communities Analytics | Suffolk County Council | Version 1.2 (September 2023) phc_analytics@suffolk.gov.uk This link will be used as a query in Power BI Desktop to connect to the API. No API key is required. Using NOMIS queries in Power BI In Power BI desktop, click ‘Get data’ then select the ‘Web’ source. Paste the copied URL (this is known as the Query to the API) from the NOMIS website and click OK. Click Transform data from the Preview window. Once the query has been added, you may wish to use the formula bar or advanced editor to remove the date parameter. This means your query will return data for all available dates. To use Advanced Editor, click on the Home tab, then Advanced Editor. Remove the part of the query that contains the word date. Delete everything from the start of the word ‘date’ to the following ampersand (&). For example, in the query below, the text highlighted in red would be deleted. https://www.nomisweb.co.uk/api/v01/dataset/NM_17_5.data.csv?geography=1853882369 ...1853882372,1853882374...1853882379&date=latest&variable=18,45,248,249,84,83,111,1
  • 3. Public Health & Communities Analytics | Suffolk County Council | Version 1.2 (September 2023) phc_analytics@suffolk.gov.uk 487,1488,27,54,250,251,93,92,120,1489,1490,36,63,252,253,102,101,129,1491,1492,1532.. .1540,594,820,841,290,720...722,335,344&measures=20599,21001,21002,21003 If asked which credentials to use for this data source, select Anonymous credentials and Public privacy level. Transforming data for use in the report To use the data to build reports in Power BI Desktop, transformations will need to be applied. From the Transform tab, select Use first row as headers. Now that each column is correctly labelled, only keep the columns that are required. This is good practice as it reduces the size of the dataset. From the Home tab, click Choose Columns. The columns that will usually be required are: • DATE • DATE_NAME • GEOGRAPHY_NAME • GEOGRAPHY_CODE • GEOGRAPHY_TYPE • VARIABLE_NAME • VARIABLE_SORTORDER • MEASURES_NAME • OBS_VALUE Next, pivot the MEASURES_NAME column to obtain a separate column for each measure. That is, a column for the numerator, denominator and percentage (where applicable). Click the MEASURES_NAME column, then click Pivot Column from the Transform tab. The values column is OBS_VALUE. Under the Advanced options, select Don’t Aggregate for the Aggregate Value Function.
  • 4. Public Health & Communities Analytics | Suffolk County Council | Version 1.2 (September 2023) phc_analytics@suffolk.gov.uk The MEASURES_NAME and OBS_VALUE columns of the table should have been replaced by columns in the format below: Further recommended transformations on this data (not detailed here) are: • Renaming columns as appropriate. • Changing data types for each column as appropriate. • Dividing values in the Variable column by 100 to get data as a percentage. Refreshing data Queries to the NOMIS API will return the latest available data whenever they are refreshed. This can include scheduled dataset refreshes in the Power BI service. When NOMIS are updating the data in the API, the query will fail and any Power BI dataset including a query to the NOMIS API refreshed during this period will fail. This is usually a temporary issue that will be automatically resolved once NOMIS have finished updating the data in the API. More information https://www.nomisweb.co.uk/api/v01/help