https://data.ssb.no/api/pxwebapi/v2-beta/tables/03013/data?lang=no&valueCodes[Konsumgrp]=TOTAL&valueCodes[ContentsCode]=KpiIndMnd&valueCodes[Tid]=2023M04&codelist[Konsumgrp]=vs_CoiCop2016niva1&outputformat=px
This is an API-call to the next version of PxWebApi. It doesn't like Norwegian characters in the VALUES fields it seems. Saving this to example.px, and running the example command in the documentation gives me this result:
> x <- px(input = "example.px")
Error: px object: values cannot contain quotation marks
> Sys.getlocale("LC_CTYPE")
[1] "nb_NO.UTF-8"
Looking at this function which I guess it's called when reading av PX-file:
|
px_from_px_file <- function(path) { |
There doesn't seem to be any explicit setting of encoding hints when reading a PX-file. (this is just based on a very quick look at the source code, so I might be wrong).
https://data.ssb.no/api/pxwebapi/v2-beta/tables/03013/data?lang=no&valueCodes[Konsumgrp]=TOTAL&valueCodes[ContentsCode]=KpiIndMnd&valueCodes[Tid]=2023M04&codelist[Konsumgrp]=vs_CoiCop2016niva1&outputformat=px
This is an API-call to the next version of PxWebApi. It doesn't like Norwegian characters in the VALUES fields it seems. Saving this to example.px, and running the example command in the documentation gives me this result:
> x <- px(input = "example.px")Error: px object: values cannot contain quotation marks> Sys.getlocale("LC_CTYPE")[1] "nb_NO.UTF-8"Looking at this function which I guess it's called when reading av PX-file:
pxmake/R/px_file.R
Line 208 in 4c57906
There doesn't seem to be any explicit setting of encoding hints when reading a PX-file. (this is just based on a very quick look at the source code, so I might be wrong).