Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Helmer Belbo
vsop
Commits
7b1a34cc
Commit
7b1a34cc
authored
Mar 27, 2020
by
Helmer Belbo
Browse files
Adding KPI table to the playground
parent
cff92490
Changes
1
Hide whitespace changes
Inline
Side-by-side
data-raw/DATASET.R
View file @
7b1a34cc
...
...
@@ -149,4 +149,21 @@ no.regiontabell.kmn = function(){
regref_fylke
<-
no.regiontabell.flk
()
regref_kommune
<-
no.regiontabell.kmn
()
usethis
::
use_data
(
regref_kommune
,
regref_fylke
,
overwrite
=
T
)
## KPI
#metadt <- PxWebApiData::ApiData("http://data.ssb.no/api/v0/no/table/08981", returnMetaData = TRUE)
#metadt <- PxWebApiData::ApiData("http://data.ssb.no/api/v0/no/table/03014", returnMetaData = TRUE)
pxdt_t03014
<-
PxWebApiData
::
ApiData
(
"http://data.ssb.no/api/v0/no/table/03014"
,
Konsumgrp
=
"TOTAL"
,
Tid
=
T
,
ContentsCode
=
"KpiAar"
)
kpi_t03014
<-
dplyr
::
as.tbl
(
pxdt_t03014
[[
1
]])
%>%
dplyr
::
select
(
.
,
-
konsumgruppe
,
-
statistikkvariabel
)
%>%
dplyr
::
rename
(
.
,
kpi
=
value
)
usethis
::
use_data
(
regref_kommune
,
regref_fylke
,
kpi_t03014
,
overwrite
=
T
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment