Links
diff --git a/pkgdown.yml b/pkgdown.yml
index c7655775..00e742ea 100644
--- a/pkgdown.yml
+++ b/pkgdown.yml
@@ -3,7 +3,7 @@ pkgdown: 2.0.7
pkgdown_sha: ~
articles:
pxweb: pxweb.html
-last_built: 2024-01-28T12:58Z
+last_built: 2024-02-12T14:53Z
urls:
reference: https://ropengov.github.io/pxweb/reference
article: https://ropengov.github.io/pxweb/articles
diff --git a/search.json b/search.json
index a715d1cc..daf51c23 100644
--- a/search.json
+++ b/search.json
@@ -1 +1 @@
-[{"path":[]},{"path":"https://ropengov.github.io/pxweb/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"interest fostering open welcoming environment, contributors maintainers pledge making participation project community harassment-free experience everyone, regardless age, body size, disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, religion, sexual identity orientation.","code":""},{"path":"https://ropengov.github.io/pxweb/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes creating positive environment include: Using welcoming inclusive language respectful differing viewpoints experiences Gracefully accepting constructive criticism Focusing best community Showing empathy towards community members Examples unacceptable behavior participants include: use sexualized language imagery unwelcome sexual attention advances Trolling, insulting/derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical electronic address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://ropengov.github.io/pxweb/CODE_OF_CONDUCT.html","id":"our-responsibilities","dir":"","previous_headings":"","what":"Our Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Project maintainers responsible clarifying standards acceptable behavior expected take appropriate fair corrective action response instances unacceptable behavior. Project maintainers right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, ban temporarily permanently contributor behaviors deem inappropriate, threatening, offensive, harmful.","code":""},{"path":"https://ropengov.github.io/pxweb/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within project spaces public spaces individual representing project community. Examples representing project community include using official project e-mail address, posting via official social media account, acting appointed representative online offline event. Representation project may defined clarified project maintainers.","code":""},{"path":"https://ropengov.github.io/pxweb/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported contacting project team . complaints reviewed investigated result response deemed necessary appropriate circumstances. project team obligated maintain confidentiality regard reporter incident. details specific enforcement policies may posted separately. Project maintainers follow enforce Code Conduct good faith may face temporary permanent repercussions determined members project’s leadership.","code":""},{"path":"https://ropengov.github.io/pxweb/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 1.4, available https://www.contributor-covenant.org/version/1/4/code--conduct.html answers common questions code conduct, see https://www.contributor-covenant.org/faq","code":""},{"path":"https://ropengov.github.io/pxweb/CONTRIBUTING.html","id":null,"dir":"","previous_headings":"","what":"Contributing to pxweb R packge","title":"Contributing to pxweb R packge","text":"welcome contact us: Submit suggestions bug reports (provide output sessionInfo() packageVersion(\"pxweb\")) Send pull request Star us Github page Join discussion Gitter","code":""},{"path":"https://ropengov.github.io/pxweb/CONTRIBUTING.html","id":"acknowledgements","dir":"","previous_headings":"","what":"Acknowledgements","title":"Contributing to pxweb R packge","text":"Kindly cite work follows: Måns Magnusson, Markus Kainu, Janne Huovari, Leo Lahti. Retrieval analysis PC Axis data pxweb package. R package version r sessionInfo()$otherPkgs$pxweb$Version. URL: http://ropengov.github.io/pxweb grateful contributors! project part rOpenGov.","code":""},{"path":[]},{"path":[]},{"path":"https://ropengov.github.io/pxweb/TROUBLESHOOTING.html","id":"date-added","dir":"","previous_headings":"Encoding errors on Windows","what":"Date added:","title":"Troubleshooting pxweb R package","text":"2021-07-07","code":""},{"path":"https://ropengov.github.io/pxweb/TROUBLESHOOTING.html","id":"versions","dir":"","previous_headings":"Encoding errors on Windows","what":"Versions","title":"Troubleshooting pxweb R package","text":"problem exist pxweb version 0.10 +. problem Windows.","code":""},{"path":"https://ropengov.github.io/pxweb/TROUBLESHOOTING.html","id":"description","dir":"","previous_headings":"Encoding errors on Windows","what":"Description","title":"Troubleshooting pxweb R package","text":"windows, letters encoded correctly. example, R Rstudio UTF-8 coding preserved assignment. instance: means UTF-8 encoding used query explicitly, package find variable name hence return something like:","code":"x <- \"ČETRTLETJE\" x [1] \"CETRTLETJE\" Assertion on 'pxweb_query_variable_code' failed: Must be element of set {'KOHEZIJSKA REGIJA','DRŽAVA ROJSTVA','SPOL','CETRTLETJE','MERITVE'}, but is 'CETRTLETJE'."},{"path":"https://ropengov.github.io/pxweb/TROUBLESHOOTING.html","id":"workaround","dir":"","previous_headings":"Encoding errors on Windows","what":"Workaround","title":"Troubleshooting pxweb R package","text":"fix , explicitly referenced offending character using escape sequence : find specific encoding special letter, see: https://www.fileformat.info/info/unicode/char/search.htm","code":"pxweb_query_list <- list(\"KOHEZIJSKA REGIJA\"=c(\"0\"), \"DRŽAVA ROJSTVA\"=c(\"0\"), \"SPOL\"=c(\"0\"), \"MERITVE\"=c(\"2000\")) # Explicit encoding ČETRTLETJE fixed_name <- paste(\"\\U010C\", \"ETRTLETJE\", sep = \"\") years <- c(\"2008Q1\",\"2008Q2\") pxweb_query_list[[fixed_name]] <- years pxdata <- pxweb_get(url, pxweb_query_list)"},{"path":"https://ropengov.github.io/pxweb/TROUBLESHOOTING.html","id":"more-info","dir":"","previous_headings":"Encoding errors on Windows","what":"More info","title":"Troubleshooting pxweb R package","text":"https://github.com/rOpenGov/pxweb/issues/217","code":""},{"path":[]},{"path":"https://ropengov.github.io/pxweb/TROUBLESHOOTING.html","id":"date-added-1","dir":"","previous_headings":"Error: Running pxweb in parallel","what":"Date added:","title":"Troubleshooting pxweb R package","text":"2021-07-07","code":""},{"path":"https://ropengov.github.io/pxweb/TROUBLESHOOTING.html","id":"versions-1","dir":"","previous_headings":"Error: Running pxweb in parallel","what":"Versions","title":"Troubleshooting pxweb R package","text":"problem exist pxweb version 0.8+.","code":""},{"path":"https://ropengov.github.io/pxweb/TROUBLESHOOTING.html","id":"description-1","dir":"","previous_headings":"Error: Running pxweb in parallel","what":"Description","title":"Troubleshooting pxweb R package","text":"Currently, pxweb package thread-safe, hence safe runt multiple pxweb_get functions parallel different R sessions computer/IP address.","code":""},{"path":"https://ropengov.github.io/pxweb/TROUBLESHOOTING.html","id":"workaround-1","dir":"","previous_headings":"Error: Running pxweb in parallel","what":"Workaround","title":"Troubleshooting pxweb R package","text":"Don’t run pxweb parallel.","code":""},{"path":[]},{"path":"https://ropengov.github.io/pxweb/TROUBLESHOOTING.html","id":"date-added-2","dir":"","previous_headings":"Error: Too large query","what":"Date added:","title":"Troubleshooting pxweb R package","text":"2019-02-15","code":""},{"path":"https://ropengov.github.io/pxweb/TROUBLESHOOTING.html","id":"versions-2","dir":"","previous_headings":"Error: Too large query","what":"Versions","title":"Troubleshooting pxweb R package","text":"problem exist pxweb version 0.8+.","code":""},{"path":"https://ropengov.github.io/pxweb/TROUBLESHOOTING.html","id":"description-2","dir":"","previous_headings":"Error: Too large query","what":"Description","title":"Troubleshooting pxweb R package","text":"situation (PXWEB APIS) possible get Error: large query error message (can look little bit different different pxweb versions) large query done. reason problem pxweb R package split query chunks/batches size smaller maximum values limit API. PXWEB APIs table objects dimension /content variables. Content variables one variable indicate contents download (number inhabitants percentage change inhabitants). always content variables exist PXWEB table. split large query, dimension variables can split smaller chunks (rows PX-DATA object). pxweb R package tries identify variables dimension variables checking variable can eliminated variable time variable. variable time eliminated possible sure variable content variable, variable used split query. hopefully solved PXWEB API provider supplying information variable content variable future releases.","code":""},{"path":"https://ropengov.github.io/pxweb/TROUBLESHOOTING.html","id":"workaround-2","dir":"","previous_headings":"Error: Too large query","what":"Workaround","title":"Troubleshooting pxweb R package","text":"way solve currently manually specify variables pxweb package can use split query setting variables elimination TRUE content variables. working example workaround. Another example :","code":"url <- \"http://px.hagstofa.is/pxis/api/v1/is/Efnahagur/utanrikisverslun/1_voruvidskipti/03_inntollskra/UTA03801.px\" pxweb_query_list <- list(\"Tollskrárnúmer\" = c(\"*\"), \"Land\" = c(\"AF\", \"AL\"), \"Mánuður\" = c(\"2016M01\"), \"Eining\" = c(\"*\")) pxq <- pxweb_query(pxweb_query_list) px_data <- pxweb_get(url, pxq) Error: Too large query # Variable(s) Tollskrárnúmer, Eining cannot be split to batches (eliminate is FALSE). # We download the metadata object and set eliminate to TRUE # (since Eining is not a content variable) pxmd <- pxweb_get(url) pxmd$variables[[4]]$elimination <- TRUE # We explicitly supply the meta data object to use for downloading px_data <- pxweb_advanced_get(url, pxq, pxmdo = pxmd) Downloading large query (in 4 batches): |==================================================================| 100% px_data PXWEB DATA With 5 variables and 35792 observations. library(pxweb) pxweb_query_list <- list(\"Typ av psykisk hälsa\"=c(\"*\"), \"Andel och konfidensintervall\"=c(\"2\"), \"Ålder\"=c(\"16-29\",\"30-44\",\"45-64\",\"65-84\"), \"Kön\"=c(\"1\",\"2\"), \"År\"=c(\"2018\",\"2016\",\"2015\", \"2014\",\"2013\",\"2012\", \"2011\",\"2010\",\"2009\", \"2008\",\"2007\",\"2006\", \"2005\",\"2004\")) url <- \"http://fohm-app.folkhalsomyndigheten.se/Folkhalsodata/api/v1/sv/B_HLV/dPsykhals/HLV_Psykisk_halsa_alder.px\" # We get the error that no variables can be split up. px_data <- pxweb_get(url = url, query = pxweb_query_list) # We download the metadata object and set eliminate to TRUE for # one variable that is not a content variable. # Here variable 1 ('Typ av psykisk hälsa') is a variable we can # split the batches on since (we know) it is not a content variable. pxmd <- pxweb_get(url) pxmd$variables[[1]]$elimination <- TRUE # We explicitly supply the meta data object to use for downloading px_data <- pxweb_advanced_get(url, pxweb_query_list, pxmdo = pxmd) ## Downloading large query (in 2 batches): ## |========================================================| 100% px_data ## PXWEB DATA ## With 6 variables and 1792 observations."},{"path":"https://ropengov.github.io/pxweb/articles/pxweb.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"PX-WEB API Interface for R","text":"PXWEB API structure developed Statistics Sweden national statistical institutions (NSI) disseminate public statistics structured way. API enables downloading using data statistical agencies without using web browser direct HTTP/HTTPS. pxweb R package connects PXWEB API R facilitates access, use referencing data PXWEB APIs.","code":""},{"path":"https://ropengov.github.io/pxweb/articles/pxweb.html","id":"available-data-sources-and-tools","dir":"Articles","previous_headings":"Introduction","what":"Available data sources and tools","title":"PX-WEB API Interface for R","text":"number organizations use PXWEB distribute hierarchical data. can browse available data sets : Statistics Sweden API Description Statistics Finland StatFi API Description organizations using PX-WEB","code":""},{"path":"https://ropengov.github.io/pxweb/articles/pxweb.html","id":"about-pxweb-apis","dir":"Articles","previous_headings":"Introduction","what":"About PXWEB APIs","title":"PX-WEB API Interface for R","text":"data PXWEB APIs consists metadata data parts. Metadata structured hierarchical node tree, node contains information subnodes. leaf nodes information dimensions available data leaf node.","code":""},{"path":"https://ropengov.github.io/pxweb/articles/pxweb.html","id":"installation","dir":"Articles","previous_headings":"","what":"Installation","title":"PX-WEB API Interface for R","text":"install latest stable release version CRAN, just use: install latest stable release version GitHub, just use: Test installation loading library: tutorial included package :","code":"install.packages(\"pxweb\") library(\"remotes\") remotes::install_github(\"ropengov/pxweb\") library(pxweb) vignette(topic=\"pxweb\")"},{"path":"https://ropengov.github.io/pxweb/articles/pxweb.html","id":"installation-issues","dir":"Articles","previous_headings":"Installation","what":"Installation issues","title":"PX-WEB API Interface for R","text":"also recommend setting UTF-8 encoding since API may local specific letters:","code":"Sys.setlocale(locale = \"UTF-8\")"},{"path":"https://ropengov.github.io/pxweb/articles/pxweb.html","id":"accessing-pxweb-from-r","dir":"Articles","previous_headings":"","what":"Accessing PXWEB from R","title":"PX-WEB API Interface for R","text":"two ways using pxweb R package access data, either interactively using core functions. access data, two parts needed, URL data table API query specifying data interest.","code":""},{"path":"https://ropengov.github.io/pxweb/articles/pxweb.html","id":"interactive-use","dir":"Articles","previous_headings":"","what":"Interactive use","title":"PX-WEB API Interface for R","text":"simplest way using pxweb use interactively, navigate API data interest, set query interest. example , use interactive functionality PXWEB API root, use path API. functionality also means can navigate PXWEB API, irrespectively part R package API catalogue . Just supply URL somewhere API navigate API . Due new CRAN policies, possible use R function edit API catalogue R package, editing can done quickly R using file.edit(). Although, pxweb installed , overwrite old API catalogue. easiest way add PXWEB API global catalogue. , pull request pxweb GitHub page .","code":"# Navigate through all pxweb api:s in the R package API catalogue d <- pxweb_interactive() # Get data from SCB (Statistics Sweden) d <- pxweb_interactive(\"api.scb.se\") # Fetching data from statfi (Statistics Finland) d <- pxweb_interactive(\"pxnet2.stat.fi\") # Fetching data from StatBank (Statistics Norway) d <- pxweb_interactive(\"data.ssb.no\") # To see all available PXWEB APIs use pxweb_apis <- pxweb_api_catalogue() # Start with a specific path. d <- pxweb_interactive(\"https://api.scb.se/OV0104/v1/doris/en/ssd/BE/BE0101/BE0101A\") file.edit(pxweb_api_catalogue_path())"},{"path":"https://ropengov.github.io/pxweb/articles/pxweb.html","id":"direct-use","dir":"Articles","previous_headings":"","what":"Direct use","title":"PX-WEB API Interface for R","text":"hood, pxweb package uses pxweb_get() function access data PXWEB API. also keeps track API’s time limits splits big queries optimal downloadable chunks. use pxweb_get() without query, function either returns PXWEB LEVELS object PXWEB METADATA object. returned depends URL points table API . example PXWEB LEVELS object. use pxweb_get() table, PXWEB METADATA object returned.","code":"# Get PXWEB levels px_levels <- pxweb_get(\"https://api.scb.se/OV0104/v1/doris/en/ssd/BE/BE0101/BE0101A/\") px_levels ## PXWEB LEVELS ## BefolkningNy (t): Population by region, marital status, age and sex. Year 1968 - 2022 ## FolkmangdNov (t): Population 1 November by region, age and sex. Year 2002 - 2023 ## FolkmangdDistrikt (t): Population by district, Landscape or Part of the country by sex. Year 2015 - 2022 ## BefolkManad (t): Population per month by region, age and sex. Year 2000M01 - 2023M11 ## BefolkningR1860N (t): Population by age and sex. Year 1860 - 2022 # Get PXWEB metadata about a table px_meta <- pxweb_get(\"https://api.scb.se/OV0104/v1/doris/en/ssd/BE/BE0101/BE0101A/BefolkningNy\") px_meta ## PXWEB METADATA ## Population by region, marital status, age, sex, observations and year ## variables: ## [[1]] Region: region ## [[2]] Civilstand: marital status ## [[3]] Alder: age ## [[4]] Kon: sex ## [[5]] ContentsCode: observations ## [[6]] Tid: year"},{"path":"https://ropengov.github.io/pxweb/articles/pxweb.html","id":"creating-data-queries","dir":"Articles","previous_headings":"Direct use","what":"Creating data queries","title":"PX-WEB API Interface for R","text":"download data, need URL table query specifying parts table interest. URL table URL return metadata object query supplied. Creating query can done three main ways. first straightforward approach use pxweb_interactive() explore table URL create query interactively. interactive function return query URL, even data downloaded. can also turn query JSON query can use outside R. second approach specify query either R list JSON object. Statistical Agencies, Statistics Sweden, supply queries directly JSON object web pages. can use queries directly. another example JSON query table . details setting JSON query, see PXWEB API documentation. use JSON query, store JSON query file supply path file “pxweb_query()”function. Finally, can create PXWEB query R list list element variable selected observation. can validate query metadata object asses can use query. validation done automatically data fetched pxweb_get() can also done manually.","code":"d <- pxweb_interactive(\"https://api.scb.se/OV0104/v1/doris/en/ssd/BE/BE0101/BE0101A/BefolkningNy\") d$url ## [1] \"http://api.scb.se/OV0104/v1/doris/en/ssd/BE/BE0101/BE0101A/BefolkningNy\" d$query ## PXWEB QUERY ## query: ## [[1]] Region (item): ## 00 ## [[2]] Civilstand (item): ## OG, G, ÄNKL, SK ## [[3]] Alder (item): ## tot ## [[4]] ContentsCode (item): ## BE0101N1 ## [[5]] Tid (item): ## 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 pxweb_query_as_json(d$query, pretty = TRUE) ## { ## \"query\": [ ## { ## \"code\": \"Region\", ## \"selection\": { ## \"filter\": \"item\", ## \"values\": [\"00\"] ## } ## }, ## { ## \"code\": \"Civilstand\", ## \"selection\": { ## \"filter\": \"item\", ## \"values\": [\"OG\", \"G\", \"ÄNKL\", \"SK\"] ## } ## }, ## { ## \"code\": \"Alder\", ## \"selection\": { ## \"filter\": \"item\", ## \"values\": [\"tot\"] ## } ## }, ## { ## \"code\": \"ContentsCode\", ## \"selection\": { ## \"filter\": \"item\", ## \"values\": [\"BE0101N1\"] ## } ## }, ## { ## \"code\": \"Tid\", ## \"selection\": { ## \"filter\": \"item\", ## \"values\": [\"2010\", \"2011\", \"2012\", \"2013\", \"2014\", \"2015\", \"2016\", \"2017\"] ## } ## } ## ], ## \"response\": { ## \"format\": \"json\" ## } ## } { \"query\": [ { \"code\": \"Civilstand\", \"selection\": { \"filter\": \"item\", \"values\": [\"OG\", \"G\", \"ÄNKL\", \"SK\"] } }, { \"code\": \"Kon\", \"selection\": { \"filter\": \"item\", \"values\": [\"1\", \"2\"] } }, { \"code\": \"ContentsCode\", \"selection\": { \"filter\": \"item\", \"values\": [\"BE0101N1\"] } }, { \"code\": \"Tid\", \"selection\": { \"filter\": \"item\", \"values\": [\"2015\", \"2016\", \"2017\"] } } ], \"response\": { \"format\": \"json\" } } pxq <- pxweb_query(\"path/to/the/json/query.json\") pxweb_query_list <- list( \"Civilstand\" = c(\"*\"), # Use \"*\" to select all \"Kon\" = c(\"1\", \"2\"), \"ContentsCode\" = c(\"BE0101N1\"), \"Tid\" = c(\"2015\", \"2016\", \"2017\") ) pxq <- pxweb_query(pxweb_query_list) pxq ## PXWEB QUERY ## query: ## [[1]] Civilstand (all): ## * ## [[2]] Kon (item): ## 1, 2 ## [[3]] ContentsCode (item): ## BE0101N1 ## [[4]] Tid (item): ## 2015, 2016, 2017 pxweb_validate_query_with_metadata(pxq, px_meta)"},{"path":"https://ropengov.github.io/pxweb/articles/pxweb.html","id":"downloading-data","dir":"Articles","previous_headings":"Direct use","what":"Downloading data","title":"PX-WEB API Interface for R","text":"URL data table query, can download data “pxweb_get()”. function returns pxweb_data object contains downloaded data. instead want JSON-stat object, change response format JSON-stat, get JSON-stat object returned. return formats return files. , responses stored R tempdir() folded, file paths returned pxweb_get(). Currently, px sdmx formats can downloaded files, file issue need response formats. queries large (contain values PXWEB API maximum allowed values), query chunked optimal chunks downloaded sequentially. PXWEB data objects combined one large PXWEB data object, JSON-stat objects returned list JSON-stat objects, files stored tempdir() separate files. advanced connections API, pxweb_advanced_get() gives flexibility access underlying HTTP calls using httr log HTTP calls debugging. can convert downloaded PXWEB data objects data. frame character matrix. character matrix contains “raw” data data. frame returns R data.frame tidy format. conversion means missing values (“..” converted NA) data. frame. Using arguments variable.value.type column.name.type, can choose want code text column names value types. Similarly, can access raw data character matrix .matrix.","code":"pxd <- pxweb_get( \"https://api.scb.se/OV0104/v1/doris/en/ssd/BE/BE0101/BE0101A/BefolkningNy\", pxq ) pxd ## PXWEB DATA ## With 4 variables and 24 observations. pxq$response$format <- \"json-stat\" pxjstat <- pxweb_get( \"https://api.scb.se/OV0104/v1/doris/en/ssd/BE/BE0101/BE0101A/BefolkningNy\", pxq ) pxjstat ## { ## \"dataset\": { ## \"dimension\": { ## \"Civilstand\": { ## \"label\": [\"marital status\"], ## \"category\": { ## \"index\": { ## \"OG\": [0], ## \"G\": [1], ## \"ÄNKL\": [2], ## \"SK\": [3] ## }, ## \"label\": { ## \"OG\": [\"single\"], ## \"G\": [\"married\"], ## \"ÄNKL\": [\"widowers/widows\"], ## \"SK\": [\"divorced\"] ## } ## }, ## \"extension\": { ## \"show\": [\"value\"] ## } ## }, ## \"Kon\": { ## \"label\": [\"sex\"], ## \"category\": { ## \"index\": { ## \"1\": [0], ## \"2\": [1] ## }, ## \"label\": { ## \"1\": [\"men\"], ## \"2\": [\"women\"] ## } ## }, ## \"link\": { ## \"describedby\": [ ## { ## \"extension\": { ## \"Kon\": [\"Kön\"] ## } ## } ## ] ## }, ## \"extension\": { ## \"show\": [\"value\"] ## } ## }, ## \"ContentsCode\": { ## \"label\": [\"observations\"], ## \"category\": { ## \"index\": { ## \"BE0101N1\": [0] ## }, ## \"label\": { ## \"BE0101N1\": [\"Population\"] ## }, ## \"unit\": { ## \"BE0101N1\": { ## \"base\": [\"number\"], ## \"decimals\": [0] ## } ## } ## }, ## \"extension\": { ## \"show\": [\"value\"] ## } ## }, ## \"Tid\": { ## \"label\": [\"year\"], ## \"category\": { ## \"index\": { ## \"2015\": [0], ## \"2016\": [1], ## \"2017\": [2] ## }, ## \"label\": { ## \"2015\": [\"2015\"], ## \"2016\": [\"2016\"], ## \"2017\": [\"2017\"] ## } ## }, ## \"extension\": { ## \"show\": [\"code\"] ## } ## }, ## \"id\": [ ## [\"Civilstand\"], ## [\"Kon\"], ## [\"ContentsCode\"], ## [\"Tid\"] ## ], ## \"size\": [ ## [4], ## [2], ## [1], ## [3] ## ], ## \"role\": { ## \"metric\": [ ## [\"ContentsCode\"] ## ], ## \"time\": [ ## [\"Tid\"] ## ] ## } ## }, ## \"label\": [\"Population by marital status, sex, observations and year\"], ## \"source\": [\"Statistics Sweden\"], ## \"updated\": [\"2023-02-09T07:57:00Z\"], ## \"value\": [ ## [2762601], ## [2820248], ## [2870477], ## [2394842], ## [2437315], ## [2477012], ## [1651482], ## [1672460], ## [1687016], ## [1639519], ## [1657129], ## [1671381], ## [99751], ## [99654], ## [99682], ## [345008], ## [340709], ## [335961], ## [417132], ## [420985], ## [425487], ## [540682], ## [546653], ## [553226] ## ], ## \"extension\": { ## \"px\": { ## \"infofile\": [\"BE0101\"], ## \"tableid\": [\"TAB638\"], ## \"decimals\": [0] ## } ## } ## } ## } pxq$response$format <- \"px\" pxfp <- pxweb_get( \"https://api.scb.se/OV0104/v1/doris/en/ssd/BE/BE0101/BE0101A/BefolkningNy\", pxq ) pxfp ## [1] \"/var/folders/x9/dsgck_4s5mx2nrzzs8zd64rc0000gq/T//RtmpFdmiD7/50026bd2b2d8df2e3f190ca568b3b587d8207465.px\" pxdf <- as.data.frame(pxd, column.name.type = \"text\", variable.value.type = \"text\") head(pxdf) ## marital status sex year Population ## 1 single men 2015 2762601 ## 2 single men 2016 2820248 ## 3 single men 2017 2870477 ## 4 single women 2015 2394842 ## 5 single women 2016 2437315 ## 6 single women 2017 2477012 pxdf <- as.data.frame(pxd, column.name.type = \"code\", variable.value.type = \"code\") head(pxdf) ## Civilstand Kon Tid BE0101N1 ## 1 OG 1 2015 2762601 ## 2 OG 1 2016 2820248 ## 3 OG 1 2017 2870477 ## 4 OG 2 2015 2394842 ## 5 OG 2 2016 2437315 ## 6 OG 2 2017 2477012 pxmat <- as.matrix(pxd, column.name.type = \"code\", variable.value.type = \"code\") head(pxmat) ## Civilstand Kon Tid BE0101N1 ## [1,] \"OG\" \"1\" \"2015\" \"2762601\" ## [2,] \"OG\" \"1\" \"2016\" \"2820248\" ## [3,] \"OG\" \"1\" \"2017\" \"2870477\" ## [4,] \"OG\" \"2\" \"2015\" \"2394842\" ## [5,] \"OG\" \"2\" \"2016\" \"2437315\" ## [6,] \"OG\" \"2\" \"2017\" \"2477012\""},{"path":"https://ropengov.github.io/pxweb/articles/pxweb.html","id":"access-data-footnotescomments","dir":"Articles","previous_headings":"Direct use","what":"Access data footnotes/comments","title":"PX-WEB API Interface for R","text":"addition data, PXWEB DATA object may also contain comments data. can accessed using pxweb_data_comments() function. case, comments. comments, can turn comments data. frame one comment per row.","code":"pxdc <- pxweb_data_comments(pxd) pxdc ## NO PXWEB DATA COMMENTS as.data.frame(pxdc)"},{"path":"https://ropengov.github.io/pxweb/articles/pxweb.html","id":"citation","dir":"Articles","previous_headings":"","what":"Citation","title":"PX-WEB API Interface for R","text":"Finally, use data, can easily create citation pxweb_data object using pxweb_cite() function. full reproducibility, please also cite package.","code":"pxweb_cite(pxd) ## Statistics Sweden (2024). “Population by region, marital status, age, ## sex, observations and year.” [Data accessed 2024-01-27 16:19:42.712139 ## using pxweb R package 0.16.3], ##
. ## ## A BibTeX entry for LaTeX users is ## ## @Misc{, ## title = {Population by region, marital status, age, sex, observations and year}, ## author = {{Statistics Sweden}}, ## organization = {Statistics Sweden}, ## address = {Stockholm, Sweden}, ## year = {2024}, ## url = {https://api.scb.se/OV0104/v1/doris/en/ssd/BE/BE0101/BE0101A/BefolkningNy}, ## note = {[Data accessed 2024-01-27 16:19:42.712139 using pxweb R package 0.16.3]}, ## } ## Kindly cite the pxweb R package as follows: ## ## Mans Magnusson, Markus Kainu, Janne Huovari, and Leo Lahti ## (rOpenGov). pxweb: R tools for PXWEB API. URL: ## http://github.com/ropengov/pxweb ## ## A BibTeX entry for LaTeX users is ## ## @Misc{, ## title = {pxweb: R tools for PX-WEB API}, ## author = {Mans Magnusson and Markus Kainu and Janne Huovari and Leo Lahti}, ## year = {2019}, ## }"},{"path":"https://ropengov.github.io/pxweb/articles/pxweb.html","id":"known-issues-and-troubleshooting","dir":"Articles","previous_headings":"","what":"Known issues and troubleshooting","title":"PX-WEB API Interface for R","text":"See TROUBLESHOOTING.md list current known issues.","code":""},{"path":"https://ropengov.github.io/pxweb/articles/pxweb.html","id":"licensing","dir":"Articles","previous_headings":"","what":"Licensing","title":"PX-WEB API Interface for R","text":"work can freely used, modified distributed open license specified DESCRIPTION file.","code":""},{"path":"https://ropengov.github.io/pxweb/articles/pxweb.html","id":"session-info","dir":"Articles","previous_headings":"","what":"Session info","title":"PX-WEB API Interface for R","text":"created vignette ","code":"sessionInfo() ## R version 4.3.2 (2023-10-31) ## Platform: x86_64-pc-linux-gnu (64-bit) ## Running under: Ubuntu 22.04.3 LTS ## ## Matrix products: default ## BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 ## LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0 ## ## locale: ## [1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C LC_TIME=C.UTF-8 ## [4] LC_COLLATE=C.UTF-8 LC_MONETARY=C.UTF-8 LC_MESSAGES=C.UTF-8 ## [7] LC_PAPER=C.UTF-8 LC_NAME=C LC_ADDRESS=C ## [10] LC_TELEPHONE=C LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C ## ## time zone: UTC ## tzcode source: system (glibc) ## ## attached base packages: ## [1] stats graphics grDevices utils datasets methods base ## ## other attached packages: ## [1] pxweb_0.17.0 ## ## loaded via a namespace (and not attached): ## [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 ## [5] xfun_0.41 stringi_1.8.3 purrr_1.0.2 textshaping_0.3.7 ## [9] jsonlite_1.8.8 glue_1.7.0 backports_1.4.1 htmltools_0.5.7 ## [13] ragg_1.2.7 sass_0.4.8 rmarkdown_2.25 evaluate_0.23 ## [17] jquerylib_0.1.4 fastmap_1.1.1 yaml_2.3.8 lifecycle_1.0.4 ## [21] memoise_2.0.1 stringr_1.5.1 compiler_4.3.2 fs_1.6.3 ## [25] systemfonts_1.0.5 digest_0.6.34 R6_2.5.1 magrittr_2.0.3 ## [29] checkmate_2.3.1 bslib_0.6.1 tools_4.3.2 pkgdown_2.0.7 ## [33] cachem_1.0.8 desc_1.4.3"},{"path":"https://ropengov.github.io/pxweb/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Mans Magnusson. Author, maintainer. Markus Kainu. Author. Janne Huovari. Author. Leo Lahti. Author. Love Hansson. Contributor. Eydun Nielsen. Contributor. Bo Werth. Contributor. Thomas Runarsson. Contributor. Torbjörn Lindquist. Contributor. Palmar Thorsteinsson. Contributor. Pyry Kantanen. Contributor. Sebastian Ankargren. Contributor.","code":""},{"path":"https://ropengov.github.io/pxweb/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Mans Magnusson, Markus Kainu, Janne Huovari, Leo Lahti (rOpenGov). pxweb: R tools PXWEB API. URL: http://github.com/ropengov/pxweb","code":"@Misc{, title = {pxweb: R tools for PX-WEB API}, author = {Mans Magnusson and Markus Kainu and Janne Huovari and Leo Lahti}, year = {2019}, }"},{"path":"https://ropengov.github.io/pxweb/index.html","id":"r-tools-to-access-px-web-api---the-pxweb-r-package-","dir":"","previous_headings":"","what":"R Interface to PXWEB APIs","title":"R Interface to PXWEB APIs","text":"pxweb R package provides tools interface PX-WEB API data search, download, manipulation visualization purposes. used large number statistical authorities world-wide. offers methods utilize information data hierarchy stored behind PXWEB API. Many API services still early stages, data quality sometimes compromised. Issue reports welcome.","code":""},{"path":"https://ropengov.github.io/pxweb/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"R Interface to PXWEB APIs","text":"easiest way use pxweb simply install CRAN: Alternatively, can get latest stable development version: cases, organization requires manual proxy settings. can set follows:","code":"install.packages('pxweb') library(remotes) remotes::install_github('ropengov/pxweb') library(remotes) library(httr) set_config( use_proxy(\"64.251.21.73\", 8080) # Note! This is an example ) remotes::install_github('ropengov/pxweb')"},{"path":"https://ropengov.github.io/pxweb/index.html","id":"using-the-package","dir":"","previous_headings":"","what":"Using the package","title":"R Interface to PXWEB APIs","text":"examples, check tutorial/vignette.","code":""},{"path":"https://ropengov.github.io/pxweb/index.html","id":"problems","dir":"","previous_headings":"","what":"Problems?","title":"R Interface to PXWEB APIs","text":"See TROUBLESHOOTING.md open issue.","code":""},{"path":"https://ropengov.github.io/pxweb/index.html","id":"contributing","dir":"","previous_headings":"","what":"Contributing","title":"R Interface to PXWEB APIs","text":"welcome contact us: Submit suggestions bug reports (provide output sessionInfo() packageVersion(\"pxweb\")) Send pull request Star us Github page Join discussion Gitter","code":""},{"path":"https://ropengov.github.io/pxweb/index.html","id":"acknowledgements","dir":"","previous_headings":"","what":"Acknowledgements","title":"R Interface to PXWEB APIs","text":"Kindly cite work follows: Måns Magnusson, Markus Kainu, Janne Huovari, Leo Lahti. Retrieval analysis PC Axis data pxweb package. R package version . URL: https://ropengov.github.io/pxweb/ grateful contributors! project part rOpenGov.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/add_pxe_defaults.html","id":null,"dir":"Reference","previous_headings":"","what":"Add default values to pxe — add_pxe_defaults","title":"Add default values to pxe — add_pxe_defaults","text":"Add default values pxe","code":""},{"path":"https://ropengov.github.io/pxweb/reference/add_pxe_defaults.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add default values to pxe — add_pxe_defaults","text":"","code":"add_pxe_defaults(pxe)"},{"path":"https://ropengov.github.io/pxweb/reference/add_pxe_defaults.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add default values to pxe — add_pxe_defaults","text":"pxe pxweb_explorer object","code":""},{"path":"https://ropengov.github.io/pxweb/reference/api_catalogue.html","id":null,"dir":"Reference","previous_headings":"","what":"Defunct functions — api_catalogue","title":"Defunct functions — api_catalogue","text":"function version 0.10.0 become defunct. Call functions get information new functions use.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/api_catalogue.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Defunct functions — api_catalogue","text":"","code":"api_catalogue() update_pxweb_apis() api_parameters(url = NULL) base_url(api, version = NULL, language = NULL) get_pxweb_data(url, dims, clean = FALSE, encoding = NULL) get_pxweb_dims(node, verbose = TRUE) get_pxweb_levels(baseURL, descriptions = FALSE, quiet = FALSE, ...) get_pxweb_metadata( path = NULL, node = NULL, topnodes = NULL, quiet = TRUE, baseURL = NULL, ... ) pxweb_api checkForLevels(url)"},{"path":"https://ropengov.github.io/pxweb/reference/api_catalogue.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Defunct functions — api_catalogue","text":"object class list length 1.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/api_catalogue.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Defunct functions — api_catalogue","text":"url Defunct argument. api Defunct argument. version Defunct argument. language Defunct argument. dims Defunct argument. clean Defunct argument. encoding Defunct argument. node Defunct argument. verbose Defunct argument. baseURL Defunct argument. descriptions Defunct argument. quiet Defunct argument. ... Defunct argument. path Defunct argument. topnodes Defunct argument.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/as_pxweb_levels.html","id":null,"dir":"Reference","previous_headings":"","what":"Assert that x is a correct pxweb_database_list object. — as_pxweb_levels","title":"Assert that x is a correct pxweb_database_list object. — as_pxweb_levels","text":"Assert x correct pxweb_database_list object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/as_pxweb_levels.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Assert that x is a correct pxweb_database_list object. — as_pxweb_levels","text":"","code":"as_pxweb_levels(x)"},{"path":"https://ropengov.github.io/pxweb/reference/as_pxweb_levels.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Assert that x is a correct pxweb_database_list object. — as_pxweb_levels","text":"x object check.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb.html","id":null,"dir":"Reference","previous_headings":"","what":"Assert that the url structure is correct — assert_pxweb","title":"Assert that the url structure is correct — assert_pxweb","text":"Assert url slot pxweb object correct.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Assert that the url structure is correct — assert_pxweb","text":"","code":"assert_pxweb(x)"},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Assert that the url structure is correct — assert_pxweb","text":"x object assert","code":""},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_api_catalogue.html","id":null,"dir":"Reference","previous_headings":"","what":"Assert a pxweb_api_catalogue object — assert_pxweb_api_catalogue","title":"Assert a pxweb_api_catalogue object — assert_pxweb_api_catalogue","text":"Assert pxweb_api_catalogue object","code":""},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_api_catalogue.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Assert a pxweb_api_catalogue object — assert_pxweb_api_catalogue","text":"","code":"assert_pxweb_api_catalogue(x)"},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_api_catalogue.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Assert a pxweb_api_catalogue object — assert_pxweb_api_catalogue","text":"x object assert pxweb_api_catalogue_entry.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_calls.html","id":null,"dir":"Reference","previous_headings":"","what":"Assert that the rda_file_path is correct — assert_pxweb_calls","title":"Assert that the rda_file_path is correct — assert_pxweb_calls","text":"Assert rda_file_path slot pxweb object correct.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_calls.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Assert that the rda_file_path is correct — assert_pxweb_calls","text":"","code":"assert_pxweb_calls(x)"},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_calls.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Assert that the rda_file_path is correct — assert_pxweb_calls","text":"x object assert","code":""},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_config.html","id":null,"dir":"Reference","previous_headings":"","what":"Assert that the config slot is correct — assert_pxweb_config","title":"Assert that the config slot is correct — assert_pxweb_config","text":"Assert config slot pxweb object correct.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_config.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Assert that the config slot is correct — assert_pxweb_config","text":"","code":"assert_pxweb_config(x)"},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_config.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Assert that the config slot is correct — assert_pxweb_config","text":"x object assert","code":""},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Assert that x is a correct pxweb_data object. — assert_pxweb_data","title":"Assert that x is a correct pxweb_data object. — assert_pxweb_data","text":"Assert x correct pxweb_data object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Assert that x is a correct pxweb_data object. — assert_pxweb_data","text":"","code":"assert_pxweb_data(x)"},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Assert that x is a correct pxweb_data object. — assert_pxweb_data","text":"x object check.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_data_comments.html","id":null,"dir":"Reference","previous_headings":"","what":"Assert that x is a correct pxweb_data_comments object. — assert_pxweb_data_comments","title":"Assert that x is a correct pxweb_data_comments object. — assert_pxweb_data_comments","text":"Assert x correct pxweb_data_comments object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_data_comments.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Assert that x is a correct pxweb_data_comments object. — assert_pxweb_data_comments","text":"","code":"assert_pxweb_data_comments(x)"},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_data_comments.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Assert that x is a correct pxweb_data_comments object. — assert_pxweb_data_comments","text":"x object check.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_data_jsonstat.html","id":null,"dir":"Reference","previous_headings":"","what":"Assert that x is a correct pxweb_data_jsonstat object.\nAssert a json-stat version 1.0 or later object — assert_pxweb_data_jsonstat","title":"Assert that x is a correct pxweb_data_jsonstat object.\nAssert a json-stat version 1.0 or later object — assert_pxweb_data_jsonstat","text":"Assert x correct pxweb_data_jsonstat object. Assert json-stat version 1.0 later object","code":""},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_data_jsonstat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Assert that x is a correct pxweb_data_jsonstat object.\nAssert a json-stat version 1.0 or later object — assert_pxweb_data_jsonstat","text":"","code":"assert_pxweb_data_jsonstat(x)"},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_data_jsonstat.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Assert that x is a correct pxweb_data_jsonstat object.\nAssert a json-stat version 1.0 or later object — assert_pxweb_data_jsonstat","text":"x object check.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_database_list.html","id":null,"dir":"Reference","previous_headings":"","what":"Assert that x is a correct pxweb_database_list object. — assert_pxweb_database_list","title":"Assert that x is a correct pxweb_database_list object. — assert_pxweb_database_list","text":"Assert x correct pxweb_database_list object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_database_list.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Assert that x is a correct pxweb_database_list object. — assert_pxweb_database_list","text":"","code":"assert_pxweb_database_list(x)"},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_database_list.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Assert that x is a correct pxweb_database_list object. — assert_pxweb_database_list","text":"x object check.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_input_allowed.html","id":null,"dir":"Reference","previous_headings":"","what":"Assert a pxweb_input_allowed object — assert_pxweb_input_allowed","title":"Assert a pxweb_input_allowed object — assert_pxweb_input_allowed","text":"Assert pxweb_input_allowed object","code":""},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_input_allowed.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Assert a pxweb_input_allowed object — assert_pxweb_input_allowed","text":"","code":"assert_pxweb_input_allowed(x) # S3 method for pxweb_input_allowed print(x, ...)"},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_input_allowed.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Assert a pxweb_input_allowed object — assert_pxweb_input_allowed","text":"x object assert.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_levels.html","id":null,"dir":"Reference","previous_headings":"","what":"Assert that x is a correct pxweb_levels object. — assert_pxweb_levels","title":"Assert that x is a correct pxweb_levels object. — assert_pxweb_levels","text":"Assert x correct pxweb_levels object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_levels.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Assert that x is a correct pxweb_levels object. — assert_pxweb_levels","text":"","code":"assert_pxweb_levels(x)"},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_levels.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Assert that x is a correct pxweb_levels object. — assert_pxweb_levels","text":"x object check.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_metadata.html","id":null,"dir":"Reference","previous_headings":"","what":"Assert that x is a correct pxweb_metadata object. — assert_pxweb_metadata","title":"Assert that x is a correct pxweb_metadata object. — assert_pxweb_metadata","text":"Assert x correct pxweb_metadata object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_metadata.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Assert that x is a correct pxweb_metadata object. — assert_pxweb_metadata","text":"","code":"assert_pxweb_metadata(x)"},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_metadata.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Assert that x is a correct pxweb_metadata object. — assert_pxweb_metadata","text":"x object check.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_query.html","id":null,"dir":"Reference","previous_headings":"","what":"Assert a pxweb_query object — assert_pxweb_query","title":"Assert a pxweb_query object — assert_pxweb_query","text":"Assert pxweb_query object","code":""},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_query.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Assert a pxweb_query object — assert_pxweb_query","text":"","code":"assert_pxweb_query(x, check_response_format = TRUE)"},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_query.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Assert a pxweb_query object — assert_pxweb_query","text":"x object assert conferms structure pxweb_query object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_rda_file_path.html","id":null,"dir":"Reference","previous_headings":"","what":"Assert that the rda_file_path is correct — assert_pxweb_rda_file_path","title":"Assert that the rda_file_path is correct — assert_pxweb_rda_file_path","text":"Assert rda_file_path slot pxweb object correct.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_rda_file_path.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Assert that the rda_file_path is correct — assert_pxweb_rda_file_path","text":"","code":"assert_pxweb_rda_file_path(x)"},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_rda_file_path.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Assert that the rda_file_path is correct — assert_pxweb_rda_file_path","text":"x object assert","code":""},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_url.html","id":null,"dir":"Reference","previous_headings":"","what":"Assert that the url structure is correct — assert_pxweb_url","title":"Assert that the url structure is correct — assert_pxweb_url","text":"Assert url slot pxweb object correct.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_url.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Assert that the url structure is correct — assert_pxweb_url","text":"","code":"assert_pxweb_url(x)"},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_url.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Assert that the url structure is correct — assert_pxweb_url","text":"x object assert","code":""},{"path":"https://ropengov.github.io/pxweb/reference/assert_query_can_be_split_to_batches.html","id":null,"dir":"Reference","previous_headings":"","what":"Assert that a given pxweb query can be split — assert_query_can_be_split_to_batches","title":"Assert that a given pxweb query can be split — assert_query_can_be_split_to_batches","text":"Assert given pxweb query can split","code":""},{"path":"https://ropengov.github.io/pxweb/reference/assert_query_can_be_split_to_batches.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Assert that a given pxweb query can be split — assert_query_can_be_split_to_batches","text":"","code":"assert_query_can_be_split_to_batches(pxq, pxmd, mxv)"},{"path":"https://ropengov.github.io/pxweb/reference/assert_query_can_be_split_to_batches.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Assert that a given pxweb query can be split — assert_query_can_be_split_to_batches","text":"pxq [pxweb_query] object pxmd [pxweb_metadata] object mxv maximum batch size","code":""},{"path":"https://ropengov.github.io/pxweb/reference/build_pxweb_config_url.html","id":null,"dir":"Reference","previous_headings":"","what":"Build the url to get the config from a PXWEB api — build_pxweb_url.url","title":"Build the url to get the config from a PXWEB api — build_pxweb_url.url","text":"Build url get config PXWEB api","code":""},{"path":"https://ropengov.github.io/pxweb/reference/build_pxweb_config_url.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Build the url to get the config from a PXWEB api — build_pxweb_url.url","text":"","code":"# S3 method for url build_pxweb_url(x) build_pxweb_config_url(x) # S3 method for list build_pxweb_config_url(x) # S3 method for pxweb build_pxweb_config_url(x) # S3 method for url build_pxweb_config_url(x)"},{"path":"https://ropengov.github.io/pxweb/reference/build_pxweb_rda_file_path.html","id":null,"dir":"Reference","previous_headings":"","what":"Build or get the tmp_rda_file_path from an url or pxweb_api_s3 object — build_pxweb_rda_file_path","title":"Build or get the tmp_rda_file_path from an url or pxweb_api_s3 object — build_pxweb_rda_file_path","text":"Build get tmp_rda_file_path url pxweb_api_s3 object","code":""},{"path":"https://ropengov.github.io/pxweb/reference/build_pxweb_rda_file_path.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Build or get the tmp_rda_file_path from an url or pxweb_api_s3 object — build_pxweb_rda_file_path","text":"","code":"build_pxweb_rda_file_path(x) # S3 method for character build_pxweb_rda_file_path(x) # S3 method for url build_pxweb_rda_file_path(x) # S3 method for pxweb build_pxweb_rda_file_path(x) # S3 method for list build_pxweb_rda_file_path(x)"},{"path":"https://ropengov.github.io/pxweb/reference/build_pxweb_rda_file_path.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Build or get the tmp_rda_file_path from an url or pxweb_api_s3 object — build_pxweb_rda_file_path","text":"x object create tmp_file_path .","code":""},{"path":"https://ropengov.github.io/pxweb/reference/build_pxweb_rda_file_path.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Build or get the tmp_rda_file_path from an url or pxweb_api_s3 object — build_pxweb_rda_file_path","text":"hostname used ","code":""},{"path":"https://ropengov.github.io/pxweb/reference/build_pxweb_url.html","id":null,"dir":"Reference","previous_headings":"","what":"Build the url to a PXWEB api — build_pxweb_url","title":"Build the url to a PXWEB api — build_pxweb_url","text":"Build url PXWEB api","code":""},{"path":"https://ropengov.github.io/pxweb/reference/build_pxweb_url.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Build the url to a PXWEB api — build_pxweb_url","text":"","code":"build_pxweb_url(x) # S3 method for list build_pxweb_url(x) # S3 method for character build_pxweb_url(x) # S3 method for pxweb build_pxweb_url(x) # S3 method for pxweb_api_catalogue_entry build_pxweb_url(x)"},{"path":"https://ropengov.github.io/pxweb/reference/generate_permutations.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate batch permutations — generate_permutations","title":"Generate batch permutations — generate_permutations","text":"Generate batch permutations","code":""},{"path":"https://ropengov.github.io/pxweb/reference/generate_permutations.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate batch permutations — generate_permutations","text":"","code":"generate_permutations(x)"},{"path":"https://ropengov.github.io/pxweb/reference/generate_permutations.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate batch permutations — generate_permutations","text":"x vector elements permute","code":""},{"path":"https://ropengov.github.io/pxweb/reference/generate_permutations.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Generate batch permutations — generate_permutations","text":"Generates permutations dim. 6 dim (highly unlikely) sample 1000 combinations drawn. Otherwise possible permutations returned.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/http_was_redirected.html","id":null,"dir":"Reference","previous_headings":"","what":"http_was_redirected — http_was_redirected","title":"http_was_redirected — http_was_redirected","text":"http_was_redirected","code":""},{"path":"https://ropengov.github.io/pxweb/reference/http_was_redirected.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"http_was_redirected — http_was_redirected","text":"","code":"http_was_redirected(r)"},{"path":"https://ropengov.github.io/pxweb/reference/http_was_redirected.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"http_was_redirected — http_was_redirected","text":"r httr response object, e.g. call httr::GET()","code":""},{"path":"https://ropengov.github.io/pxweb/reference/http_was_redirected.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"http_was_redirected — http_was_redirected","text":"list slots was_redirected, redirected_from redirected_to","code":""},{"path":"https://ropengov.github.io/pxweb/reference/http_was_redirected.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"http_was_redirected — http_was_redirected","text":"Function large parts taken https://petermeissner.de/blog/2018/11/07/using-httr--detect-redirects/.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/http_was_redirected.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"http_was_redirected — http_was_redirected","text":"","code":"if (FALSE) { r <- httr::GET(\"http://httpbin.org/redirect/2\") pxweb:::http_was_redirected(r) }"},{"path":"https://ropengov.github.io/pxweb/reference/is_pxweb_config_response.html","id":null,"dir":"Reference","previous_headings":"","what":"Check if a response is a pxweb config response — is_pxweb_config_response","title":"Check if a response is a pxweb config response — is_pxweb_config_response","text":"Check response pxweb config response","code":""},{"path":"https://ropengov.github.io/pxweb/reference/is_pxweb_config_response.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check if a response is a pxweb config response — is_pxweb_config_response","text":"","code":"is_pxweb_config_response(x)"},{"path":"https://ropengov.github.io/pxweb/reference/is_pxweb_config_response.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check if a response is a pxweb config response — is_pxweb_config_response","text":"x response object","code":""},{"path":"https://ropengov.github.io/pxweb/reference/parse_url_or_fail.html","id":null,"dir":"Reference","previous_headings":"","what":"Parse a character string or throws error if it fails — parse_url_or_fail","title":"Parse a character string or throws error if it fails — parse_url_or_fail","text":"Parse character string throws error fails","code":""},{"path":"https://ropengov.github.io/pxweb/reference/parse_url_or_fail.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Parse a character string or throws error if it fails — parse_url_or_fail","text":"","code":"parse_url_or_fail(x)"},{"path":"https://ropengov.github.io/pxweb/reference/parse_url_or_fail.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Parse a character string or throws error if it fails — parse_url_or_fail","text":"x character element parse","code":""},{"path":"https://ropengov.github.io/pxweb/reference/permutations.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate permutations of dimensions to find optimal no of batches — permutations","title":"Generate permutations of dimensions to find optimal no of batches — permutations","text":"Generate permutations dimensions find optimal batches","code":""},{"path":"https://ropengov.github.io/pxweb/reference/permutations.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate permutations of dimensions to find optimal no of batches — permutations","text":"","code":"permutations(n, r, v = 1:n, set = TRUE, repeats.allowed = FALSE)"},{"path":"https://ropengov.github.io/pxweb/reference/permutations.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate permutations of dimensions to find optimal no of batches — permutations","text":"n See gtools::permutations. r See gtools::permutations. v See gtools::permutations. set See gtools::permutations. repeats.allowed See gtools::permutations.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/permutations.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Generate permutations of dimensions to find optimal no of batches — permutations","text":"Taken gtools minimize dependencies. See permutations gtools packages details","code":""},{"path":"https://ropengov.github.io/pxweb/reference/print.pxweb_api_catalogue_entry.html","id":null,"dir":"Reference","previous_headings":"","what":"Print a catalogue entry — print.pxweb_api_catalogue_entry","title":"Print a catalogue entry — print.pxweb_api_catalogue_entry","text":"Print catalogue entry","code":""},{"path":"https://ropengov.github.io/pxweb/reference/print.pxweb_api_catalogue_entry.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print a catalogue entry — print.pxweb_api_catalogue_entry","text":"","code":"# S3 method for pxweb_api_catalogue_entry print(x, ...)"},{"path":"https://ropengov.github.io/pxweb/reference/print.pxweb_api_catalogue_entry.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print a catalogue entry — print.pxweb_api_catalogue_entry","text":"x object used select method. ... arguments passed methods.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxd_values_to_valuetexts.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert a pxweb data objects values to valuetext — pxd_values_to_valuetexts","title":"Convert a pxweb data objects values to valuetext — pxd_values_to_valuetexts","text":"Convert pxweb data objects values valuetext","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxd_values_to_valuetexts.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert a pxweb data objects values to valuetext — pxd_values_to_valuetexts","text":"","code":"pxd_values_to_valuetexts(x, variable_code, variable_vector)"},{"path":"https://ropengov.github.io/pxweb/reference/pxd_values_to_valuetexts.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert a pxweb data objects values to valuetext — pxd_values_to_valuetexts","text":"x pxweb_data object variable_code variable name variable convert. NOTE! Need variable code. variable_vector vector variables convert.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_allowed_input.html","id":null,"dir":"Reference","previous_headings":"","what":"Defines allowed input for a position in a pxweb_explorer or character object. — pxe_allowed_input","title":"Defines allowed input for a position in a pxweb_explorer or character object. — pxe_allowed_input","text":"Defines allowed input position pxweb_explorer character object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_allowed_input.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Defines allowed input for a position in a pxweb_explorer or character object. — pxe_allowed_input","text":"","code":"pxe_allowed_input(x) pxe_allowed_input_df() # S3 method for pxweb_explorer pxe_allowed_input(x) # S3 method for character pxe_allowed_input(x) # S3 method for pxweb_explorer pxe_allowed_input(x)"},{"path":"https://ropengov.github.io/pxweb/reference/pxe_allowed_input.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Defines allowed input for a position in a pxweb_explorer or character object. — pxe_allowed_input","text":"x object get allowed input .","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_back_position.html","id":null,"dir":"Reference","previous_headings":"","what":"Move in the pxweb_explorer position — pxe_back_position","title":"Move in the pxweb_explorer position — pxe_back_position","text":"Move pxweb_explorer position","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_back_position.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Move in the pxweb_explorer position — pxe_back_position","text":"","code":"pxe_back_position(pxe) pxe_add_position(pxe, new_pos)"},{"path":"https://ropengov.github.io/pxweb/reference/pxe_back_position.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Move in the pxweb_explorer position — pxe_back_position","text":"pxe pxweb_explorer object. new_pos add new position.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_back_position.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Move in the pxweb_explorer position — pxe_back_position","text":"pxe_back_position moves back one position pxe_add_position moves forward, based user choice.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_data_url.html","id":null,"dir":"Reference","previous_headings":"","what":"Get the url to a table — pxe_data_url","title":"Get the url to a table — pxe_data_url","text":"Get url table","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_data_url.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get the url to a table — pxe_data_url","text":"","code":"pxe_data_url(x)"},{"path":"https://ropengov.github.io/pxweb/reference/pxe_data_url.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get the url to a table — pxe_data_url","text":"x pxweb_explorer object","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_handle_input.html","id":null,"dir":"Reference","previous_headings":"","what":"Handle a user input for a pxweb_explorer object. — pxe_handle_input","title":"Handle a user input for a pxweb_explorer object. — pxe_handle_input","text":"Handle user input pxweb_explorer object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_handle_input.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Handle a user input for a pxweb_explorer object. — pxe_handle_input","text":"","code":"pxe_handle_input(user_input, pxe) # S3 method for numeric pxe_handle_input(user_input, pxe) # S3 method for character pxe_handle_input(user_input, pxe)"},{"path":"https://ropengov.github.io/pxweb/reference/pxe_handle_input.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Handle a user input for a pxweb_explorer object. — pxe_handle_input","text":"user_input (allowed) user input handle. pxe pxweb_explorer object get user input .","code":""},{"path":[]},{"path":"https://ropengov.github.io/pxweb/reference/pxe_input.html","id":null,"dir":"Reference","previous_headings":"","what":"Get (allowed) inputs for a pxweb_input_allowed object. — pxe_input","title":"Get (allowed) inputs for a pxweb_input_allowed object. — pxe_input","text":"Get (allowed) inputs pxweb_input_allowed object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_input.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get (allowed) inputs for a pxweb_input_allowed object. — pxe_input","text":"","code":"pxe_input(allowed_input, title = NULL, test_input = NULL) pxe_parse_input(user_input, allowed_input)"},{"path":"https://ropengov.github.io/pxweb/reference/pxe_input.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get (allowed) inputs for a pxweb_input_allowed object. — pxe_input","text":"allowed_input pxweb_input_allowed. title Print (using cat()) ask allowed choices. test_input supplying test input (testing )","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_input.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get (allowed) inputs for a pxweb_input_allowed object. — pxe_input","text":"handles input checks input allowed.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_interactive_get_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Ask to download and download data — pxe_interactive_get_data","title":"Ask to download and download data — pxe_interactive_get_data","text":"Ask download download data","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_interactive_get_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Ask to download and download data — pxe_interactive_get_data","text":"","code":"pxe_interactive_get_data(pxe, test_input = NULL)"},{"path":"https://ropengov.github.io/pxweb/reference/pxe_interactive_get_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Ask to download and download data — pxe_interactive_get_data","text":"pxe pxweb_explorer object full query test_input test input testing function. Since two question, supply vector length two.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_metadata_choices.html","id":null,"dir":"Reference","previous_headings":"","what":"Get and set pxe_metadata_coices — pxe_metadata_choices","title":"Get and set pxe_metadata_coices — pxe_metadata_choices","text":"Get set pxe_metadata_coices","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_metadata_choices.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get and set pxe_metadata_coices — pxe_metadata_choices","text":"","code":"pxe_metadata_choices(x) pxe_metadata_choices(x) <- value"},{"path":"https://ropengov.github.io/pxweb/reference/pxe_metadata_choices.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get and set pxe_metadata_coices — pxe_metadata_choices","text":"x pxweb_explorer object value object set pxe_metadata_choice","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_metadata_variable_names.html","id":null,"dir":"Reference","previous_headings":"","what":"Get the meta data variable names from a pxweb_explorer object. — pxe_metadata_variable_names","title":"Get the meta data variable names from a pxweb_explorer object. — pxe_metadata_variable_names","text":"Get meta data variable names pxweb_explorer object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_metadata_variable_names.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get the meta data variable names from a pxweb_explorer object. — pxe_metadata_variable_names","text":"","code":"pxe_metadata_variable_names(x)"},{"path":"https://ropengov.github.io/pxweb/reference/pxe_metadata_variable_names.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get the meta data variable names from a pxweb_explorer object. — pxe_metadata_variable_names","text":"x pxweb_explorer object","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_position_choice_size.html","id":null,"dir":"Reference","previous_headings":"","what":"How many choices has the current position? — pxe_position_choice_size","title":"How many choices has the current position? — pxe_position_choice_size","text":"many choices current position?","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_position_choice_size.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"How many choices has the current position? — pxe_position_choice_size","text":"","code":"pxe_position_choice_size(x) pxe_position_print_size(x)"},{"path":"https://ropengov.github.io/pxweb/reference/pxe_position_choice_size.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"How many choices has the current position? — pxe_position_choice_size","text":"x pxweb_explorer object check.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_position_is_api_catalogue.html","id":null,"dir":"Reference","previous_headings":"","what":"Is the current position an api_catalogue position? — pxe_position_is_api_catalogue","title":"Is the current position an api_catalogue position? — pxe_position_is_api_catalogue","text":"current position api_catalogue position?","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_position_is_api_catalogue.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is the current position an api_catalogue position? — pxe_position_is_api_catalogue","text":"","code":"pxe_position_is_api_catalogue(x)"},{"path":"https://ropengov.github.io/pxweb/reference/pxe_position_is_api_catalogue.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is the current position an api_catalogue position? — pxe_position_is_api_catalogue","text":"x pxweb_explorer object check.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_position_is_full_query.html","id":null,"dir":"Reference","previous_headings":"","what":"Is the current position a full query (i.e. choices for all metadata variables)? — pxe_position_is_full_query","title":"Is the current position a full query (i.e. choices for all metadata variables)? — pxe_position_is_full_query","text":"current position full query (.e. choices metadata variables)?","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_position_is_full_query.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is the current position a full query (i.e. choices for all metadata variables)? — pxe_position_is_full_query","text":"","code":"pxe_position_is_full_query(x)"},{"path":"https://ropengov.github.io/pxweb/reference/pxe_position_is_full_query.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is the current position a full query (i.e. choices for all metadata variables)? — pxe_position_is_full_query","text":"x pxweb_explorer object check.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_position_is_metadata.html","id":null,"dir":"Reference","previous_headings":"","what":"Is the current position a metadata object? — pxe_position_is_metadata","title":"Is the current position a metadata object? — pxe_position_is_metadata","text":"current position metadata object?","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_position_is_metadata.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is the current position a metadata object? — pxe_position_is_metadata","text":"","code":"pxe_position_is_metadata(x)"},{"path":"https://ropengov.github.io/pxweb/reference/pxe_position_is_metadata.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is the current position a metadata object? — pxe_position_is_metadata","text":"x pxweb_explorer object check.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_position_multiple_choice_allowed.html","id":null,"dir":"Reference","previous_headings":"","what":"Are multiple choices allowed? — pxe_position_multiple_choice_allowed","title":"Are multiple choices allowed? — pxe_position_multiple_choice_allowed","text":"multiple choices allowed?","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_position_multiple_choice_allowed.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Are multiple choices allowed? — pxe_position_multiple_choice_allowed","text":"","code":"pxe_position_multiple_choice_allowed(x)"},{"path":"https://ropengov.github.io/pxweb/reference/pxe_position_multiple_choice_allowed.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Are multiple choices allowed? — pxe_position_multiple_choice_allowed","text":"x pxweb_explorer object check.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_position_title.html","id":null,"dir":"Reference","previous_headings":"","what":"Get the table title for the current position — pxe_position_title","title":"Get the table title for the current position — pxe_position_title","text":"Get table title current position","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_position_title.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get the table title for the current position — pxe_position_title","text":"","code":"pxe_position_title(x)"},{"path":"https://ropengov.github.io/pxweb/reference/pxe_position_title.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get the table title for the current position — pxe_position_title","text":"x pxweb_explorer object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_position_variable_can_be_eliminated.html","id":null,"dir":"Reference","previous_headings":"","what":"Can the variable at the current position be eliminated? — pxe_position_variable_can_be_eliminated","title":"Can the variable at the current position be eliminated? — pxe_position_variable_can_be_eliminated","text":"Can variable current position eliminated?","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_position_variable_can_be_eliminated.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Can the variable at the current position be eliminated? — pxe_position_variable_can_be_eliminated","text":"","code":"pxe_position_variable_can_be_eliminated(x)"},{"path":"https://ropengov.github.io/pxweb/reference/pxe_position_variable_can_be_eliminated.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Can the variable at the current position be eliminated? — pxe_position_variable_can_be_eliminated","text":"x pxweb_explorer object check.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_print_download_code.html","id":null,"dir":"Reference","previous_headings":"","what":"Print code to download query — pxe_print_download_code","title":"Print code to download query — pxe_print_download_code","text":"Print code download query","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_print_download_code.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print code to download query — pxe_print_download_code","text":"","code":"pxe_print_download_code(pxe, as)"},{"path":"https://ropengov.github.io/pxweb/reference/pxe_print_download_code.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print code to download query — pxe_print_download_code","text":"pxe pxweb_query object. json r.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_pxobj_at_position.html","id":null,"dir":"Reference","previous_headings":"","what":"Return the pxweb object at the current position — pxe_pxobj_at_position","title":"Return the pxweb object at the current position — pxe_pxobj_at_position","text":"Return pxweb object current position","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_pxobj_at_position.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Return the pxweb object at the current position — pxe_pxobj_at_position","text":"","code":"pxe_pxobj_at_position(x) pxe_pxobj_at_position(x) <- value"},{"path":"https://ropengov.github.io/pxweb/reference/pxe_pxobj_at_position.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Return the pxweb object at the current position — pxe_pxobj_at_position","text":"x pxweb_explorer object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb-package.html","id":null,"dir":"Reference","previous_headings":"","what":"Interface to PX-WEB APIs from R — pxweb-package","title":"Interface to PX-WEB APIs from R — pxweb-package","text":"PXWEB common web API used many European Statistical agencies disseminate official statistics. pxweb package facilitates connections usage APIs.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb-package.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Interface to PX-WEB APIs from R — pxweb-package","text":"decription PXWEB API : https://www.scb.se/en/-us/--website--terms--use/open-data-api/ official home page PXWEB can found : https://www.scb.se/en/services/statistical-programs--px-files/px-web/","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb.html","id":null,"dir":"Reference","previous_headings":"","what":"S3 constructor for pxweb api object. — pxweb","title":"S3 constructor for pxweb api object. — pxweb","text":"pxwebapi object contain information calls pxweb api keep count number calls. object constructed object also cached R temp folder minimize calls api. urls passed constructor set pxweb api config. Garantuees: base_url pinged sub_path checked config captured API url checked pxweb api (config)","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"S3 constructor for pxweb api object. — pxweb","text":"","code":"pxweb(url) is.pxweb(x) # S3 method for pxweb print(x, ...)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"S3 constructor for pxweb api object. — pxweb","text":"url url pxweb api including language version api. See examples. x object test pxweb object. ... arguments supplied print().","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"S3 constructor for pxweb api object. — pxweb","text":"pxweb object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"S3 constructor for pxweb api object. — pxweb","text":"","code":"if (FALSE) { pxapi_1 <- pxweb(\"https://api.scb.se/OV0104/v1/doris/sv/ssd/START/ME/ME0104/ME0104C/ME0104T24\") pxapi_2 <- pxweb(url = \"https://api.scb.se/OV0104/v1/doris/sv\") }"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_add_api_subpath.html","id":null,"dir":"Reference","previous_headings":"","what":"Add the subpath slot to a pxweb path slot — pxweb_add_api_subpath","title":"Add the subpath slot to a pxweb path slot — pxweb_add_api_subpath","text":"Add subpath slot pxweb path slot","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_add_api_subpath.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add the subpath slot to a pxweb path slot — pxweb_add_api_subpath","text":"","code":"pxweb_add_api_subpath(obj)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_add_api_subpath.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add the subpath slot to a pxweb path slot — pxweb_add_api_subpath","text":"obj object add subpath ","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_add_api_subpath.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Add the subpath slot to a pxweb path slot — pxweb_add_api_subpath","text":"Queries path pos 1 config returned.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_add_call.html","id":null,"dir":"Reference","previous_headings":"","what":"Add an api call to a pxweb_api_s3 object — pxweb_add_call","title":"Add an api call to a pxweb_api_s3 object — pxweb_add_call","text":"pxweb_add_call function add call api call stack, compute Promise: stored rda api object always latest calls thread safe one session time call api.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_add_call.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add an api call to a pxweb_api_s3 object — pxweb_add_call","text":"","code":"pxweb_add_call(obj, time_stamp = Sys.time())"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_add_call.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add an api call to a pxweb_api_s3 object — pxweb_add_call","text":"obj pxweb_api_s3 object","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_add_config.html","id":null,"dir":"Reference","previous_headings":"","what":"Add the config slot to a pxweb object — pxweb_add_config","title":"Add the config slot to a pxweb object — pxweb_add_config","text":"Add config slot pxweb object","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_add_config.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add the config slot to a pxweb object — pxweb_add_config","text":"","code":"pxweb_add_config(obj)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_add_config.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add the config slot to a pxweb object — pxweb_add_config","text":"obj object add config ","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_add_config.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Add the config slot to a pxweb object — pxweb_add_config","text":"Checks exist config object object. Otherwise query api get add call call stack.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_add_mandatory_variables.html","id":null,"dir":"Reference","previous_headings":"","what":"Add mandatory variables to query — pxweb_add_mandatory_variables","title":"Add mandatory variables to query — pxweb_add_mandatory_variables","text":"Add mandatory variables query","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_add_mandatory_variables.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add mandatory variables to query — pxweb_add_mandatory_variables","text":"","code":"pxweb_add_mandatory_variables(pxq, pxmd)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_add_mandatory_variables.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add mandatory variables to query — pxweb_add_mandatory_variables","text":"pxq pxweb_query object. pxmd pxweb_metadata object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_add_mandatory_variables.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Add mandatory variables to query — pxweb_add_mandatory_variables","text":"Complement queries lack explicit requests variables requests every value variables.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_add_metadata_to_query.html","id":null,"dir":"Reference","previous_headings":"","what":"Add and remove metadata to query — pxweb_add_metadata_to_query","title":"Add and remove metadata to query — pxweb_add_metadata_to_query","text":"Add remove metadata query","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_add_metadata_to_query.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add and remove metadata to query — pxweb_add_metadata_to_query","text":"","code":"pxweb_add_metadata_to_query(pxq, pxmd) pxweb_remove_metadata_from_query(pxq, pxmd)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_add_metadata_to_query.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add and remove metadata to query — pxweb_add_metadata_to_query","text":"pxq pxweb_query object. pxmd pxweb_metadata object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_add_metadata_to_query.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Add and remove metadata to query — pxweb_add_metadata_to_query","text":"Add metadata values variables query filter \"\".","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_advanced_get.html","id":null,"dir":"Reference","previous_headings":"","what":"Do a GET call to PXWEB API for advanced users — pxweb_advanced_get","title":"Do a GET call to PXWEB API for advanced users — pxweb_advanced_get","text":"GET call PXWEB API advanced users","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_advanced_get.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Do a GET call to PXWEB API for advanced users — pxweb_advanced_get","text":"","code":"pxweb_advanced_get( url, query = NULL, verbose = TRUE, log_http_calls = FALSE, pxmdo = NULL, ... )"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_advanced_get.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Do a GET call to PXWEB API for advanced users — pxweb_advanced_get","text":"url pxweb object url can coherced pxweb object. query json string, json file list object can coherced pxweb_query object. verbose large queries print progress. log_http_calls http calls API logged (debugging reasons). TRUE, calls responses logged written \"log_pxweb_api_http_calls.txt\" working directory. pxmdo pxweb_metadata object use query. ... arguments sent httr::POST (queries) httr::GET (query = NULL). used query, also supply pxweb_metadata object. Otherwise parameters sent httr::POST httr::GET.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_advanced_get.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Do a GET call to PXWEB API for advanced users — pxweb_advanced_get","text":"function intended advanced users want supply specific arguments httr calls debug httr calls. pxweb_get() wrapper standard use.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_api_catalogue.html","id":null,"dir":"Reference","previous_headings":"","what":"Get the PXWEB API catalogue — pxweb_api_catalogue","title":"Get the PXWEB API catalogue — pxweb_api_catalogue","text":"Get PXWEB API catalogue","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_api_catalogue.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get the PXWEB API catalogue — pxweb_api_catalogue","text":"","code":"pxweb_api_catalogue() pxweb_api_catalogue_from_json(json) pxweb_api_catalogue_from_github(branch = \"master\") pxweb_api_catalogue_path()"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_api_catalogue.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get the PXWEB API catalogue — pxweb_api_catalogue","text":"list implemented API:s.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_api_catalogue.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get the PXWEB API catalogue — pxweb_api_catalogue","text":"","code":"pxweb_api_catalogue() #> $api.scb.se #> Api: api.scb.se #> Statistics Sweden #> ('scb') #> Version(s) : v1 #> Language(s) : en, sv #> Limit(s) : 30 calls per 10 sec. #> 110000 values per call. #> Url template : #> https://api.scb.se/OV0104/[version]/doris/[lang] #> #> $statfin.stat.fi #> Api: statfin.stat.fi #> Statistics Finland #> ('statfi', 'statfin') #> Version(s) : v1 #> Language(s) : en, fi, sv #> Limit(s) : 30 calls per 10 sec. #> 120000 values per call. #> Url template : #> https://statfin.stat.fi/PXWeb/api/[version]/[lang] #> #> $pxwebapi2.stat.fi #> Api: pxwebapi2.stat.fi #> Statistics Finland (old version) #> Version(s) : v1 #> Language(s) : fi #> Limit(s) : 1000 calls per 10 sec. #> 110000 values per call. #> Url template : #> https://pxwebapi2.stat.fi/PXWeb/api/[version]/[lang] #> #> $statistik.sjv.se #> Api: statistik.sjv.se #> The Swedish Agricultural Agency #> ('jordbruksverket') #> Version(s) : v1 #> Language(s) : sv #> Limit(s) : 1000 calls per 10 sec. #> 1000 values per call. #> Url template : #> https://statistik.sjv.se/PXWeb/api/[version]/[lang] #> #> $`fohm-app.folkhalsomyndigheten.se` #> Api: fohm-app.folkhalsomyndigheten.se #> The Public Health Agency of Sweden #> ('fohm') #> Version(s) : v1 #> Language(s) : sv #> Limit(s) : 1000 calls per 10 sec. #> 1000 values per call. #> Url template : #> http://fohm-app.folkhalsomyndigheten.se/Folkhalsodata/api/[version]/[lang] #> #> $statistik.konj.se #> Api: statistik.konj.se #> The Swedish National Institute of Economic Research #> ('konj') #> Version(s) : v1 #> Language(s) : en, sv #> Limit(s) : 10 calls per 10 sec. #> 1000 values per call. #> Url template : #> http://statistik.konj.se/PXWeb/api/[version]/[lang] #> #> $prognos.konj.se #> Api: prognos.konj.se #> The Swedish national institute of economic research, forecast database #> ('konjforcast') #> Version(s) : v1 #> Language(s) : sv #> Limit(s) : 10 calls per 10 sec. #> 1000 values per call. #> Url template : #> http://prognos.konj.se/PXWeb/api/[version]/[lang] #> #> $statdb.luke.fi #> Api: statdb.luke.fi #> LUKE Natural Resources Institute Finland #> ('luke') #> Version(s) : v1 #> Language(s) : en, fi, sv #> Limit(s) : 10 calls per 10 sec. #> 10000 values per call. #> Url template : #> http://statdb.luke.fi/PXWeb/api/[version]/[lang] #> #> $vero2.stat.fi #> Api: vero2.stat.fi #> Verohallinto - Finnish Tax Administration #> ('vero') #> Version(s) : v1 #> Language(s) : en, fi, sv #> Limit(s) : 100 calls per 10 sec. #> 150000 values per call. #> Url template : #> http://vero2.stat.fi/PXWeb/api/[version]/[lang] #> #> $px.hagstofa.is #> Api: px.hagstofa.is #> Statistics Iceland #> ('statice') #> Version(s) : v1 #> Language(s) : en, is #> Limit(s) : 30 calls per 1 sec. #> 10000 values per call. #> Url template : #> http://px.hagstofa.is/px[lang]/api/[version]/[lang] #> #> $statistik.linkoping.se #> Api: statistik.linkoping.se #> Linköping municipality in Sweden #> ('linkoping') #> Version(s) : v1 #> Language(s) : sv #> Limit(s) : 1000 calls per 10 sec. #> 1000 values per call. #> Url template : #> http://statistik.linkoping.se/PXWeb/api/[version]/[lang] #> #> $pxwebb2017.vgregion.se #> Api: pxwebb2017.vgregion.se #> Vastra Gotaland Region in Sweden #> ('vgregion') #> Version(s) : v1 #> Language(s) : sv #> Limit(s) : 10 calls per 10 sec. #> 1000 values per call. #> Url template : #> http://pxwebb2017.vgregion.se/pxweb/api/[version]/[lang] #> #> $bank.stat.gl #> Api: bank.stat.gl #> Statbank Greenland #> ('greenland') #> Version(s) : v1 #> Language(s) : en, kl, da #> Limit(s) : 10000 calls per 10 sec. #> 1000000 values per call. #> Url template : #> https://bank.stat.gl/api/[version]/[lang] #> #> $px.rsv.is #> Api: px.rsv.is #> Icelandic Centre for Retail Studies #> ('rsv') #> Version(s) : v1 #> Language(s) : en, is #> Limit(s) : 30 calls per 1 sec. #> 10000 values per call. #> Url template : #> http://px.rsv.is/PXWeb/api/[version]/[lang] #> #> $statbank.hagstova.fo #> Api: statbank.hagstova.fo #> Statistics Faroe Islands #> ('hagstovan') #> Version(s) : v1 #> Language(s) : en, fo #> Limit(s) : 1000000 calls per 1000000 sec. #> 100000 values per call. #> Url template : #> https://statbank.hagstova.fo:443/api/[version]/[lang] #> #> $data.ssb.no #> Api: data.ssb.no #> Statistics Norway #> ('ssb') #> Version(s) : v0 #> Language(s) : en, no #> Limit(s) : 30 calls per 60 sec. #> 30000 values per call. #> Url template : #> http://data.ssb.no/api/[version]/[lang] #> #> $pxweb.asub.ax #> Api: pxweb.asub.ax #> Statistics Aland #> ('asub') #> Version(s) : v1 #> Language(s) : en, sv #> Limit(s) : 10 calls per 10 sec. #> 1000 values per call. #> Url template : #> https://pxweb.asub.ax/PXWeb/api/[version]/[lang]/ #> #> $makstat.stat.gov.mk #> Api: makstat.stat.gov.mk #> State Statistical Office of the Republic of Macedonia #> ('makstat') #> Version(s) : v1 #> Language(s) : en, mk #> Limit(s) : 30 calls per 1 sec. #> 10000 values per call. #> Url template : #> https://makstat.stat.gov.mk/PXWeb/api/[version]/[lang]/MakStat/ #> #> $data.stat.gov.lv #> Api: data.stat.gov.lv #> Latvia - official statistics #> ('csb_lv') #> Version(s) : v1 #> Language(s) : en, lv #> Limit(s) : 100 calls per 10 sec. #> 3800 values per call. #> Url template : #> https://data.stat.gov.lv/api/[version]/[lang]/ #> #> $statbank.statistica.md #> Api: statbank.statistica.md #> Statistics Moldova #> ('statistica_md') #> Version(s) : v1 #> Language(s) : en, ro #> Limit(s) : 10 calls per 10 sec. #> 1000 values per call. #> Url template : #> https://statbank.statistica.md/pxweb/api/[version]/[lang]/ #> #> $www.pxweb.bfs.admin.ch #> Api: www.pxweb.bfs.admin.ch #> Statistics Switzerland #> ('switzerland') #> Version(s) : v1 #> Language(s) : en, de, fr #> Limit(s) : 10 calls per 10 sec. #> 5000 values per call. #> Url template : #> https://www.pxweb.bfs.admin.ch/api/[version]/[lang] #> #> $`askdata.rks-gov.net` #> Api: askdata.rks-gov.net #> Statistics Kosovo #> ('askdata') #> Version(s) : v1 #> Language(s) : en #> Limit(s) : 10 calls per 10 sec. #> 1000 values per call. #> Url template : #> https://askdata.rks-gov.net/PXWeb/api/[version]/[lang]/ #> #> $trafi2.stat.fi #> Api: trafi2.stat.fi #> Finnish Transport Safety Agency #> ('trafi2') #> Version(s) : v1 #> Language(s) : en, sv, fi #> Limit(s) : 100 calls per 10 sec. #> 110000 values per call. #> Url template : #> https://trafi2.stat.fi/PXWeb/api/[version]/[lang]/ #> #> $w3.unece.org #> Api: w3.unece.org #> United Nations Economic Commission for Europe #> ('unece') #> Version(s) : v1 #> Language(s) : en #> Limit(s) : 10 calls per 10 sec. #> 100000 values per call. #> Url template : #> https://w3.unece.org/PXWeb2015/api/[version]/[lang]/ #> #> $`www.grande-region.lu` #> Api: www.grande-region.lu #> Portail statistique de la Grande Région #> ('grande-region') #> Version(s) : v1 #> Language(s) : fr, de #> Limit(s) : 10 calls per 10 sec. #> 1000 values per call. #> Url template : #> https://www.grande-region.lu/pxweb/api/[version]/[lang] #> #> $visitfinland.stat.fi #> Api: visitfinland.stat.fi #> Visit Finland (Rudolf service) #> Version(s) : v1 #> Language(s) : fi #> Limit(s) : 20 calls per 10 sec. #> 110000 values per call. #> Url template : #> http://visitfinland.stat.fi/PXWeb/api/[version]/[lang]/VisitFinland #> #> $stat.hel.fi #> Api: stat.hel.fi #> Helsingin seudun aluesarjat -tilastotietokanta #> Version(s) : v1 #> Language(s) : fi #> Limit(s) : 1000 calls per 10 sec. #> 100000 values per call. #> Url template : #> https://stat.hel.fi/api/[version]/[lang] #> #> $andmed.stat.ee #> Api: andmed.stat.ee #> Estonia - official statistics #> ('stat_ee') #> Version(s) : v1 #> Language(s) : en, et #> Limit(s) : 1000 calls per 10 sec. #> 1000000 values per call. #> Url template : #> https://andmed.stat.ee/api/[version]/[lang]/stat #> #> $pxweb.nordicstatistics.org #> Api: pxweb.nordicstatistics.org #> Nordic Statistics Database #> Version(s) : v1 #> Language(s) : en #> Limit(s) : 10 calls per 10 sec. #> 1000 values per call. #> Url template : #> https://pxweb.nordicstatistics.org/api/[version]/[lang]/ #> #> $pxweb.stat.si #> Api: pxweb.stat.si #> SiStat Database #> Version(s) : v1 #> Language(s) : sl #> Limit(s) : 100 calls per 10 sec. #> 10000000 values per call. #> Url template : #> https://pxweb.stat.si/SiStatData/api/[version]/[lang]/Data #> #> attr(,\"class\") #> [1] \"pxweb_api_catalogue\" \"list\""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_api_catalogue_entry.html","id":null,"dir":"Reference","previous_headings":"","what":"Constructor for pxweb_api_catalogue_entry. — pxweb_api_catalogue_entry","title":"Constructor for pxweb_api_catalogue_entry. — pxweb_api_catalogue_entry","text":"Constructor pxweb_api_catalogue_entry.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_api_catalogue_entry.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Constructor for pxweb_api_catalogue_entry. — pxweb_api_catalogue_entry","text":"","code":"pxweb_api_catalogue_entry(x) # S3 method for list pxweb_api_catalogue_entry(x) assert_pxweb_api_catalogue_entry(x)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_api_catalogue_entry.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Constructor for pxweb_api_catalogue_entry. — pxweb_api_catalogue_entry","text":"x object assert pxweb_api_catalogue_entry.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_api_name.html","id":null,"dir":"Reference","previous_headings":"","what":"Get the api name, rootpath, subpath, path or dbpath — pxweb_api_name","title":"Get the api name, rootpath, subpath, path or dbpath — pxweb_api_name","text":"Get api name, rootpath, subpath, path dbpath","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_api_name.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get the api name, rootpath, subpath, path or dbpath — pxweb_api_name","text":"","code":"pxweb_api_name(x) # S3 method for url pxweb_api_name(x) # S3 method for pxweb pxweb_api_name(x) # S3 method for pxweb_api_catalogue_entry pxweb_api_name(x) # S3 method for pxweb_explorer pxweb_api_name(x) pxweb_api_rootpath(x) # S3 method for url pxweb_api_rootpath(x) # S3 method for pxweb pxweb_api_rootpath(x) # S3 method for pxweb_explorer pxweb_api_rootpath(x) pxweb_api_subpath(x, init_slash = TRUE, as_vector = FALSE) # S3 method for pxweb pxweb_api_subpath(x, init_slash = TRUE, as_vector = FALSE) # S3 method for pxweb_explorer pxweb_api_subpath(x, init_slash = TRUE, as_vector = FALSE) pxweb_api_path(x, init_slash = TRUE, as_vector = FALSE) # S3 method for url pxweb_api_path(x, init_slash = TRUE, as_vector = FALSE) # S3 method for pxweb pxweb_api_path(x, init_slash = TRUE, as_vector = FALSE) # S3 method for pxweb_explorer pxweb_api_path(x, init_slash = TRUE, as_vector = FALSE) pxweb_api_dbpath(x, init_slash = TRUE, as_vector = FALSE) # S3 method for pxweb pxweb_api_dbpath(x, init_slash = TRUE, as_vector = FALSE) # S3 method for pxweb_explorer pxweb_api_path(x, init_slash = TRUE, as_vector = FALSE) assert_path(x) pxe_position_path( x, init_slash = TRUE, as_vector = FALSE, include_rootpath = FALSE ) pxe_metadata_path(x, as_vector = FALSE)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_api_name.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get the api name, rootpath, subpath, path or dbpath — pxweb_api_name","text":"x object get name path init_slash subpath path start /. Default TRUE. as_vector subpath path vector split /. Default FALSE. include_rootpath rootpath included? Default FALSE","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_api_name.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get the api name, rootpath, subpath, path or dbpath — pxweb_api_name","text":"PXWEB API contain following path: API-NAME/API-VERSION/LANGUAGE/DATABASE-ID//TABLE-ID full url made rootpath, subpath, path. rootpath made protocol API-NAME / hostname protocol (). subpath contain API-VERSION LANGUAGE can contain parts well. subpath shortest config can called . can seen base API. dbpath, data base path, contain DATABASE-ID//TABLE-ID. path, standar path url, .e. subpath + dbpath. path ends slash, subpath dbpath may begin slash, see parameters","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_as_data_frame.html","id":null,"dir":"Reference","previous_headings":"","what":"Coerce a pxweb_data object to a data.frame — pxweb_as_data_frame","title":"Coerce a pxweb_data object to a data.frame — pxweb_as_data_frame","text":"Coerce pxweb_data object data.frame","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_as_data_frame.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Coerce a pxweb_data object to a data.frame — pxweb_as_data_frame","text":"","code":"pxweb_as_data_frame( x, row.names = NULL, optional = FALSE, ..., stringsAsFactors = FALSE, column.name.type = \"text\", variable.value.type = \"text\" ) # S3 method for pxweb_data pxweb_as_data_frame( x, row.names = NULL, optional = FALSE, ..., stringsAsFactors = FALSE, column.name.type = \"text\", variable.value.type = \"text\" ) # S3 method for pxweb_data_comments pxweb_as_data_frame( x, row.names = NULL, optional = FALSE, ..., stringsAsFactors = FALSE ) # S3 method for pxweb_data_comment pxweb_as_data_frame( x, row.names = NULL, optional = FALSE, ..., stringsAsFactors = FALSE ) # S3 method for pxweb_levels pxweb_as_data_frame( x, row.names = NULL, optional = FALSE, ..., stringsAsFactors = FALSE ) # S3 method for pxweb_data as.data.frame( x, row.names = NULL, optional = FALSE, ..., stringsAsFactors = FALSE, column.name.type = \"text\", variable.value.type = \"text\" ) # S3 method for pxweb_data_comments as.data.frame( x, row.names = NULL, optional = FALSE, ..., stringsAsFactors = FALSE ) # S3 method for pxweb_levels as.data.frame( x, row.names = NULL, optional = FALSE, ..., stringsAsFactors = FALSE ) # S3 method for pxweb_metadata as.data.frame( x, row.names = NULL, optional = FALSE, ..., stringsAsFactors = FALSE ) pxweb_as_matrix( x, row.names = NULL, column.name.type = \"text\", variable.value.type = \"text\" ) # S3 method for pxweb_data pxweb_as_matrix( x, row.names = NULL, column.name.type = \"text\", variable.value.type = \"text\" ) # S3 method for pxweb_data as.matrix( x, ..., row.names = NULL, column.name.type = \"text\", variable.value.type = \"text\" ) pxweb_pxd_slot_idx_pos(x)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_as_data_frame.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Coerce a pxweb_data object to a data.frame — pxweb_as_data_frame","text":"x object convert data.frame. row.names See .data.frame. optional See .data.frame. ... See .data.frame. stringsAsFactors See .data.frame. column.name.type character: code text used column names? variable.value.type character: code text used values columns?","code":""},{"path":[]},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_as_json.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert object to json — pxweb_as_json","title":"Convert object to json — pxweb_as_json","text":"Convert object json","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_as_json.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert object to json — pxweb_as_json","text":"","code":"pxweb_as_json(x) # S3 method for pxweb_query pxweb_as_json(x)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_as_json.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert object to json — pxweb_as_json","text":"x object convert.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_c.html","id":null,"dir":"Reference","previous_headings":"","what":"Combine pxweb objects — pxweb_c","title":"Combine pxweb objects — pxweb_c","text":"Combine pxweb objects","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_c.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Combine pxweb objects — pxweb_c","text":"","code":"pxweb_c(x)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_c.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Combine pxweb objects — pxweb_c","text":"x list pxweb objects.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_cite.html","id":null,"dir":"Reference","previous_headings":"","what":"Cite a PXWEB data object — pxweb_cite","title":"Cite a PXWEB data object — pxweb_cite","text":"Cite PXWEB data object","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_cite.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Cite a PXWEB data object — pxweb_cite","text":"","code":"pxweb_cite(x, style = \"citation\")"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_cite.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Cite a PXWEB data object — pxweb_cite","text":"x pxweb_data object cite. style see bibentry.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_cite.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Cite a PXWEB data object — pxweb_cite","text":"Functionality automatic cite PXWEB data objects.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_clear_cache.html","id":null,"dir":"Reference","previous_headings":"","what":"Clear cache of all (or one) pxweb object — pxweb_clear_cache","title":"Clear cache of all (or one) pxweb object — pxweb_clear_cache","text":"Clear cache (one) pxweb object","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_clear_cache.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Clear cache of all (or one) pxweb object — pxweb_clear_cache","text":"","code":"pxweb_clear_cache(x = NULL)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_clear_cache.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Clear cache of all (or one) pxweb object — pxweb_clear_cache","text":"x pxweb object clear cache . Default NULL (clear everything).","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_clear_cache.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Clear cache of all (or one) pxweb object — pxweb_clear_cache","text":"Clean cache sleep restore api timing limit.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Construct a pxweb_data object. — pxweb_data","title":"Construct a pxweb_data object. — pxweb_data","text":"object contain data given PXWEB table.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Construct a pxweb_data object. — pxweb_data","text":"","code":"pxweb_data(x)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Construct a pxweb_data object. — pxweb_data","text":"x list returned PXWEB API convert pxweb_data object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Construct a pxweb_data object. — pxweb_data","text":"pxweb_data object","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_data_c.html","id":null,"dir":"Reference","previous_headings":"","what":"Combine pxweb objects — pxweb_data_c","title":"Combine pxweb objects — pxweb_data_c","text":"Combine pxweb objects","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_data_c.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Combine pxweb objects — pxweb_data_c","text":"","code":"pxweb_data_c(x)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_data_c.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Combine pxweb objects — pxweb_data_c","text":"x list pxweb objects.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_data_colnames.html","id":null,"dir":"Reference","previous_headings":"","what":"Get query filter — pxweb_data_colnames","title":"Get query filter — pxweb_data_colnames","text":"Get query filter","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_data_colnames.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get query filter — pxweb_data_colnames","text":"","code":"pxweb_data_colnames(pxd, type = \"text\")"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_data_colnames.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get query filter — pxweb_data_colnames","text":"pxd pxweb_data object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_data_colnames.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get query filter — pxweb_data_colnames","text":"character vector column names.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_data_column_comment.html","id":null,"dir":"Reference","previous_headings":"","what":"Construct a pxweb_data_comment object — pxweb_data_column_comment","title":"Construct a pxweb_data_comment object — pxweb_data_column_comment","text":"Construct pxweb_data_comment object","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_data_column_comment.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Construct a pxweb_data_comment object — pxweb_data_column_comment","text":"","code":"pxweb_data_column_comment(x, column_idx) pxweb_data_value_comment(x, comment_idx) pxweb_data_obs_comment(x, obs_idx)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_data_column_comment.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Construct a pxweb_data_comment object — pxweb_data_column_comment","text":"x pxweb_data extract pxweb_data_comment object . column_idx index column extract. comment_idx index comment extract. obs_idx index comment extract.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_data_comments.html","id":null,"dir":"Reference","previous_headings":"","what":"Construct a pxweb_data_comments object. — pxweb_data_comments","title":"Construct a pxweb_data_comments object. — pxweb_data_comments","text":"object contain comments given PXWEB table.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_data_comments.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Construct a pxweb_data_comments object. — pxweb_data_comments","text":"","code":"pxweb_data_comments(x) # S3 method for pxweb_data pxweb_data_comments(x)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_data_comments.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Construct a pxweb_data_comments object. — pxweb_data_comments","text":"x pxweb_data object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_data_comments.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Construct a pxweb_data_comments object. — pxweb_data_comments","text":"pxweb_data_comments object","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_data_comments.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Construct a pxweb_data_comments object. — pxweb_data_comments","text":"","code":"if (FALSE) { url <- \"https://api.scb.se/OV0104/v1/doris/en/ssd/BE/BE0101/BE0101A/BefolkningNy\" json_query <- file.path(system.file(package = \"pxweb\"), \"extdata\", \"examples\", \"json_query_example.json\") pxd <- pxweb_get(url = url, query = json_query) pxdcs <- pxweb_data_comments(x = pxd) pxdc_df <- as.data.frame(pxdcs, stringsAsFactors = TRUE) }"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_data_dim.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute the dimension of the query pxweb_data object — pxweb_data_dim","title":"Compute the dimension of the query pxweb_data object — pxweb_data_dim","text":"Compute dimension query pxweb_data object","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_data_dim.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute the dimension of the query pxweb_data object — pxweb_data_dim","text":"","code":"pxweb_data_dim(pxd)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_data_dim.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute the dimension of the query pxweb_data object — pxweb_data_dim","text":"pxd pxweb_data object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_data_jsonstat.html","id":null,"dir":"Reference","previous_headings":"","what":"Construct a pxweb_data_jsonstat object. — pxweb_data_jsonstat","title":"Construct a pxweb_data_jsonstat object. — pxweb_data_jsonstat","text":"object contain data given PXWEB table.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_data_jsonstat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Construct a pxweb_data_jsonstat object. — pxweb_data_jsonstat","text":"","code":"pxweb_data_jsonstat(x)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_data_jsonstat.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Construct a pxweb_data_jsonstat object. — pxweb_data_jsonstat","text":"x list returned PXWEB API convert pxweb_data_jsonstat object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_data_jsonstat.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Construct a pxweb_data_jsonstat object. — pxweb_data_jsonstat","text":"pxweb_data_jsonstat object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_database_list.html","id":null,"dir":"Reference","previous_headings":"","what":"Construct a pxweb_database_list object. — pxweb_database_list","title":"Construct a pxweb_database_list object. — pxweb_database_list","text":"object contain list databases given PXWEB api.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_database_list.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Construct a pxweb_database_list object. — pxweb_database_list","text":"","code":"pxweb_database_list(x)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_database_list.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Construct a pxweb_database_list object. — pxweb_database_list","text":"x list returned PXWEB API convert pxweb_database_list object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_database_list.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Construct a pxweb_database_list object. — pxweb_database_list","text":"pxweb_database_list object","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_explorer.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a pxweb_explorer object. — pxweb_explorer","title":"Create a pxweb_explorer object. — pxweb_explorer","text":"position current position api, character vector root. Note position alway correct url. Metadata choices part position root bottom path (position) user can go. length 0, user can essentially go hostname. paste(root_path + position, collapse = \"/\") used construct path position case url. print bar separation purposes","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_explorer.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a pxweb_explorer object. — pxweb_explorer","text":"","code":"pxweb_explorer(x = NULL) # S3 method for `NULL` pxweb_explorer(x) # S3 method for character pxweb_explorer(x) # S3 method for pxweb pxweb_explorer(x) # S3 method for pxweb_api_catalogue_entry pxweb_explorer(x) assert_pxweb_explorer(x) # S3 method for pxweb_explorer print(x, ...) print_bar() pxe_print_choices(x)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_explorer.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a pxweb_explorer object. — pxweb_explorer","text":"x pxweb object, PXWEB url, NULL api api catalogue.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_explorer.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a pxweb_explorer object. — pxweb_explorer","text":"","code":"## The functions below are internal generic functions ## x <- pxweb_explorer() ## url <- \"api.scb.se\" ## x <- pxweb_explorer(x = url) ## url <- \"https://api.scb.se/OV0104/v1/doris/en/ssd/BE/BE0101/BE0101A/\" ## x <- pxweb_explorer(x = url) ## url <- \"https://api.scb.se/OV0104/v1/doris/en/ssd/BE/BE0101/BE0101A/BefolkningNy\" ## x <- pxweb_explorer(x = url)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_fix_url.html","id":null,"dir":"Reference","previous_headings":"","what":"Fix url characters — pxweb_fix_url","title":"Fix url characters — pxweb_fix_url","text":"Fix url characters","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_fix_url.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fix url characters — pxweb_fix_url","text":"","code":"pxweb_fix_url(x)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_fix_url.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fix url characters — pxweb_fix_url","text":"x string fix","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_get.html","id":null,"dir":"Reference","previous_headings":"","what":"Do a GET call to PXWEB API — pxweb_get","title":"Do a GET call to PXWEB API — pxweb_get","text":"GET call PXWEB API","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_get.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Do a GET call to PXWEB API — pxweb_get","text":"","code":"pxweb_get(url, query = NULL, verbose = TRUE)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_get.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Do a GET call to PXWEB API — pxweb_get","text":"url pxweb object url can coherced pxweb object. query json string, json file list object can coherced pxweb_query object. verbose large queries print progress.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_get.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Do a GET call to PXWEB API — pxweb_get","text":"","code":"if (FALSE) { url <- \"https://api.scb.se/OV0104/v1/doris/sv/ssd/BE/BE0101/BE0101A/BefolkningNy\" px_meta_data <- pxweb_get(url) url <- \"https://api.scb.se/OV0104/v1/doris/sv/ssd/BE/BE0101\" px_levels <- pxweb_get(url) url <- \"https://api.scb.se/OV0104/v1/doris/sv\" px_levels <- pxweb_get(url) url <- \"https://api.scb.se/OV0104/v1/doris/sv/ssd/BE/BE0101/BE0101A/BefolkningNy\" query <- file.path( system.file(package = \"pxweb\"), \"extdata\", \"examples\", \"json_query_example.json\" ) px_data <- pxweb_get(url = url, query = query) # Convert to data.frame as.data.frame(px_data, column.name.type = \"text\", variable.value.type = \"text\") # Get raw data as.matrix(px_data, column.name.type = \"code\", variable.value.type = \"code\") # Get data comments pxweb_data_comments(px_data) # Get jsonstat data jstat <- query <- file.path( system.file(package = \"pxweb\"), \"extdata\", \"examples\", \"json-stat_query_example.json\" ) jstat_data <- pxweb_get(url = url, query = query) # Get very large datasets (multiple downloads needed) big_query <- file.path( system.file(package = \"pxweb\"), \"extdata\", \"examples\", \"json_big_query_example.json\" ) px_data <- pxweb_get(url = url, query = big_query) }"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_get_api_test_data_frame.html","id":null,"dir":"Reference","previous_headings":"","what":"Build api test data.frame — pxweb_get_api_test_data_frame","title":"Build api test data.frame — pxweb_get_api_test_data_frame","text":"Build api test data.frame","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_get_api_test_data_frame.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Build api test data.frame — pxweb_get_api_test_data_frame","text":"","code":"pxweb_get_api_test_data_frame(x)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_get_api_test_data_frame.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Build api test data.frame — pxweb_get_api_test_data_frame","text":"x pxweb object","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_get_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Do a GET call to PXWEB API and return a data.frame — pxweb_get_data","title":"Do a GET call to PXWEB API and return a data.frame — pxweb_get_data","text":"GET call PXWEB API return data.frame","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_get_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Do a GET call to PXWEB API and return a data.frame — pxweb_get_data","text":"","code":"pxweb_get_data( url, query, verbose = TRUE, column.name.type = \"text\", variable.value.type = \"text\" )"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_get_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Do a GET call to PXWEB API and return a data.frame — pxweb_get_data","text":"url pxweb object url can coherced pxweb object. query json string, json file list object can coherced pxweb_query object. verbose large queries print progress. column.name.type character: code text used column names? variable.value.type character: code text used values columns?","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_get_data.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Do a GET call to PXWEB API and return a data.frame — pxweb_get_data","text":"functions use pxweb_query PXWEB url return data.frame. wrapper pxweb_get function.","code":""},{"path":[]},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_get_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Do a GET call to PXWEB API and return a data.frame — pxweb_get_data","text":"","code":"if (FALSE) { url <- \"https://api.scb.se/OV0104/v1/doris/sv/ssd/BE/BE0101/BE0101A/BefolkningNy\" query <- file.path( system.file(package = \"pxweb\"), \"extdata\", \"examples\", \"json_query_example.json\" ) df <- pxweb_get_data(url = url, query = query) }"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_http_log_on.html","id":null,"dir":"Reference","previous_headings":"","what":"Setup a structure to log all API calls — pxweb_http_log_on","title":"Setup a structure to log all API calls — pxweb_http_log_on","text":"Setup structure log API calls","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_http_log_on.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Setup a structure to log all API calls — pxweb_http_log_on","text":"","code":"pxweb_http_log_on(fn = \"log_pxweb_api_http_calls.txt\") pxweb_http_log_off() pxweb_log_paths_path() pxweb_http_log_is_on() pxweb_http_log_response(r) pxweb_response_to_log_as_json(r)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_http_log_on.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Setup a structure to log all API calls — pxweb_http_log_on","text":"fn file name log file.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_http_log_on.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Setup a structure to log all API calls — pxweb_http_log_on","text":"Set internal structure handle http PXWEB API calls. http calls stored log file. access path log file, path stored pxweb folder tempdir(). path given pxweb_log_paths_path(). file exists, http calls logged (appended) log file object contains path.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_interactive.html","id":null,"dir":"Reference","previous_headings":"","what":"Find and download data interactively from a PXWEB API — pxweb_interactive","title":"Find and download data interactively from a PXWEB API — pxweb_interactive","text":"Wrapper function (pxweb_get) simply find download data current R session.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_interactive.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find and download data interactively from a PXWEB API — pxweb_interactive","text":"","code":"pxweb_interactive(x = NULL) interactive_pxweb(x = NULL)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_interactive.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find and download data interactively from a PXWEB API — pxweb_interactive","text":"x name alias pxweb api connect , pxweb object url.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_interactive.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find and download data interactively from a PXWEB API — pxweb_interactive","text":"function returns list three slots: url: URL data query: query access data data: downloaded data (chosen download data)","code":""},{"path":[]},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_interactive.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find and download data interactively from a PXWEB API — pxweb_interactive","text":"","code":"pxweb_api_catalogue() # List apis #> $api.scb.se #> Api: api.scb.se #> Statistics Sweden #> ('scb') #> Version(s) : v1 #> Language(s) : en, sv #> Limit(s) : 30 calls per 10 sec. #> 110000 values per call. #> Url template : #> https://api.scb.se/OV0104/[version]/doris/[lang] #> #> $statfin.stat.fi #> Api: statfin.stat.fi #> Statistics Finland #> ('statfi', 'statfin') #> Version(s) : v1 #> Language(s) : en, fi, sv #> Limit(s) : 30 calls per 10 sec. #> 120000 values per call. #> Url template : #> https://statfin.stat.fi/PXWeb/api/[version]/[lang] #> #> $pxwebapi2.stat.fi #> Api: pxwebapi2.stat.fi #> Statistics Finland (old version) #> Version(s) : v1 #> Language(s) : fi #> Limit(s) : 1000 calls per 10 sec. #> 110000 values per call. #> Url template : #> https://pxwebapi2.stat.fi/PXWeb/api/[version]/[lang] #> #> $statistik.sjv.se #> Api: statistik.sjv.se #> The Swedish Agricultural Agency #> ('jordbruksverket') #> Version(s) : v1 #> Language(s) : sv #> Limit(s) : 1000 calls per 10 sec. #> 1000 values per call. #> Url template : #> https://statistik.sjv.se/PXWeb/api/[version]/[lang] #> #> $`fohm-app.folkhalsomyndigheten.se` #> Api: fohm-app.folkhalsomyndigheten.se #> The Public Health Agency of Sweden #> ('fohm') #> Version(s) : v1 #> Language(s) : sv #> Limit(s) : 1000 calls per 10 sec. #> 1000 values per call. #> Url template : #> http://fohm-app.folkhalsomyndigheten.se/Folkhalsodata/api/[version]/[lang] #> #> $statistik.konj.se #> Api: statistik.konj.se #> The Swedish National Institute of Economic Research #> ('konj') #> Version(s) : v1 #> Language(s) : en, sv #> Limit(s) : 10 calls per 10 sec. #> 1000 values per call. #> Url template : #> http://statistik.konj.se/PXWeb/api/[version]/[lang] #> #> $prognos.konj.se #> Api: prognos.konj.se #> The Swedish national institute of economic research, forecast database #> ('konjforcast') #> Version(s) : v1 #> Language(s) : sv #> Limit(s) : 10 calls per 10 sec. #> 1000 values per call. #> Url template : #> http://prognos.konj.se/PXWeb/api/[version]/[lang] #> #> $statdb.luke.fi #> Api: statdb.luke.fi #> LUKE Natural Resources Institute Finland #> ('luke') #> Version(s) : v1 #> Language(s) : en, fi, sv #> Limit(s) : 10 calls per 10 sec. #> 10000 values per call. #> Url template : #> http://statdb.luke.fi/PXWeb/api/[version]/[lang] #> #> $vero2.stat.fi #> Api: vero2.stat.fi #> Verohallinto - Finnish Tax Administration #> ('vero') #> Version(s) : v1 #> Language(s) : en, fi, sv #> Limit(s) : 100 calls per 10 sec. #> 150000 values per call. #> Url template : #> http://vero2.stat.fi/PXWeb/api/[version]/[lang] #> #> $px.hagstofa.is #> Api: px.hagstofa.is #> Statistics Iceland #> ('statice') #> Version(s) : v1 #> Language(s) : en, is #> Limit(s) : 30 calls per 1 sec. #> 10000 values per call. #> Url template : #> http://px.hagstofa.is/px[lang]/api/[version]/[lang] #> #> $statistik.linkoping.se #> Api: statistik.linkoping.se #> Linköping municipality in Sweden #> ('linkoping') #> Version(s) : v1 #> Language(s) : sv #> Limit(s) : 1000 calls per 10 sec. #> 1000 values per call. #> Url template : #> http://statistik.linkoping.se/PXWeb/api/[version]/[lang] #> #> $pxwebb2017.vgregion.se #> Api: pxwebb2017.vgregion.se #> Vastra Gotaland Region in Sweden #> ('vgregion') #> Version(s) : v1 #> Language(s) : sv #> Limit(s) : 10 calls per 10 sec. #> 1000 values per call. #> Url template : #> http://pxwebb2017.vgregion.se/pxweb/api/[version]/[lang] #> #> $bank.stat.gl #> Api: bank.stat.gl #> Statbank Greenland #> ('greenland') #> Version(s) : v1 #> Language(s) : en, kl, da #> Limit(s) : 10000 calls per 10 sec. #> 1000000 values per call. #> Url template : #> https://bank.stat.gl/api/[version]/[lang] #> #> $px.rsv.is #> Api: px.rsv.is #> Icelandic Centre for Retail Studies #> ('rsv') #> Version(s) : v1 #> Language(s) : en, is #> Limit(s) : 30 calls per 1 sec. #> 10000 values per call. #> Url template : #> http://px.rsv.is/PXWeb/api/[version]/[lang] #> #> $statbank.hagstova.fo #> Api: statbank.hagstova.fo #> Statistics Faroe Islands #> ('hagstovan') #> Version(s) : v1 #> Language(s) : en, fo #> Limit(s) : 1000000 calls per 1000000 sec. #> 100000 values per call. #> Url template : #> https://statbank.hagstova.fo:443/api/[version]/[lang] #> #> $data.ssb.no #> Api: data.ssb.no #> Statistics Norway #> ('ssb') #> Version(s) : v0 #> Language(s) : en, no #> Limit(s) : 30 calls per 60 sec. #> 30000 values per call. #> Url template : #> http://data.ssb.no/api/[version]/[lang] #> #> $pxweb.asub.ax #> Api: pxweb.asub.ax #> Statistics Aland #> ('asub') #> Version(s) : v1 #> Language(s) : en, sv #> Limit(s) : 10 calls per 10 sec. #> 1000 values per call. #> Url template : #> https://pxweb.asub.ax/PXWeb/api/[version]/[lang]/ #> #> $makstat.stat.gov.mk #> Api: makstat.stat.gov.mk #> State Statistical Office of the Republic of Macedonia #> ('makstat') #> Version(s) : v1 #> Language(s) : en, mk #> Limit(s) : 30 calls per 1 sec. #> 10000 values per call. #> Url template : #> https://makstat.stat.gov.mk/PXWeb/api/[version]/[lang]/MakStat/ #> #> $data.stat.gov.lv #> Api: data.stat.gov.lv #> Latvia - official statistics #> ('csb_lv') #> Version(s) : v1 #> Language(s) : en, lv #> Limit(s) : 100 calls per 10 sec. #> 3800 values per call. #> Url template : #> https://data.stat.gov.lv/api/[version]/[lang]/ #> #> $statbank.statistica.md #> Api: statbank.statistica.md #> Statistics Moldova #> ('statistica_md') #> Version(s) : v1 #> Language(s) : en, ro #> Limit(s) : 10 calls per 10 sec. #> 1000 values per call. #> Url template : #> https://statbank.statistica.md/pxweb/api/[version]/[lang]/ #> #> $www.pxweb.bfs.admin.ch #> Api: www.pxweb.bfs.admin.ch #> Statistics Switzerland #> ('switzerland') #> Version(s) : v1 #> Language(s) : en, de, fr #> Limit(s) : 10 calls per 10 sec. #> 5000 values per call. #> Url template : #> https://www.pxweb.bfs.admin.ch/api/[version]/[lang] #> #> $`askdata.rks-gov.net` #> Api: askdata.rks-gov.net #> Statistics Kosovo #> ('askdata') #> Version(s) : v1 #> Language(s) : en #> Limit(s) : 10 calls per 10 sec. #> 1000 values per call. #> Url template : #> https://askdata.rks-gov.net/PXWeb/api/[version]/[lang]/ #> #> $trafi2.stat.fi #> Api: trafi2.stat.fi #> Finnish Transport Safety Agency #> ('trafi2') #> Version(s) : v1 #> Language(s) : en, sv, fi #> Limit(s) : 100 calls per 10 sec. #> 110000 values per call. #> Url template : #> https://trafi2.stat.fi/PXWeb/api/[version]/[lang]/ #> #> $w3.unece.org #> Api: w3.unece.org #> United Nations Economic Commission for Europe #> ('unece') #> Version(s) : v1 #> Language(s) : en #> Limit(s) : 10 calls per 10 sec. #> 100000 values per call. #> Url template : #> https://w3.unece.org/PXWeb2015/api/[version]/[lang]/ #> #> $`www.grande-region.lu` #> Api: www.grande-region.lu #> Portail statistique de la Grande Région #> ('grande-region') #> Version(s) : v1 #> Language(s) : fr, de #> Limit(s) : 10 calls per 10 sec. #> 1000 values per call. #> Url template : #> https://www.grande-region.lu/pxweb/api/[version]/[lang] #> #> $visitfinland.stat.fi #> Api: visitfinland.stat.fi #> Visit Finland (Rudolf service) #> Version(s) : v1 #> Language(s) : fi #> Limit(s) : 20 calls per 10 sec. #> 110000 values per call. #> Url template : #> http://visitfinland.stat.fi/PXWeb/api/[version]/[lang]/VisitFinland #> #> $stat.hel.fi #> Api: stat.hel.fi #> Helsingin seudun aluesarjat -tilastotietokanta #> Version(s) : v1 #> Language(s) : fi #> Limit(s) : 1000 calls per 10 sec. #> 100000 values per call. #> Url template : #> https://stat.hel.fi/api/[version]/[lang] #> #> $andmed.stat.ee #> Api: andmed.stat.ee #> Estonia - official statistics #> ('stat_ee') #> Version(s) : v1 #> Language(s) : en, et #> Limit(s) : 1000 calls per 10 sec. #> 1000000 values per call. #> Url template : #> https://andmed.stat.ee/api/[version]/[lang]/stat #> #> $pxweb.nordicstatistics.org #> Api: pxweb.nordicstatistics.org #> Nordic Statistics Database #> Version(s) : v1 #> Language(s) : en #> Limit(s) : 10 calls per 10 sec. #> 1000 values per call. #> Url template : #> https://pxweb.nordicstatistics.org/api/[version]/[lang]/ #> #> $pxweb.stat.si #> Api: pxweb.stat.si #> SiStat Database #> Version(s) : v1 #> Language(s) : sl #> Limit(s) : 100 calls per 10 sec. #> 10000000 values per call. #> Url template : #> https://pxweb.stat.si/SiStatData/api/[version]/[lang]/Data #> #> attr(,\"class\") #> [1] \"pxweb_api_catalogue\" \"list\" ## The examples below can only be run in interactive mode ## x <- pxweb_interactive() ## x <- pxweb_interactive(x = \"api.scb.se\") ## x <- pxweb_interactive(x = \"https://api.scb.se/OV0104/v1/doris/en/ssd/BE/BE0101/\") ## x <- pxweb_interactive(x = \"https://api.scb.se/OV0104/v1/doris/en/ssd/BE/BE0101/BE0101A/\")"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_interactive_input.html","id":null,"dir":"Reference","previous_headings":"","what":"Get input from user — pxweb_interactive_input","title":"Get input from user — pxweb_interactive_input","text":"Get input user","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_interactive_input.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get input from user — pxweb_interactive_input","text":"","code":"pxweb_interactive_input(pxe, test_input = NULL)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_interactive_input.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get input from user — pxweb_interactive_input","text":"pxe pxweb_explorer object get user input . test_input supplying test input (testing ).","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_levels.html","id":null,"dir":"Reference","previous_headings":"","what":"Construct a pxweb_levels object. — pxweb_levels","title":"Construct a pxweb_levels object. — pxweb_levels","text":"object contain levels given PXWEB api position.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_levels.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Construct a pxweb_levels object. — pxweb_levels","text":"","code":"pxweb_levels(x)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_levels.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Construct a pxweb_levels object. — pxweb_levels","text":"x list returned PXWEB API convert pxweb_levels object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_levels.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Construct a pxweb_levels object. — pxweb_levels","text":"pxweb_levels object","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_metadata.html","id":null,"dir":"Reference","previous_headings":"","what":"Construct a pxweb_metadata object. — pxweb_metadata","title":"Construct a pxweb_metadata object. — pxweb_metadata","text":"object contain metadata given PXWEB table.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_metadata.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Construct a pxweb_metadata object. — pxweb_metadata","text":"","code":"pxweb_metadata(x)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_metadata.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Construct a pxweb_metadata object. — pxweb_metadata","text":"x list returned PXWEB API convert pxweb_metadata object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_metadata.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Construct a pxweb_metadata object. — pxweb_metadata","text":"pxweb_metadata object","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_metadata_add_null_values.html","id":null,"dir":"Reference","previous_headings":"","what":"Add values to NULL value variables in PXWEB metadata objects — pxweb_metadata_add_null_values","title":"Add values to NULL value variables in PXWEB metadata objects — pxweb_metadata_add_null_values","text":"Add values NULL value variables PXWEB metadata objects","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_metadata_add_null_values.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add values to NULL value variables in PXWEB metadata objects — pxweb_metadata_add_null_values","text":"","code":"pxweb_metadata_add_null_values(x, px)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_metadata_add_null_values.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add values to NULL value variables in PXWEB metadata objects — pxweb_metadata_add_null_values","text":"x object check pxweb_metadata object add values. px pxweb object","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_metadata_add_null_values.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Add values to NULL value variables in PXWEB metadata objects — pxweb_metadata_add_null_values","text":"metadata objects may NULL values. cases values downloaded added metadata object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_metadata_dim.html","id":null,"dir":"Reference","previous_headings":"","what":"Compue the dimension of a metadata object — pxweb_metadata_dim","title":"Compue the dimension of a metadata object — pxweb_metadata_dim","text":"Compue dimension metadata object","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_metadata_dim.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compue the dimension of a metadata object — pxweb_metadata_dim","text":"","code":"pxweb_metadata_dim(pxmd)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_metadata_dim.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compue the dimension of a metadata object — pxweb_metadata_dim","text":"pxmd pxweb_metadata object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_metadata_elimination.html","id":null,"dir":"Reference","previous_headings":"","what":"Get boolean vector — pxweb_metadata_elimination","title":"Get boolean vector — pxweb_metadata_elimination","text":"Get boolean vector","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_metadata_elimination.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get boolean vector — pxweb_metadata_elimination","text":"","code":"pxweb_metadata_elimination(pxmd)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_metadata_elimination.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get boolean vector — pxweb_metadata_elimination","text":"pxmd pxweb_metadata object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_metadata_elimination.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get boolean vector — pxweb_metadata_elimination","text":"pxweb_metadata eliminations named boolean vector.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_metadata_time.html","id":null,"dir":"Reference","previous_headings":"","what":"Get boolean vector — pxweb_metadata_time","title":"Get boolean vector — pxweb_metadata_time","text":"Get boolean vector","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_metadata_time.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get boolean vector — pxweb_metadata_time","text":"","code":"pxweb_metadata_time(pxmd)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_metadata_time.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get boolean vector — pxweb_metadata_time","text":"pxmd pxweb_metadata object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_metadata_time.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get boolean vector — pxweb_metadata_time","text":"pxweb_metadata eliminations named boolean vector.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_parse_response.html","id":null,"dir":"Reference","previous_headings":"","what":"Parse the response from a PXWEB API (advanced) — pxweb_parse_response","title":"Parse the response from a PXWEB API (advanced) — pxweb_parse_response","text":"function parses response call made PXWEB API using httr R package. way possible parse content calls made outside pxweb R package.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_parse_response.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Parse the response from a PXWEB API (advanced) — pxweb_parse_response","text":"","code":"pxweb_parse_response(x) is_pxweb_response(x)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_parse_response.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Parse the response from a PXWEB API (advanced) — pxweb_parse_response","text":"x httr response object PXWEB call.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_query.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a PXWEB query — pxweb_query","title":"Create a PXWEB query — pxweb_query","text":"Creates pxweb query object either list named values, json query file json query string. See examples .","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_query.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a PXWEB query — pxweb_query","text":"","code":"pxweb_query(x) # S3 method for character pxweb_query(x) # S3 method for json pxweb_query(x) # S3 method for pxweb_query pxweb_query(x) # S3 method for list pxweb_query(x) # S3 method for response pxweb_query(x) # S3 method for pxweb_explorer pxweb_query(x)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_query.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a PXWEB query — pxweb_query","text":"x object cast pxweb_query object.","code":""},{"path":[]},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_query.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a PXWEB query — pxweb_query","text":"","code":"dims <- list( Alue = c(\"*\"), \"Asuntokunnan koko\" = c(\"*\"), Talotyyppi = c(\"S\"), Vuosi = c(\"*\") ) pxq1 <- pxweb_query(dims) json_query <- file.path( system.file(package = \"pxweb\"), \"extdata\", \"examples\", \"json_query_example.json\" ) pxq2 <- pxweb_query(json_query)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_query_as_json.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert a pxweb_query object to a json string — pxweb_query_as_json","title":"Convert a pxweb_query object to a json string — pxweb_query_as_json","text":"Convert pxweb_query object json string","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_query_as_json.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert a pxweb_query object to a json string — pxweb_query_as_json","text":"","code":"pxweb_query_as_json(pxq, ...)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_query_as_json.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert a pxweb_query object to a json string — pxweb_query_as_json","text":"pxq pxweb_query object. ... argument jsonlite::toJSON().","code":""},{"path":[]},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_query_as_json.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert a pxweb_query object to a json string — pxweb_query_as_json","text":"","code":"json_query <- file.path( system.file(package = \"pxweb\"), \"extdata\", \"examples\", \"json_query_example.json\" ) pxq <- pxweb_query(json_query) json <- pxweb_query_as_json(pxq, pretty = TRUE)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_query_as_rcode.html","id":null,"dir":"Reference","previous_headings":"","what":"Print a pxweb_query object as R code — pxweb_query_as_rcode","title":"Print a pxweb_query object as R code — pxweb_query_as_rcode","text":"Print pxweb_query object R code","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_query_as_rcode.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print a pxweb_query object as R code — pxweb_query_as_rcode","text":"","code":"pxweb_query_as_rcode(pxq)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_query_as_rcode.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print a pxweb_query object as R code — pxweb_query_as_rcode","text":"pxq pxweb_query object.","code":""},{"path":[]},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_query_dim.html","id":null,"dir":"Reference","previous_headings":"","what":"Compue the dimension of the query — pxweb_query_dim","title":"Compue the dimension of the query — pxweb_query_dim","text":"Compue dimension query","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_query_dim.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compue the dimension of the query — pxweb_query_dim","text":"","code":"pxweb_query_dim(pxq)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_query_dim.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compue the dimension of the query — pxweb_query_dim","text":"pxq pxweb_query object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_query_dim_splittable.html","id":null,"dir":"Reference","previous_headings":"","what":"Get vector indicating splittable variables — pxweb_query_dim_splittable","title":"Get vector indicating splittable variables — pxweb_query_dim_splittable","text":"Get vector indicating splittable variables","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_query_dim_splittable.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get vector indicating splittable variables — pxweb_query_dim_splittable","text":"","code":"pxweb_query_dim_splittable(pxq, pxmd)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_query_dim_splittable.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get vector indicating splittable variables — pxweb_query_dim_splittable","text":"pxq pxweb_query object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_query_dim_splittable.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get vector indicating splittable variables — pxweb_query_dim_splittable","text":"named logical vector.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_query_dim_splittable.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get vector indicating splittable variables — pxweb_query_dim_splittable","text":"Splitable variables variables can split. Content variables split, variables filter == \"top\". Currently, can sure time variables eliminated variables can split. Hopefully next API makes clear.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_query_filter.html","id":null,"dir":"Reference","previous_headings":"","what":"Get query values — pxweb_query_filter","title":"Get query values — pxweb_query_filter","text":"Get query values","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_query_filter.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get query values — pxweb_query_filter","text":"","code":"pxweb_query_filter(pxq)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_query_filter.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get query values — pxweb_query_filter","text":"pxq pxweb_query object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_query_filter.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get query values — pxweb_query_filter","text":"query variable selection filters named character vector.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_query_values.html","id":null,"dir":"Reference","previous_headings":"","what":"Get query filter — pxweb_query_values","title":"Get query filter — pxweb_query_values","text":"Get query filter","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_query_values.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get query filter — pxweb_query_values","text":"","code":"pxweb_query_values(pxq)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_query_values.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get query filter — pxweb_query_values","text":"pxq pxweb_query object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_query_values.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get query filter — pxweb_query_values","text":"query variable selection values named list character vectors.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_split_query.html","id":null,"dir":"Reference","previous_headings":"","what":"Split query in optimal sub-queries — pxweb_split_query","title":"Split query in optimal sub-queries — pxweb_split_query","text":"Split query optimal sub-queries","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_split_query.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Split query in optimal sub-queries — pxweb_split_query","text":"","code":"pxweb_split_query(pxq, px, pxmd)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_split_query.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Split query in optimal sub-queries — pxweb_split_query","text":"pxq pxweb_query object. px pxweb object. pxmd pxweb_metadata object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_split_query.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Split query in optimal sub-queries — pxweb_split_query","text":"list pxweb_query objects.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_split_query.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Split query in optimal sub-queries — pxweb_split_query","text":"Computes (brute-force) optimal split query match api maximum value limit. also take account time variables content variables split. Also variables filter \"top\" split, since top filter supply individual levels, just number. can probably improved .","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_tempdir.html","id":null,"dir":"Reference","previous_headings":"","what":"Setup temorary directory for the pxweb — pxweb_tempdir","title":"Setup temorary directory for the pxweb — pxweb_tempdir","text":"Setup temorary directory pxweb","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_tempdir.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Setup temorary directory for the pxweb — pxweb_tempdir","text":"","code":"pxweb_tempdir(to = \"apis\")"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_tempdir.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Setup temorary directory for the pxweb — pxweb_tempdir","text":"part temp folder (apis logs)","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_test_api.html","id":null,"dir":"Reference","previous_headings":"","what":"Test a full or a part of a PXWEB api. — pxweb_test_api","title":"Test a full or a part of a PXWEB api. — pxweb_test_api","text":"function can used test whole pxweb api using api base url. using branch tree api tested branch.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_test_api.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test a full or a part of a PXWEB api. — pxweb_test_api","text":"","code":"pxweb_test_api( url, test_type = \"first\", n = 1, verbose = TRUE, time_limit = Inf )"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_test_api.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test a full or a part of a PXWEB api. — pxweb_test_api","text":"url base url pxweb api (branch metadata tree) test_type type test done. first observation table. random sample size n. Download full tables. touch api downloading first table metadata. minimal testing API. n sample size test_type sample. verbose function print information. time_limit Time limit second API allowed tested.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_test_api.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test a full or a part of a PXWEB api. — pxweb_test_api","text":"Function returns data.frame information node Two variables added: checked : node checked error : Whether errors encountered call download_error : Whether errors encountered download","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_test_api.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Test a full or a part of a PXWEB api. — pxweb_test_api","text":"","code":"if (FALSE) { url <- \"https://bank.stat.gl/api/v1/en/Greenland/BE/BE01\" res <- pxweb_test_api(url) res <- pxweb_test_api(url, test_type = \"touch\") }"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_test_create_api_paths.html","id":null,"dir":"Reference","previous_headings":"","what":"Create all paths from a list of pxweb_api_catalogue entries — pxweb_test_create_api_paths","title":"Create all paths from a list of pxweb_api_catalogue entries — pxweb_test_create_api_paths","text":"Create paths list pxweb_api_catalogue entries","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_test_create_api_paths.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create all paths from a list of pxweb_api_catalogue entries — pxweb_test_create_api_paths","text":"","code":"pxweb_test_create_api_paths(apis)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_test_create_api_paths.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create all paths from a list of pxweb_api_catalogue entries — pxweb_test_create_api_paths","text":"apis list pxweb_api_catalogue_entry elements","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_test_time_limit.html","id":null,"dir":"Reference","previous_headings":"","what":"Test time limit object — pxweb_test_time_limit","title":"Test time limit object — pxweb_test_time_limit","text":"Test time limit object","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_test_time_limit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test time limit object — pxweb_test_time_limit","text":"","code":"pxweb_test_time_limit(time_limit) is_test_time_limit_reached(x)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_test_time_limit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test time limit object — pxweb_test_time_limit","text":"time_limit number seconds API tested.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_test_time_limit.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Test time limit object — pxweb_test_time_limit","text":"Used limit testing API:s.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_validate_query_with_metadata.html","id":null,"dir":"Reference","previous_headings":"","what":"Validate a pxweb_query with a pxweb_metadata object — pxweb_validate_query_with_metadata","title":"Validate a pxweb_query with a pxweb_metadata object — pxweb_validate_query_with_metadata","text":"Validate pxweb_query pxweb_metadata object","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_validate_query_with_metadata.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Validate a pxweb_query with a pxweb_metadata object — pxweb_validate_query_with_metadata","text":"","code":"pxweb_validate_query_with_metadata(pxq, pxmd)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_validate_query_with_metadata.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Validate a pxweb_query with a pxweb_metadata object — pxweb_validate_query_with_metadata","text":"pxq pxweb_query object. pxmd pxweb_metadata object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_validate_query_with_metadata.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Validate a pxweb_query with a pxweb_metadata object — pxweb_validate_query_with_metadata","text":"Validate query metadata object asses query can used query table.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_validate_query_with_metadata.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Validate a pxweb_query with a pxweb_metadata object — pxweb_validate_query_with_metadata","text":"","code":"if (FALSE) { url <- \"https://api.scb.se/OV0104/v1/doris/sv/ssd/BE/BE0101/BE0101A/BefolkningNy\" json_query <- file.path( system.file(package = \"pxweb\"), \"extdata\", \"examples\", \"json_query_example.json\" ) pxq <- pxweb_query(json_query) pxweb_validate_query_with_metadata(pxq, pxweb_get(url)) }"},{"path":"https://ropengov.github.io/pxweb/reference/save_pxweb.html","id":null,"dir":"Reference","previous_headings":"","what":"Save and load pxweb objects from R temp folder — save_pxweb","title":"Save and load pxweb objects from R temp folder — save_pxweb","text":"Save load pxweb objects R temp folder","code":""},{"path":"https://ropengov.github.io/pxweb/reference/save_pxweb.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Save and load pxweb objects from R temp folder — save_pxweb","text":"","code":"save_pxweb(obj) load_pxweb(obj) load_pxweb_calls(obj) load_pxweb_config(obj) load_pxweb_api_subpath(obj)"},{"path":"https://ropengov.github.io/pxweb/reference/save_pxweb.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Save and load pxweb objects from R temp folder — save_pxweb","text":"obj pxweb object","code":""},{"path":"https://ropengov.github.io/pxweb/reference/split_dimensions_left_right.html","id":null,"dir":"Reference","previous_headings":"","what":"Split variables into chunks — split_dimensions_left_right","title":"Split variables into chunks — split_dimensions_left_right","text":"Split variables chunks","code":""},{"path":"https://ropengov.github.io/pxweb/reference/split_dimensions_left_right.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Split variables into chunks — split_dimensions_left_right","text":"","code":"split_dimensions_left_right(x, bool, max_size)"},{"path":"https://ropengov.github.io/pxweb/reference/split_dimensions_left_right.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Split variables into chunks — split_dimensions_left_right","text":"pxweb_split_dimensions","code":""},{"path":"https://ropengov.github.io/pxweb/reference/split_dimensions_left_right.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Split variables into chunks — split_dimensions_left_right","text":"Splitable variables variables can split. Content variables split, variables filter == \"top\"","code":""},{"path":"https://ropengov.github.io/pxweb/reference/str_pad.html","id":null,"dir":"Reference","previous_headings":"","what":"Pad a string to a fixed size — str_pad","title":"Pad a string to a fixed size — str_pad","text":"Pad string fixed size","code":""},{"path":"https://ropengov.github.io/pxweb/reference/str_pad.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Pad a string to a fixed size — str_pad","text":"","code":"str_pad(txt, n = 5, pad = \" \", type = \"left\")"},{"path":"https://ropengov.github.io/pxweb/reference/str_pad.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Pad a string to a fixed size — str_pad","text":"txt character vector pad n final char width pad pad symbol type pad 'left' 'right'.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/str_trim.html","id":null,"dir":"Reference","previous_headings":"","what":"Taken from trimws for reasons of compatibility with previous R versios. — str_trim","title":"Taken from trimws for reasons of compatibility with previous R versios. — str_trim","text":"Taken trimws reasons compatibility previous R versios.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/str_trim.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Taken from trimws for reasons of compatibility with previous R versios. — str_trim","text":"","code":"str_trim(x, which = c(\"both\", \"left\", \"right\"))"},{"path":"https://ropengov.github.io/pxweb/reference/str_trim.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Taken from trimws for reasons of compatibility with previous R versios. — str_trim","text":"x string trim. trim string.","code":""},{"path":[]},{"path":"https://ropengov.github.io/pxweb/news/index.html","id":"version-0162","dir":"Changelog","previous_headings":"","what":"Version 0.16.2","title":"Version 0.16.2","text":"CRAN release: 2022-10-31 Return better error messages using .data.frame() pxweb metadata objects. Fix Statistics Swedens new https API.","code":""},{"path":"https://ropengov.github.io/pxweb/news/index.html","id":"version-0161","dir":"Changelog","previous_headings":"","what":"Version 0.16.1","title":"Version 0.16.1","text":"CRAN release: 2022-08-24 Remove tests failing CRAN.","code":""},{"path":"https://ropengov.github.io/pxweb/news/index.html","id":"version-0160","dir":"Changelog","previous_headings":"","what":"Version 0.16.0","title":"Version 0.16.0","text":"exposed pxweb_parse_response() is_pxweb_response() package API advanced users want make httr calls PXWEB API.","code":""},{"path":"https://ropengov.github.io/pxweb/news/index.html","id":"version-0150","dir":"Changelog","previous_headings":"","what":"Version 0.15.0","title":"Version 0.15.0","text":"Added possibility download px sdmx response formats files Added StatSI API Added codecov code coverage stats Fixed minor API configs","code":""},{"path":"https://ropengov.github.io/pxweb/news/index.html","id":"version-0140","dir":"Changelog","previous_headings":"","what":"Version 0.14.0","title":"Version 0.14.0","text":"Added feature print pxweb_query objects R code","code":""},{"path":"https://ropengov.github.io/pxweb/news/index.html","id":"version-0104","dir":"Changelog","previous_headings":"","what":"Version 0.10.4","title":"Version 0.10.4","text":"CRAN release: 2021-02-24 Bug fixes informative error messages","code":""},{"path":"https://ropengov.github.io/pxweb/news/index.html","id":"version-092","dir":"Changelog","previous_headings":"","what":"Version 0.9.2","title":"Version 0.9.2","text":"Added API link Visit Finland (Rudolf)","code":""},{"path":"https://ropengov.github.io/pxweb/news/index.html","id":"version-08","dir":"Changelog","previous_headings":"","what":"Version 0.8","title":"Version 0.8","text":"Package rewritten order enhance efficiency design","code":""},{"path":"https://ropengov.github.io/pxweb/news/index.html","id":"version-0637","dir":"Changelog","previous_headings":"","what":"Version 0.6.37","title":"Version 0.6.37","text":"CRAN release: 2018-06-12","code":""},{"path":"https://ropengov.github.io/pxweb/news/index.html","id":"new-features-0-6-37","dir":"Changelog","previous_headings":"","what":"New features","title":"Version 0.6.37","text":"Added data.ssb.API list inst/extdata/api.json Added NEWS.md file","code":""}]
+[{"path":[]},{"path":"https://ropengov.github.io/pxweb/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"interest fostering open welcoming environment, contributors maintainers pledge making participation project community harassment-free experience everyone, regardless age, body size, disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, religion, sexual identity orientation.","code":""},{"path":"https://ropengov.github.io/pxweb/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes creating positive environment include: Using welcoming inclusive language respectful differing viewpoints experiences Gracefully accepting constructive criticism Focusing best community Showing empathy towards community members Examples unacceptable behavior participants include: use sexualized language imagery unwelcome sexual attention advances Trolling, insulting/derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical electronic address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://ropengov.github.io/pxweb/CODE_OF_CONDUCT.html","id":"our-responsibilities","dir":"","previous_headings":"","what":"Our Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Project maintainers responsible clarifying standards acceptable behavior expected take appropriate fair corrective action response instances unacceptable behavior. Project maintainers right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, ban temporarily permanently contributor behaviors deem inappropriate, threatening, offensive, harmful.","code":""},{"path":"https://ropengov.github.io/pxweb/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within project spaces public spaces individual representing project community. Examples representing project community include using official project e-mail address, posting via official social media account, acting appointed representative online offline event. Representation project may defined clarified project maintainers.","code":""},{"path":"https://ropengov.github.io/pxweb/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported contacting project team . complaints reviewed investigated result response deemed necessary appropriate circumstances. project team obligated maintain confidentiality regard reporter incident. details specific enforcement policies may posted separately. Project maintainers follow enforce Code Conduct good faith may face temporary permanent repercussions determined members project’s leadership.","code":""},{"path":"https://ropengov.github.io/pxweb/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 1.4, available https://www.contributor-covenant.org/version/1/4/code--conduct.html answers common questions code conduct, see https://www.contributor-covenant.org/faq","code":""},{"path":"https://ropengov.github.io/pxweb/CONTRIBUTING.html","id":null,"dir":"","previous_headings":"","what":"Contributing to pxweb R packge","title":"Contributing to pxweb R packge","text":"welcome contact us: Submit suggestions bug reports (provide output sessionInfo() packageVersion(\"pxweb\")) Send pull request Star us Github page Join discussion Gitter","code":""},{"path":"https://ropengov.github.io/pxweb/CONTRIBUTING.html","id":"acknowledgements","dir":"","previous_headings":"","what":"Acknowledgements","title":"Contributing to pxweb R packge","text":"Kindly cite work follows: Måns Magnusson, Markus Kainu, Janne Huovari, Leo Lahti. Retrieval analysis PC Axis data pxweb package. R package version r sessionInfo()$otherPkgs$pxweb$Version. URL: http://ropengov.github.io/pxweb grateful contributors! project part rOpenGov.","code":""},{"path":[]},{"path":[]},{"path":"https://ropengov.github.io/pxweb/TROUBLESHOOTING.html","id":"date-added","dir":"","previous_headings":"Encoding errors on Windows","what":"Date added:","title":"Troubleshooting pxweb R package","text":"2021-07-07","code":""},{"path":"https://ropengov.github.io/pxweb/TROUBLESHOOTING.html","id":"versions","dir":"","previous_headings":"Encoding errors on Windows","what":"Versions","title":"Troubleshooting pxweb R package","text":"problem exist pxweb version 0.10 +. problem Windows.","code":""},{"path":"https://ropengov.github.io/pxweb/TROUBLESHOOTING.html","id":"description","dir":"","previous_headings":"Encoding errors on Windows","what":"Description","title":"Troubleshooting pxweb R package","text":"windows, letters encoded correctly. example, R Rstudio UTF-8 coding preserved assignment. instance: means UTF-8 encoding used query explicitly, package find variable name hence return something like:","code":"x <- \"ČETRTLETJE\" x [1] \"CETRTLETJE\" Assertion on 'pxweb_query_variable_code' failed: Must be element of set {'KOHEZIJSKA REGIJA','DRŽAVA ROJSTVA','SPOL','CETRTLETJE','MERITVE'}, but is 'CETRTLETJE'."},{"path":"https://ropengov.github.io/pxweb/TROUBLESHOOTING.html","id":"workaround","dir":"","previous_headings":"Encoding errors on Windows","what":"Workaround","title":"Troubleshooting pxweb R package","text":"fix , explicitly referenced offending character using escape sequence : find specific encoding special letter, see: https://www.fileformat.info/info/unicode/char/search.htm","code":"pxweb_query_list <- list(\"KOHEZIJSKA REGIJA\"=c(\"0\"), \"DRŽAVA ROJSTVA\"=c(\"0\"), \"SPOL\"=c(\"0\"), \"MERITVE\"=c(\"2000\")) # Explicit encoding ČETRTLETJE fixed_name <- paste(\"\\U010C\", \"ETRTLETJE\", sep = \"\") years <- c(\"2008Q1\",\"2008Q2\") pxweb_query_list[[fixed_name]] <- years pxdata <- pxweb_get(url, pxweb_query_list)"},{"path":"https://ropengov.github.io/pxweb/TROUBLESHOOTING.html","id":"more-info","dir":"","previous_headings":"Encoding errors on Windows","what":"More info","title":"Troubleshooting pxweb R package","text":"https://github.com/rOpenGov/pxweb/issues/217","code":""},{"path":[]},{"path":"https://ropengov.github.io/pxweb/TROUBLESHOOTING.html","id":"date-added-1","dir":"","previous_headings":"Error: Running pxweb in parallel","what":"Date added:","title":"Troubleshooting pxweb R package","text":"2021-07-07","code":""},{"path":"https://ropengov.github.io/pxweb/TROUBLESHOOTING.html","id":"versions-1","dir":"","previous_headings":"Error: Running pxweb in parallel","what":"Versions","title":"Troubleshooting pxweb R package","text":"problem exist pxweb version 0.8+.","code":""},{"path":"https://ropengov.github.io/pxweb/TROUBLESHOOTING.html","id":"description-1","dir":"","previous_headings":"Error: Running pxweb in parallel","what":"Description","title":"Troubleshooting pxweb R package","text":"Currently, pxweb package thread-safe, hence safe runt multiple pxweb_get functions parallel different R sessions computer/IP address.","code":""},{"path":"https://ropengov.github.io/pxweb/TROUBLESHOOTING.html","id":"workaround-1","dir":"","previous_headings":"Error: Running pxweb in parallel","what":"Workaround","title":"Troubleshooting pxweb R package","text":"Don’t run pxweb parallel.","code":""},{"path":[]},{"path":"https://ropengov.github.io/pxweb/TROUBLESHOOTING.html","id":"date-added-2","dir":"","previous_headings":"Error: Too large query","what":"Date added:","title":"Troubleshooting pxweb R package","text":"2019-02-15","code":""},{"path":"https://ropengov.github.io/pxweb/TROUBLESHOOTING.html","id":"versions-2","dir":"","previous_headings":"Error: Too large query","what":"Versions","title":"Troubleshooting pxweb R package","text":"problem exist pxweb version 0.8+.","code":""},{"path":"https://ropengov.github.io/pxweb/TROUBLESHOOTING.html","id":"description-2","dir":"","previous_headings":"Error: Too large query","what":"Description","title":"Troubleshooting pxweb R package","text":"situation (PXWEB APIS) possible get Error: large query error message (can look little bit different different pxweb versions) large query done. reason problem pxweb R package split query chunks/batches size smaller maximum values limit API. PXWEB APIs table objects dimension /content variables. Content variables one variable indicate contents download (number inhabitants percentage change inhabitants). always content variables exist PXWEB table. split large query, dimension variables can split smaller chunks (rows PX-DATA object). pxweb R package tries identify variables dimension variables checking variable can eliminated variable time variable. variable time eliminated possible sure variable content variable, variable used split query. hopefully solved PXWEB API provider supplying information variable content variable future releases.","code":""},{"path":"https://ropengov.github.io/pxweb/TROUBLESHOOTING.html","id":"workaround-2","dir":"","previous_headings":"Error: Too large query","what":"Workaround","title":"Troubleshooting pxweb R package","text":"way solve currently manually specify variables pxweb package can use split query setting variables elimination TRUE content variables. working example workaround. Another example :","code":"url <- \"http://px.hagstofa.is/pxis/api/v1/is/Efnahagur/utanrikisverslun/1_voruvidskipti/03_inntollskra/UTA03801.px\" pxweb_query_list <- list(\"Tollskrárnúmer\" = c(\"*\"), \"Land\" = c(\"AF\", \"AL\"), \"Mánuður\" = c(\"2016M01\"), \"Eining\" = c(\"*\")) pxq <- pxweb_query(pxweb_query_list) px_data <- pxweb_get(url, pxq) Error: Too large query # Variable(s) Tollskrárnúmer, Eining cannot be split to batches (eliminate is FALSE). # We download the metadata object and set eliminate to TRUE # (since Eining is not a content variable) pxmd <- pxweb_get(url) pxmd$variables[[4]]$elimination <- TRUE # We explicitly supply the meta data object to use for downloading px_data <- pxweb_advanced_get(url, pxq, pxmdo = pxmd) Downloading large query (in 4 batches): |==================================================================| 100% px_data PXWEB DATA With 5 variables and 35792 observations. library(pxweb) pxweb_query_list <- list(\"Typ av psykisk hälsa\"=c(\"*\"), \"Andel och konfidensintervall\"=c(\"2\"), \"Ålder\"=c(\"16-29\",\"30-44\",\"45-64\",\"65-84\"), \"Kön\"=c(\"1\",\"2\"), \"År\"=c(\"2018\",\"2016\",\"2015\", \"2014\",\"2013\",\"2012\", \"2011\",\"2010\",\"2009\", \"2008\",\"2007\",\"2006\", \"2005\",\"2004\")) url <- \"http://fohm-app.folkhalsomyndigheten.se/Folkhalsodata/api/v1/sv/B_HLV/dPsykhals/HLV_Psykisk_halsa_alder.px\" # We get the error that no variables can be split up. px_data <- pxweb_get(url = url, query = pxweb_query_list) # We download the metadata object and set eliminate to TRUE for # one variable that is not a content variable. # Here variable 1 ('Typ av psykisk hälsa') is a variable we can # split the batches on since (we know) it is not a content variable. pxmd <- pxweb_get(url) pxmd$variables[[1]]$elimination <- TRUE # We explicitly supply the meta data object to use for downloading px_data <- pxweb_advanced_get(url, pxweb_query_list, pxmdo = pxmd) ## Downloading large query (in 2 batches): ## |========================================================| 100% px_data ## PXWEB DATA ## With 6 variables and 1792 observations."},{"path":"https://ropengov.github.io/pxweb/articles/pxweb.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"PX-WEB API Interface for R","text":"PXWEB API structure developed Statistics Sweden national statistical institutions (NSI) disseminate public statistics structured way. API enables downloading using data statistical agencies without using web browser direct HTTP/HTTPS. pxweb R package connects PXWEB API R facilitates access, use referencing data PXWEB APIs.","code":""},{"path":"https://ropengov.github.io/pxweb/articles/pxweb.html","id":"available-data-sources-and-tools","dir":"Articles","previous_headings":"Introduction","what":"Available data sources and tools","title":"PX-WEB API Interface for R","text":"number organizations use PXWEB distribute hierarchical data. can browse available data sets : Statistics Sweden API Description Statistics Finland StatFi API Description organizations using PX-WEB","code":""},{"path":"https://ropengov.github.io/pxweb/articles/pxweb.html","id":"about-pxweb-apis","dir":"Articles","previous_headings":"Introduction","what":"About PXWEB APIs","title":"PX-WEB API Interface for R","text":"data PXWEB APIs consists metadata data parts. Metadata structured hierarchical node tree, node contains information subnodes. leaf nodes information dimensions available data leaf node.","code":""},{"path":"https://ropengov.github.io/pxweb/articles/pxweb.html","id":"installation","dir":"Articles","previous_headings":"","what":"Installation","title":"PX-WEB API Interface for R","text":"install latest stable release version CRAN, just use: install latest stable release version GitHub, just use: Test installation loading library: tutorial included package :","code":"install.packages(\"pxweb\") library(\"remotes\") remotes::install_github(\"ropengov/pxweb\") library(pxweb) vignette(topic=\"pxweb\")"},{"path":"https://ropengov.github.io/pxweb/articles/pxweb.html","id":"installation-issues","dir":"Articles","previous_headings":"Installation","what":"Installation issues","title":"PX-WEB API Interface for R","text":"also recommend setting UTF-8 encoding since API may local specific letters:","code":"Sys.setlocale(locale = \"UTF-8\")"},{"path":"https://ropengov.github.io/pxweb/articles/pxweb.html","id":"accessing-pxweb-from-r","dir":"Articles","previous_headings":"","what":"Accessing PXWEB from R","title":"PX-WEB API Interface for R","text":"two ways using pxweb R package access data, either interactively using core functions. access data, two parts needed, URL data table API query specifying data interest.","code":""},{"path":"https://ropengov.github.io/pxweb/articles/pxweb.html","id":"interactive-use","dir":"Articles","previous_headings":"","what":"Interactive use","title":"PX-WEB API Interface for R","text":"simplest way using pxweb use interactively, navigate API data interest, set query interest. example , use interactive functionality PXWEB API root, use path API. functionality also means can navigate PXWEB API, irrespectively part R package API catalogue . Just supply URL somewhere API navigate API . Due new CRAN policies, possible use R function edit API catalogue R package, editing can done quickly R using file.edit(). Although, pxweb installed , overwrite old API catalogue. easiest way add PXWEB API global catalogue. , pull request pxweb GitHub page .","code":"# Navigate through all pxweb api:s in the R package API catalogue d <- pxweb_interactive() # Get data from SCB (Statistics Sweden) d <- pxweb_interactive(\"api.scb.se\") # Fetching data from statfi (Statistics Finland) d <- pxweb_interactive(\"pxnet2.stat.fi\") # Fetching data from StatBank (Statistics Norway) d <- pxweb_interactive(\"data.ssb.no\") # To see all available PXWEB APIs use pxweb_apis <- pxweb_api_catalogue() # Start with a specific path. d <- pxweb_interactive(\"https://api.scb.se/OV0104/v1/doris/en/ssd/BE/BE0101/BE0101A\") file.edit(pxweb_api_catalogue_path())"},{"path":"https://ropengov.github.io/pxweb/articles/pxweb.html","id":"direct-use","dir":"Articles","previous_headings":"","what":"Direct use","title":"PX-WEB API Interface for R","text":"hood, pxweb package uses pxweb_get() function access data PXWEB API. also keeps track API’s time limits splits big queries optimal downloadable chunks. use pxweb_get() without query, function either returns PXWEB LEVELS object PXWEB METADATA object. returned depends URL points table API . example PXWEB LEVELS object. use pxweb_get() table, PXWEB METADATA object returned.","code":"# Get PXWEB levels px_levels <- pxweb_get(\"https://api.scb.se/OV0104/v1/doris/en/ssd/BE/BE0101/BE0101A/\") px_levels ## PXWEB LEVELS ## BefolkningNy (t): Population by region, marital status, age and sex. Year 1968 - 2022 ## FolkmangdNov (t): Population 1 November by region, age and sex. Year 2002 - 2023 ## FolkmangdDistrikt (t): Population by district, Landscape or Part of the country by sex. Year 2015 - 2022 ## BefolkManad (t): Population per month by region, age and sex. Year 2000M01 - 2023M11 ## BefolkningR1860N (t): Population by age and sex. Year 1860 - 2022 # Get PXWEB metadata about a table px_meta <- pxweb_get(\"https://api.scb.se/OV0104/v1/doris/en/ssd/BE/BE0101/BE0101A/BefolkningNy\") px_meta ## PXWEB METADATA ## Population by region, marital status, age, sex, observations and year ## variables: ## [[1]] Region: region ## [[2]] Civilstand: marital status ## [[3]] Alder: age ## [[4]] Kon: sex ## [[5]] ContentsCode: observations ## [[6]] Tid: year"},{"path":"https://ropengov.github.io/pxweb/articles/pxweb.html","id":"creating-data-queries","dir":"Articles","previous_headings":"Direct use","what":"Creating data queries","title":"PX-WEB API Interface for R","text":"download data, need URL table query specifying parts table interest. URL table URL return metadata object query supplied. Creating query can done three main ways. first straightforward approach use pxweb_interactive() explore table URL create query interactively. interactive function return query URL, even data downloaded. can also turn query JSON query can use outside R. second approach specify query either R list JSON object. Statistical Agencies, Statistics Sweden, supply queries directly JSON object web pages. can use queries directly. another example JSON query table . details setting JSON query, see PXWEB API documentation. use JSON query, store JSON query file supply path file “pxweb_query()”function. Finally, can create PXWEB query R list list element variable selected observation. can validate query metadata object asses can use query. validation done automatically data fetched pxweb_get() can also done manually.","code":"d <- pxweb_interactive(\"https://api.scb.se/OV0104/v1/doris/en/ssd/BE/BE0101/BE0101A/BefolkningNy\") d$url ## [1] \"http://api.scb.se/OV0104/v1/doris/en/ssd/BE/BE0101/BE0101A/BefolkningNy\" d$query ## PXWEB QUERY ## query: ## [[1]] Region (item): ## 00 ## [[2]] Civilstand (item): ## OG, G, ÄNKL, SK ## [[3]] Alder (item): ## tot ## [[4]] ContentsCode (item): ## BE0101N1 ## [[5]] Tid (item): ## 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 pxweb_query_as_json(d$query, pretty = TRUE) ## { ## \"query\": [ ## { ## \"code\": \"Region\", ## \"selection\": { ## \"filter\": \"item\", ## \"values\": [\"00\"] ## } ## }, ## { ## \"code\": \"Civilstand\", ## \"selection\": { ## \"filter\": \"item\", ## \"values\": [\"OG\", \"G\", \"ÄNKL\", \"SK\"] ## } ## }, ## { ## \"code\": \"Alder\", ## \"selection\": { ## \"filter\": \"item\", ## \"values\": [\"tot\"] ## } ## }, ## { ## \"code\": \"ContentsCode\", ## \"selection\": { ## \"filter\": \"item\", ## \"values\": [\"BE0101N1\"] ## } ## }, ## { ## \"code\": \"Tid\", ## \"selection\": { ## \"filter\": \"item\", ## \"values\": [\"2010\", \"2011\", \"2012\", \"2013\", \"2014\", \"2015\", \"2016\", \"2017\"] ## } ## } ## ], ## \"response\": { ## \"format\": \"json\" ## } ## } { \"query\": [ { \"code\": \"Civilstand\", \"selection\": { \"filter\": \"item\", \"values\": [\"OG\", \"G\", \"ÄNKL\", \"SK\"] } }, { \"code\": \"Kon\", \"selection\": { \"filter\": \"item\", \"values\": [\"1\", \"2\"] } }, { \"code\": \"ContentsCode\", \"selection\": { \"filter\": \"item\", \"values\": [\"BE0101N1\"] } }, { \"code\": \"Tid\", \"selection\": { \"filter\": \"item\", \"values\": [\"2015\", \"2016\", \"2017\"] } } ], \"response\": { \"format\": \"json\" } } pxq <- pxweb_query(\"path/to/the/json/query.json\") pxweb_query_list <- list( \"Civilstand\" = c(\"*\"), # Use \"*\" to select all \"Kon\" = c(\"1\", \"2\"), \"ContentsCode\" = c(\"BE0101N1\"), \"Tid\" = c(\"2015\", \"2016\", \"2017\") ) pxq <- pxweb_query(pxweb_query_list) pxq ## PXWEB QUERY ## query: ## [[1]] Civilstand (all): ## * ## [[2]] Kon (item): ## 1, 2 ## [[3]] ContentsCode (item): ## BE0101N1 ## [[4]] Tid (item): ## 2015, 2016, 2017 pxweb_validate_query_with_metadata(pxq, px_meta)"},{"path":"https://ropengov.github.io/pxweb/articles/pxweb.html","id":"downloading-data","dir":"Articles","previous_headings":"Direct use","what":"Downloading data","title":"PX-WEB API Interface for R","text":"URL data table query, can download data “pxweb_get()”. function returns pxweb_data object contains downloaded data. instead want JSON-stat object, change response format JSON-stat, get JSON-stat object returned. return formats return files. , responses stored R tempdir() folded, file paths returned pxweb_get(). Currently, px sdmx formats can downloaded files, file issue need response formats. queries large (contain values PXWEB API maximum allowed values), query chunked optimal chunks downloaded sequentially. PXWEB data objects combined one large PXWEB data object, JSON-stat objects returned list JSON-stat objects, files stored tempdir() separate files. advanced connections API, pxweb_advanced_get() gives flexibility access underlying HTTP calls using httr log HTTP calls debugging. can convert downloaded PXWEB data objects data. frame character matrix. character matrix contains “raw” data data. frame returns R data.frame tidy format. conversion means missing values (“..” converted NA) data. frame. Using arguments variable.value.type column.name.type, can choose want code text column names value types. Similarly, can access raw data character matrix .matrix.","code":"pxd <- pxweb_get( \"https://api.scb.se/OV0104/v1/doris/en/ssd/BE/BE0101/BE0101A/BefolkningNy\", pxq ) pxd ## PXWEB DATA ## With 4 variables and 24 observations. pxq$response$format <- \"json-stat\" pxjstat <- pxweb_get( \"https://api.scb.se/OV0104/v1/doris/en/ssd/BE/BE0101/BE0101A/BefolkningNy\", pxq ) pxjstat ## { ## \"dataset\": { ## \"dimension\": { ## \"Civilstand\": { ## \"label\": [\"marital status\"], ## \"category\": { ## \"index\": { ## \"OG\": [0], ## \"G\": [1], ## \"ÄNKL\": [2], ## \"SK\": [3] ## }, ## \"label\": { ## \"OG\": [\"single\"], ## \"G\": [\"married\"], ## \"ÄNKL\": [\"widowers/widows\"], ## \"SK\": [\"divorced\"] ## } ## }, ## \"extension\": { ## \"show\": [\"value\"] ## } ## }, ## \"Kon\": { ## \"label\": [\"sex\"], ## \"category\": { ## \"index\": { ## \"1\": [0], ## \"2\": [1] ## }, ## \"label\": { ## \"1\": [\"men\"], ## \"2\": [\"women\"] ## } ## }, ## \"link\": { ## \"describedby\": [ ## { ## \"extension\": { ## \"Kon\": [\"Kön\"] ## } ## } ## ] ## }, ## \"extension\": { ## \"show\": [\"value\"] ## } ## }, ## \"ContentsCode\": { ## \"label\": [\"observations\"], ## \"category\": { ## \"index\": { ## \"BE0101N1\": [0] ## }, ## \"label\": { ## \"BE0101N1\": [\"Population\"] ## }, ## \"unit\": { ## \"BE0101N1\": { ## \"base\": [\"number\"], ## \"decimals\": [0] ## } ## } ## }, ## \"extension\": { ## \"show\": [\"value\"] ## } ## }, ## \"Tid\": { ## \"label\": [\"year\"], ## \"category\": { ## \"index\": { ## \"2015\": [0], ## \"2016\": [1], ## \"2017\": [2] ## }, ## \"label\": { ## \"2015\": [\"2015\"], ## \"2016\": [\"2016\"], ## \"2017\": [\"2017\"] ## } ## }, ## \"extension\": { ## \"show\": [\"code\"] ## } ## }, ## \"id\": [ ## [\"Civilstand\"], ## [\"Kon\"], ## [\"ContentsCode\"], ## [\"Tid\"] ## ], ## \"size\": [ ## [4], ## [2], ## [1], ## [3] ## ], ## \"role\": { ## \"metric\": [ ## [\"ContentsCode\"] ## ], ## \"time\": [ ## [\"Tid\"] ## ] ## } ## }, ## \"label\": [\"Population by marital status, sex, observations and year\"], ## \"source\": [\"Statistics Sweden\"], ## \"updated\": [\"2023-02-09T07:57:00Z\"], ## \"value\": [ ## [2762601], ## [2820248], ## [2870477], ## [2394842], ## [2437315], ## [2477012], ## [1651482], ## [1672460], ## [1687016], ## [1639519], ## [1657129], ## [1671381], ## [99751], ## [99654], ## [99682], ## [345008], ## [340709], ## [335961], ## [417132], ## [420985], ## [425487], ## [540682], ## [546653], ## [553226] ## ], ## \"extension\": { ## \"px\": { ## \"infofile\": [\"BE0101\"], ## \"tableid\": [\"TAB638\"], ## \"decimals\": [0] ## } ## } ## } ## } pxq$response$format <- \"px\" pxfp <- pxweb_get( \"https://api.scb.se/OV0104/v1/doris/en/ssd/BE/BE0101/BE0101A/BefolkningNy\", pxq ) pxfp ## [1] \"/var/folders/x9/dsgck_4s5mx2nrzzs8zd64rc0000gq/T//RtmpFdmiD7/50026bd2b2d8df2e3f190ca568b3b587d8207465.px\" pxdf <- as.data.frame(pxd, column.name.type = \"text\", variable.value.type = \"text\") head(pxdf) ## marital status sex year Population ## 1 single men 2015 2762601 ## 2 single men 2016 2820248 ## 3 single men 2017 2870477 ## 4 single women 2015 2394842 ## 5 single women 2016 2437315 ## 6 single women 2017 2477012 pxdf <- as.data.frame(pxd, column.name.type = \"code\", variable.value.type = \"code\") head(pxdf) ## Civilstand Kon Tid BE0101N1 ## 1 OG 1 2015 2762601 ## 2 OG 1 2016 2820248 ## 3 OG 1 2017 2870477 ## 4 OG 2 2015 2394842 ## 5 OG 2 2016 2437315 ## 6 OG 2 2017 2477012 pxmat <- as.matrix(pxd, column.name.type = \"code\", variable.value.type = \"code\") head(pxmat) ## Civilstand Kon Tid BE0101N1 ## [1,] \"OG\" \"1\" \"2015\" \"2762601\" ## [2,] \"OG\" \"1\" \"2016\" \"2820248\" ## [3,] \"OG\" \"1\" \"2017\" \"2870477\" ## [4,] \"OG\" \"2\" \"2015\" \"2394842\" ## [5,] \"OG\" \"2\" \"2016\" \"2437315\" ## [6,] \"OG\" \"2\" \"2017\" \"2477012\""},{"path":"https://ropengov.github.io/pxweb/articles/pxweb.html","id":"access-data-footnotescomments","dir":"Articles","previous_headings":"Direct use","what":"Access data footnotes/comments","title":"PX-WEB API Interface for R","text":"addition data, PXWEB DATA object may also contain comments data. can accessed using pxweb_data_comments() function. case, comments. comments, can turn comments data. frame one comment per row.","code":"pxdc <- pxweb_data_comments(pxd) pxdc ## NO PXWEB DATA COMMENTS as.data.frame(pxdc)"},{"path":"https://ropengov.github.io/pxweb/articles/pxweb.html","id":"citation","dir":"Articles","previous_headings":"","what":"Citation","title":"PX-WEB API Interface for R","text":"Finally, use data, can easily create citation pxweb_data object using pxweb_cite() function. full reproducibility, please also cite package.","code":"pxweb_cite(pxd) ## Statistics Sweden (2024). “Population by region, marital status, age, ## sex, observations and year.” [Data accessed 2024-01-27 16:19:42.712139 ## using pxweb R package 0.16.3], ## . ## ## A BibTeX entry for LaTeX users is ## ## @Misc{, ## title = {Population by region, marital status, age, sex, observations and year}, ## author = {{Statistics Sweden}}, ## organization = {Statistics Sweden}, ## address = {Stockholm, Sweden}, ## year = {2024}, ## url = {https://api.scb.se/OV0104/v1/doris/en/ssd/BE/BE0101/BE0101A/BefolkningNy}, ## note = {[Data accessed 2024-01-27 16:19:42.712139 using pxweb R package 0.16.3]}, ## } ## Kindly cite the pxweb R package as follows: ## ## Mans Magnusson, Markus Kainu, Janne Huovari, and Leo Lahti ## (rOpenGov). pxweb: R tools for PXWEB API. URL: ## http://github.com/ropengov/pxweb ## ## A BibTeX entry for LaTeX users is ## ## @Misc{, ## title = {pxweb: R tools for PX-WEB API}, ## author = {Mans Magnusson and Markus Kainu and Janne Huovari and Leo Lahti}, ## year = {2019}, ## }"},{"path":"https://ropengov.github.io/pxweb/articles/pxweb.html","id":"known-issues-and-troubleshooting","dir":"Articles","previous_headings":"","what":"Known issues and troubleshooting","title":"PX-WEB API Interface for R","text":"See TROUBLESHOOTING.md list current known issues.","code":""},{"path":"https://ropengov.github.io/pxweb/articles/pxweb.html","id":"licensing","dir":"Articles","previous_headings":"","what":"Licensing","title":"PX-WEB API Interface for R","text":"work can freely used, modified distributed open license specified DESCRIPTION file.","code":""},{"path":"https://ropengov.github.io/pxweb/articles/pxweb.html","id":"session-info","dir":"Articles","previous_headings":"","what":"Session info","title":"PX-WEB API Interface for R","text":"created vignette ","code":"sessionInfo() ## R version 4.3.2 (2023-10-31) ## Platform: x86_64-pc-linux-gnu (64-bit) ## Running under: Ubuntu 22.04.3 LTS ## ## Matrix products: default ## BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 ## LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0 ## ## locale: ## [1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C LC_TIME=C.UTF-8 ## [4] LC_COLLATE=C.UTF-8 LC_MONETARY=C.UTF-8 LC_MESSAGES=C.UTF-8 ## [7] LC_PAPER=C.UTF-8 LC_NAME=C LC_ADDRESS=C ## [10] LC_TELEPHONE=C LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C ## ## time zone: UTC ## tzcode source: system (glibc) ## ## attached base packages: ## [1] stats graphics grDevices utils datasets methods base ## ## other attached packages: ## [1] pxweb_0.17.0 ## ## loaded via a namespace (and not attached): ## [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 ## [5] xfun_0.42 stringi_1.8.3 purrr_1.0.2 textshaping_0.3.7 ## [9] jsonlite_1.8.8 glue_1.7.0 backports_1.4.1 htmltools_0.5.7 ## [13] ragg_1.2.7 sass_0.4.8 rmarkdown_2.25 evaluate_0.23 ## [17] jquerylib_0.1.4 fastmap_1.1.1 yaml_2.3.8 lifecycle_1.0.4 ## [21] memoise_2.0.1 stringr_1.5.1 compiler_4.3.2 fs_1.6.3 ## [25] systemfonts_1.0.5 digest_0.6.34 R6_2.5.1 magrittr_2.0.3 ## [29] checkmate_2.3.1 bslib_0.6.1 tools_4.3.2 pkgdown_2.0.7 ## [33] cachem_1.0.8 desc_1.4.3"},{"path":"https://ropengov.github.io/pxweb/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Mans Magnusson. Author, maintainer. Markus Kainu. Author. Janne Huovari. Author. Leo Lahti. Author. Love Hansson. Contributor. Eydun Nielsen. Contributor. Bo Werth. Contributor. Thomas Runarsson. Contributor. Torbjörn Lindquist. Contributor. Palmar Thorsteinsson. Contributor. Pyry Kantanen. Contributor. Sebastian Ankargren. Contributor.","code":""},{"path":"https://ropengov.github.io/pxweb/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Mans Magnusson, Markus Kainu, Janne Huovari, Leo Lahti (rOpenGov). pxweb: R tools PXWEB API. URL: http://github.com/ropengov/pxweb","code":"@Misc{, title = {pxweb: R tools for PX-WEB API}, author = {Mans Magnusson and Markus Kainu and Janne Huovari and Leo Lahti}, year = {2019}, }"},{"path":"https://ropengov.github.io/pxweb/index.html","id":"r-tools-to-access-px-web-api---the-pxweb-r-package-","dir":"","previous_headings":"","what":"R Interface to PXWEB APIs","title":"R Interface to PXWEB APIs","text":"pxweb R package provides tools interface PX-WEB API data search, download, manipulation visualization purposes. used large number statistical authorities world-wide. offers methods utilize information data hierarchy stored behind PXWEB API. Many API services still early stages, data quality sometimes compromised. Issue reports welcome.","code":""},{"path":"https://ropengov.github.io/pxweb/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"R Interface to PXWEB APIs","text":"easiest way use pxweb simply install CRAN: Alternatively, can get latest stable development version: cases, organization requires manual proxy settings. can set follows:","code":"install.packages('pxweb') library(remotes) remotes::install_github('ropengov/pxweb') library(remotes) library(httr) set_config( use_proxy(\"64.251.21.73\", 8080) # Note! This is an example ) remotes::install_github('ropengov/pxweb')"},{"path":"https://ropengov.github.io/pxweb/index.html","id":"using-the-package","dir":"","previous_headings":"","what":"Using the package","title":"R Interface to PXWEB APIs","text":"examples, check tutorial/vignette.","code":""},{"path":"https://ropengov.github.io/pxweb/index.html","id":"problems","dir":"","previous_headings":"","what":"Problems?","title":"R Interface to PXWEB APIs","text":"See TROUBLESHOOTING.md open issue.","code":""},{"path":"https://ropengov.github.io/pxweb/index.html","id":"contributing","dir":"","previous_headings":"","what":"Contributing","title":"R Interface to PXWEB APIs","text":"welcome contact us: Submit suggestions bug reports (provide output sessionInfo() packageVersion(\"pxweb\")) Send pull request Star us Github page Join discussion Gitter","code":""},{"path":"https://ropengov.github.io/pxweb/index.html","id":"acknowledgements","dir":"","previous_headings":"","what":"Acknowledgements","title":"R Interface to PXWEB APIs","text":"Kindly cite work follows: Måns Magnusson, Markus Kainu, Janne Huovari, Leo Lahti. Retrieval analysis PC Axis data pxweb package. R package version . URL: https://ropengov.github.io/pxweb/ grateful contributors! project part rOpenGov.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/add_pxe_defaults.html","id":null,"dir":"Reference","previous_headings":"","what":"Add default values to pxe — add_pxe_defaults","title":"Add default values to pxe — add_pxe_defaults","text":"Add default values pxe","code":""},{"path":"https://ropengov.github.io/pxweb/reference/add_pxe_defaults.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add default values to pxe — add_pxe_defaults","text":"","code":"add_pxe_defaults(pxe)"},{"path":"https://ropengov.github.io/pxweb/reference/add_pxe_defaults.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add default values to pxe — add_pxe_defaults","text":"pxe pxweb_explorer object","code":""},{"path":"https://ropengov.github.io/pxweb/reference/api_catalogue.html","id":null,"dir":"Reference","previous_headings":"","what":"Defunct functions — api_catalogue","title":"Defunct functions — api_catalogue","text":"function version 0.10.0 become defunct. Call functions get information new functions use.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/api_catalogue.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Defunct functions — api_catalogue","text":"","code":"api_catalogue() update_pxweb_apis() api_parameters(url = NULL) base_url(api, version = NULL, language = NULL) get_pxweb_data(url, dims, clean = FALSE, encoding = NULL) get_pxweb_dims(node, verbose = TRUE) get_pxweb_levels(baseURL, descriptions = FALSE, quiet = FALSE, ...) get_pxweb_metadata( path = NULL, node = NULL, topnodes = NULL, quiet = TRUE, baseURL = NULL, ... ) pxweb_api checkForLevels(url)"},{"path":"https://ropengov.github.io/pxweb/reference/api_catalogue.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Defunct functions — api_catalogue","text":"object class list length 1.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/api_catalogue.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Defunct functions — api_catalogue","text":"url Defunct argument. api Defunct argument. version Defunct argument. language Defunct argument. dims Defunct argument. clean Defunct argument. encoding Defunct argument. node Defunct argument. verbose Defunct argument. baseURL Defunct argument. descriptions Defunct argument. quiet Defunct argument. ... Defunct argument. path Defunct argument. topnodes Defunct argument.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/as_pxweb_levels.html","id":null,"dir":"Reference","previous_headings":"","what":"Assert that x is a correct pxweb_database_list object. — as_pxweb_levels","title":"Assert that x is a correct pxweb_database_list object. — as_pxweb_levels","text":"Assert x correct pxweb_database_list object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/as_pxweb_levels.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Assert that x is a correct pxweb_database_list object. — as_pxweb_levels","text":"","code":"as_pxweb_levels(x)"},{"path":"https://ropengov.github.io/pxweb/reference/as_pxweb_levels.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Assert that x is a correct pxweb_database_list object. — as_pxweb_levels","text":"x object check.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb.html","id":null,"dir":"Reference","previous_headings":"","what":"Assert that the url structure is correct — assert_pxweb","title":"Assert that the url structure is correct — assert_pxweb","text":"Assert url slot pxweb object correct.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Assert that the url structure is correct — assert_pxweb","text":"","code":"assert_pxweb(x)"},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Assert that the url structure is correct — assert_pxweb","text":"x object assert","code":""},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_api_catalogue.html","id":null,"dir":"Reference","previous_headings":"","what":"Assert a pxweb_api_catalogue object — assert_pxweb_api_catalogue","title":"Assert a pxweb_api_catalogue object — assert_pxweb_api_catalogue","text":"Assert pxweb_api_catalogue object","code":""},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_api_catalogue.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Assert a pxweb_api_catalogue object — assert_pxweb_api_catalogue","text":"","code":"assert_pxweb_api_catalogue(x)"},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_api_catalogue.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Assert a pxweb_api_catalogue object — assert_pxweb_api_catalogue","text":"x object assert pxweb_api_catalogue_entry.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_calls.html","id":null,"dir":"Reference","previous_headings":"","what":"Assert that the rda_file_path is correct — assert_pxweb_calls","title":"Assert that the rda_file_path is correct — assert_pxweb_calls","text":"Assert rda_file_path slot pxweb object correct.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_calls.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Assert that the rda_file_path is correct — assert_pxweb_calls","text":"","code":"assert_pxweb_calls(x)"},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_calls.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Assert that the rda_file_path is correct — assert_pxweb_calls","text":"x object assert","code":""},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_config.html","id":null,"dir":"Reference","previous_headings":"","what":"Assert that the config slot is correct — assert_pxweb_config","title":"Assert that the config slot is correct — assert_pxweb_config","text":"Assert config slot pxweb object correct.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_config.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Assert that the config slot is correct — assert_pxweb_config","text":"","code":"assert_pxweb_config(x)"},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_config.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Assert that the config slot is correct — assert_pxweb_config","text":"x object assert","code":""},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Assert that x is a correct pxweb_data object. — assert_pxweb_data","title":"Assert that x is a correct pxweb_data object. — assert_pxweb_data","text":"Assert x correct pxweb_data object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Assert that x is a correct pxweb_data object. — assert_pxweb_data","text":"","code":"assert_pxweb_data(x)"},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Assert that x is a correct pxweb_data object. — assert_pxweb_data","text":"x object check.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_data_comments.html","id":null,"dir":"Reference","previous_headings":"","what":"Assert that x is a correct pxweb_data_comments object. — assert_pxweb_data_comments","title":"Assert that x is a correct pxweb_data_comments object. — assert_pxweb_data_comments","text":"Assert x correct pxweb_data_comments object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_data_comments.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Assert that x is a correct pxweb_data_comments object. — assert_pxweb_data_comments","text":"","code":"assert_pxweb_data_comments(x)"},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_data_comments.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Assert that x is a correct pxweb_data_comments object. — assert_pxweb_data_comments","text":"x object check.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_data_jsonstat.html","id":null,"dir":"Reference","previous_headings":"","what":"Assert that x is a correct pxweb_data_jsonstat object.\nAssert a json-stat version 1.0 or later object — assert_pxweb_data_jsonstat","title":"Assert that x is a correct pxweb_data_jsonstat object.\nAssert a json-stat version 1.0 or later object — assert_pxweb_data_jsonstat","text":"Assert x correct pxweb_data_jsonstat object. Assert json-stat version 1.0 later object","code":""},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_data_jsonstat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Assert that x is a correct pxweb_data_jsonstat object.\nAssert a json-stat version 1.0 or later object — assert_pxweb_data_jsonstat","text":"","code":"assert_pxweb_data_jsonstat(x)"},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_data_jsonstat.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Assert that x is a correct pxweb_data_jsonstat object.\nAssert a json-stat version 1.0 or later object — assert_pxweb_data_jsonstat","text":"x object check.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_database_list.html","id":null,"dir":"Reference","previous_headings":"","what":"Assert that x is a correct pxweb_database_list object. — assert_pxweb_database_list","title":"Assert that x is a correct pxweb_database_list object. — assert_pxweb_database_list","text":"Assert x correct pxweb_database_list object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_database_list.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Assert that x is a correct pxweb_database_list object. — assert_pxweb_database_list","text":"","code":"assert_pxweb_database_list(x)"},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_database_list.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Assert that x is a correct pxweb_database_list object. — assert_pxweb_database_list","text":"x object check.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_input_allowed.html","id":null,"dir":"Reference","previous_headings":"","what":"Assert a pxweb_input_allowed object — assert_pxweb_input_allowed","title":"Assert a pxweb_input_allowed object — assert_pxweb_input_allowed","text":"Assert pxweb_input_allowed object","code":""},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_input_allowed.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Assert a pxweb_input_allowed object — assert_pxweb_input_allowed","text":"","code":"assert_pxweb_input_allowed(x) # S3 method for pxweb_input_allowed print(x, ...)"},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_input_allowed.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Assert a pxweb_input_allowed object — assert_pxweb_input_allowed","text":"x object assert.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_levels.html","id":null,"dir":"Reference","previous_headings":"","what":"Assert that x is a correct pxweb_levels object. — assert_pxweb_levels","title":"Assert that x is a correct pxweb_levels object. — assert_pxweb_levels","text":"Assert x correct pxweb_levels object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_levels.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Assert that x is a correct pxweb_levels object. — assert_pxweb_levels","text":"","code":"assert_pxweb_levels(x)"},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_levels.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Assert that x is a correct pxweb_levels object. — assert_pxweb_levels","text":"x object check.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_metadata.html","id":null,"dir":"Reference","previous_headings":"","what":"Assert that x is a correct pxweb_metadata object. — assert_pxweb_metadata","title":"Assert that x is a correct pxweb_metadata object. — assert_pxweb_metadata","text":"Assert x correct pxweb_metadata object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_metadata.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Assert that x is a correct pxweb_metadata object. — assert_pxweb_metadata","text":"","code":"assert_pxweb_metadata(x)"},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_metadata.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Assert that x is a correct pxweb_metadata object. — assert_pxweb_metadata","text":"x object check.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_query.html","id":null,"dir":"Reference","previous_headings":"","what":"Assert a pxweb_query object — assert_pxweb_query","title":"Assert a pxweb_query object — assert_pxweb_query","text":"Assert pxweb_query object","code":""},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_query.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Assert a pxweb_query object — assert_pxweb_query","text":"","code":"assert_pxweb_query(x, check_response_format = TRUE)"},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_query.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Assert a pxweb_query object — assert_pxweb_query","text":"x object assert conferms structure pxweb_query object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_rda_file_path.html","id":null,"dir":"Reference","previous_headings":"","what":"Assert that the rda_file_path is correct — assert_pxweb_rda_file_path","title":"Assert that the rda_file_path is correct — assert_pxweb_rda_file_path","text":"Assert rda_file_path slot pxweb object correct.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_rda_file_path.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Assert that the rda_file_path is correct — assert_pxweb_rda_file_path","text":"","code":"assert_pxweb_rda_file_path(x)"},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_rda_file_path.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Assert that the rda_file_path is correct — assert_pxweb_rda_file_path","text":"x object assert","code":""},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_url.html","id":null,"dir":"Reference","previous_headings":"","what":"Assert that the url structure is correct — assert_pxweb_url","title":"Assert that the url structure is correct — assert_pxweb_url","text":"Assert url slot pxweb object correct.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_url.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Assert that the url structure is correct — assert_pxweb_url","text":"","code":"assert_pxweb_url(x)"},{"path":"https://ropengov.github.io/pxweb/reference/assert_pxweb_url.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Assert that the url structure is correct — assert_pxweb_url","text":"x object assert","code":""},{"path":"https://ropengov.github.io/pxweb/reference/assert_query_can_be_split_to_batches.html","id":null,"dir":"Reference","previous_headings":"","what":"Assert that a given pxweb query can be split — assert_query_can_be_split_to_batches","title":"Assert that a given pxweb query can be split — assert_query_can_be_split_to_batches","text":"Assert given pxweb query can split","code":""},{"path":"https://ropengov.github.io/pxweb/reference/assert_query_can_be_split_to_batches.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Assert that a given pxweb query can be split — assert_query_can_be_split_to_batches","text":"","code":"assert_query_can_be_split_to_batches(pxq, pxmd, mxv)"},{"path":"https://ropengov.github.io/pxweb/reference/assert_query_can_be_split_to_batches.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Assert that a given pxweb query can be split — assert_query_can_be_split_to_batches","text":"pxq [pxweb_query] object pxmd [pxweb_metadata] object mxv maximum batch size","code":""},{"path":"https://ropengov.github.io/pxweb/reference/build_pxweb_config_url.html","id":null,"dir":"Reference","previous_headings":"","what":"Build the url to get the config from a PXWEB api — build_pxweb_url.url","title":"Build the url to get the config from a PXWEB api — build_pxweb_url.url","text":"Build url get config PXWEB api","code":""},{"path":"https://ropengov.github.io/pxweb/reference/build_pxweb_config_url.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Build the url to get the config from a PXWEB api — build_pxweb_url.url","text":"","code":"# S3 method for url build_pxweb_url(x) build_pxweb_config_url(x) # S3 method for list build_pxweb_config_url(x) # S3 method for pxweb build_pxweb_config_url(x) # S3 method for url build_pxweb_config_url(x)"},{"path":"https://ropengov.github.io/pxweb/reference/build_pxweb_rda_file_path.html","id":null,"dir":"Reference","previous_headings":"","what":"Build or get the tmp_rda_file_path from an url or pxweb_api_s3 object — build_pxweb_rda_file_path","title":"Build or get the tmp_rda_file_path from an url or pxweb_api_s3 object — build_pxweb_rda_file_path","text":"Build get tmp_rda_file_path url pxweb_api_s3 object","code":""},{"path":"https://ropengov.github.io/pxweb/reference/build_pxweb_rda_file_path.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Build or get the tmp_rda_file_path from an url or pxweb_api_s3 object — build_pxweb_rda_file_path","text":"","code":"build_pxweb_rda_file_path(x) # S3 method for character build_pxweb_rda_file_path(x) # S3 method for url build_pxweb_rda_file_path(x) # S3 method for pxweb build_pxweb_rda_file_path(x) # S3 method for list build_pxweb_rda_file_path(x)"},{"path":"https://ropengov.github.io/pxweb/reference/build_pxweb_rda_file_path.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Build or get the tmp_rda_file_path from an url or pxweb_api_s3 object — build_pxweb_rda_file_path","text":"x object create tmp_file_path .","code":""},{"path":"https://ropengov.github.io/pxweb/reference/build_pxweb_rda_file_path.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Build or get the tmp_rda_file_path from an url or pxweb_api_s3 object — build_pxweb_rda_file_path","text":"hostname used ","code":""},{"path":"https://ropengov.github.io/pxweb/reference/build_pxweb_url.html","id":null,"dir":"Reference","previous_headings":"","what":"Build the url to a PXWEB api — build_pxweb_url","title":"Build the url to a PXWEB api — build_pxweb_url","text":"Build url PXWEB api","code":""},{"path":"https://ropengov.github.io/pxweb/reference/build_pxweb_url.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Build the url to a PXWEB api — build_pxweb_url","text":"","code":"build_pxweb_url(x) # S3 method for list build_pxweb_url(x) # S3 method for character build_pxweb_url(x) # S3 method for pxweb build_pxweb_url(x) # S3 method for pxweb_api_catalogue_entry build_pxweb_url(x)"},{"path":"https://ropengov.github.io/pxweb/reference/generate_permutations.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate batch permutations — generate_permutations","title":"Generate batch permutations — generate_permutations","text":"Generate batch permutations","code":""},{"path":"https://ropengov.github.io/pxweb/reference/generate_permutations.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate batch permutations — generate_permutations","text":"","code":"generate_permutations(x)"},{"path":"https://ropengov.github.io/pxweb/reference/generate_permutations.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate batch permutations — generate_permutations","text":"x vector elements permute","code":""},{"path":"https://ropengov.github.io/pxweb/reference/generate_permutations.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Generate batch permutations — generate_permutations","text":"Generates permutations dim. 6 dim (highly unlikely) sample 1000 combinations drawn. Otherwise possible permutations returned.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/http_was_redirected.html","id":null,"dir":"Reference","previous_headings":"","what":"http_was_redirected — http_was_redirected","title":"http_was_redirected — http_was_redirected","text":"http_was_redirected","code":""},{"path":"https://ropengov.github.io/pxweb/reference/http_was_redirected.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"http_was_redirected — http_was_redirected","text":"","code":"http_was_redirected(r)"},{"path":"https://ropengov.github.io/pxweb/reference/http_was_redirected.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"http_was_redirected — http_was_redirected","text":"r httr response object, e.g. call httr::GET()","code":""},{"path":"https://ropengov.github.io/pxweb/reference/http_was_redirected.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"http_was_redirected — http_was_redirected","text":"list slots was_redirected, redirected_from redirected_to","code":""},{"path":"https://ropengov.github.io/pxweb/reference/http_was_redirected.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"http_was_redirected — http_was_redirected","text":"Function large parts taken https://petermeissner.de/blog/2018/11/07/using-httr--detect-redirects/.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/http_was_redirected.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"http_was_redirected — http_was_redirected","text":"","code":"if (FALSE) { r <- httr::GET(\"http://httpbin.org/redirect/2\") pxweb:::http_was_redirected(r) }"},{"path":"https://ropengov.github.io/pxweb/reference/is_pxweb_config_response.html","id":null,"dir":"Reference","previous_headings":"","what":"Check if a response is a pxweb config response — is_pxweb_config_response","title":"Check if a response is a pxweb config response — is_pxweb_config_response","text":"Check response pxweb config response","code":""},{"path":"https://ropengov.github.io/pxweb/reference/is_pxweb_config_response.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check if a response is a pxweb config response — is_pxweb_config_response","text":"","code":"is_pxweb_config_response(x)"},{"path":"https://ropengov.github.io/pxweb/reference/is_pxweb_config_response.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check if a response is a pxweb config response — is_pxweb_config_response","text":"x response object","code":""},{"path":"https://ropengov.github.io/pxweb/reference/parse_url_or_fail.html","id":null,"dir":"Reference","previous_headings":"","what":"Parse a character string or throws error if it fails — parse_url_or_fail","title":"Parse a character string or throws error if it fails — parse_url_or_fail","text":"Parse character string throws error fails","code":""},{"path":"https://ropengov.github.io/pxweb/reference/parse_url_or_fail.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Parse a character string or throws error if it fails — parse_url_or_fail","text":"","code":"parse_url_or_fail(x)"},{"path":"https://ropengov.github.io/pxweb/reference/parse_url_or_fail.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Parse a character string or throws error if it fails — parse_url_or_fail","text":"x character element parse","code":""},{"path":"https://ropengov.github.io/pxweb/reference/permutations.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate permutations of dimensions to find optimal no of batches — permutations","title":"Generate permutations of dimensions to find optimal no of batches — permutations","text":"Generate permutations dimensions find optimal batches","code":""},{"path":"https://ropengov.github.io/pxweb/reference/permutations.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate permutations of dimensions to find optimal no of batches — permutations","text":"","code":"permutations(n, r, v = 1:n, set = TRUE, repeats.allowed = FALSE)"},{"path":"https://ropengov.github.io/pxweb/reference/permutations.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate permutations of dimensions to find optimal no of batches — permutations","text":"n See gtools::permutations. r See gtools::permutations. v See gtools::permutations. set See gtools::permutations. repeats.allowed See gtools::permutations.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/permutations.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Generate permutations of dimensions to find optimal no of batches — permutations","text":"Taken gtools minimize dependencies. See permutations gtools packages details","code":""},{"path":"https://ropengov.github.io/pxweb/reference/print.pxweb_api_catalogue_entry.html","id":null,"dir":"Reference","previous_headings":"","what":"Print a catalogue entry — print.pxweb_api_catalogue_entry","title":"Print a catalogue entry — print.pxweb_api_catalogue_entry","text":"Print catalogue entry","code":""},{"path":"https://ropengov.github.io/pxweb/reference/print.pxweb_api_catalogue_entry.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print a catalogue entry — print.pxweb_api_catalogue_entry","text":"","code":"# S3 method for pxweb_api_catalogue_entry print(x, ...)"},{"path":"https://ropengov.github.io/pxweb/reference/print.pxweb_api_catalogue_entry.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print a catalogue entry — print.pxweb_api_catalogue_entry","text":"x object used select method. ... arguments passed methods.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxd_values_to_valuetexts.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert a pxweb data objects values to valuetext — pxd_values_to_valuetexts","title":"Convert a pxweb data objects values to valuetext — pxd_values_to_valuetexts","text":"Convert pxweb data objects values valuetext","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxd_values_to_valuetexts.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert a pxweb data objects values to valuetext — pxd_values_to_valuetexts","text":"","code":"pxd_values_to_valuetexts(x, variable_code, variable_vector)"},{"path":"https://ropengov.github.io/pxweb/reference/pxd_values_to_valuetexts.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert a pxweb data objects values to valuetext — pxd_values_to_valuetexts","text":"x pxweb_data object variable_code variable name variable convert. NOTE! Need variable code. variable_vector vector variables convert.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_allowed_input.html","id":null,"dir":"Reference","previous_headings":"","what":"Defines allowed input for a position in a pxweb_explorer or character object. — pxe_allowed_input","title":"Defines allowed input for a position in a pxweb_explorer or character object. — pxe_allowed_input","text":"Defines allowed input position pxweb_explorer character object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_allowed_input.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Defines allowed input for a position in a pxweb_explorer or character object. — pxe_allowed_input","text":"","code":"pxe_allowed_input(x) pxe_allowed_input_df() # S3 method for pxweb_explorer pxe_allowed_input(x) # S3 method for character pxe_allowed_input(x) # S3 method for pxweb_explorer pxe_allowed_input(x)"},{"path":"https://ropengov.github.io/pxweb/reference/pxe_allowed_input.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Defines allowed input for a position in a pxweb_explorer or character object. — pxe_allowed_input","text":"x object get allowed input .","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_back_position.html","id":null,"dir":"Reference","previous_headings":"","what":"Move in the pxweb_explorer position — pxe_back_position","title":"Move in the pxweb_explorer position — pxe_back_position","text":"Move pxweb_explorer position","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_back_position.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Move in the pxweb_explorer position — pxe_back_position","text":"","code":"pxe_back_position(pxe) pxe_add_position(pxe, new_pos)"},{"path":"https://ropengov.github.io/pxweb/reference/pxe_back_position.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Move in the pxweb_explorer position — pxe_back_position","text":"pxe pxweb_explorer object. new_pos add new position.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_back_position.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Move in the pxweb_explorer position — pxe_back_position","text":"pxe_back_position moves back one position pxe_add_position moves forward, based user choice.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_data_url.html","id":null,"dir":"Reference","previous_headings":"","what":"Get the url to a table — pxe_data_url","title":"Get the url to a table — pxe_data_url","text":"Get url table","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_data_url.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get the url to a table — pxe_data_url","text":"","code":"pxe_data_url(x)"},{"path":"https://ropengov.github.io/pxweb/reference/pxe_data_url.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get the url to a table — pxe_data_url","text":"x pxweb_explorer object","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_handle_input.html","id":null,"dir":"Reference","previous_headings":"","what":"Handle a user input for a pxweb_explorer object. — pxe_handle_input","title":"Handle a user input for a pxweb_explorer object. — pxe_handle_input","text":"Handle user input pxweb_explorer object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_handle_input.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Handle a user input for a pxweb_explorer object. — pxe_handle_input","text":"","code":"pxe_handle_input(user_input, pxe) # S3 method for numeric pxe_handle_input(user_input, pxe) # S3 method for character pxe_handle_input(user_input, pxe)"},{"path":"https://ropengov.github.io/pxweb/reference/pxe_handle_input.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Handle a user input for a pxweb_explorer object. — pxe_handle_input","text":"user_input (allowed) user input handle. pxe pxweb_explorer object get user input .","code":""},{"path":[]},{"path":"https://ropengov.github.io/pxweb/reference/pxe_input.html","id":null,"dir":"Reference","previous_headings":"","what":"Get (allowed) inputs for a pxweb_input_allowed object. — pxe_input","title":"Get (allowed) inputs for a pxweb_input_allowed object. — pxe_input","text":"Get (allowed) inputs pxweb_input_allowed object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_input.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get (allowed) inputs for a pxweb_input_allowed object. — pxe_input","text":"","code":"pxe_input(allowed_input, title = NULL, test_input = NULL) pxe_parse_input(user_input, allowed_input)"},{"path":"https://ropengov.github.io/pxweb/reference/pxe_input.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get (allowed) inputs for a pxweb_input_allowed object. — pxe_input","text":"allowed_input pxweb_input_allowed. title Print (using cat()) ask allowed choices. test_input supplying test input (testing )","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_input.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get (allowed) inputs for a pxweb_input_allowed object. — pxe_input","text":"handles input checks input allowed.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_interactive_get_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Ask to download and download data — pxe_interactive_get_data","title":"Ask to download and download data — pxe_interactive_get_data","text":"Ask download download data","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_interactive_get_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Ask to download and download data — pxe_interactive_get_data","text":"","code":"pxe_interactive_get_data(pxe, test_input = NULL)"},{"path":"https://ropengov.github.io/pxweb/reference/pxe_interactive_get_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Ask to download and download data — pxe_interactive_get_data","text":"pxe pxweb_explorer object full query test_input test input testing function. Since two question, supply vector length two.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_metadata_choices.html","id":null,"dir":"Reference","previous_headings":"","what":"Get and set pxe_metadata_coices — pxe_metadata_choices","title":"Get and set pxe_metadata_coices — pxe_metadata_choices","text":"Get set pxe_metadata_coices","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_metadata_choices.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get and set pxe_metadata_coices — pxe_metadata_choices","text":"","code":"pxe_metadata_choices(x) pxe_metadata_choices(x) <- value"},{"path":"https://ropengov.github.io/pxweb/reference/pxe_metadata_choices.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get and set pxe_metadata_coices — pxe_metadata_choices","text":"x pxweb_explorer object value object set pxe_metadata_choice","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_metadata_variable_names.html","id":null,"dir":"Reference","previous_headings":"","what":"Get the meta data variable names from a pxweb_explorer object. — pxe_metadata_variable_names","title":"Get the meta data variable names from a pxweb_explorer object. — pxe_metadata_variable_names","text":"Get meta data variable names pxweb_explorer object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_metadata_variable_names.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get the meta data variable names from a pxweb_explorer object. — pxe_metadata_variable_names","text":"","code":"pxe_metadata_variable_names(x)"},{"path":"https://ropengov.github.io/pxweb/reference/pxe_metadata_variable_names.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get the meta data variable names from a pxweb_explorer object. — pxe_metadata_variable_names","text":"x pxweb_explorer object","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_position_choice_size.html","id":null,"dir":"Reference","previous_headings":"","what":"How many choices has the current position? — pxe_position_choice_size","title":"How many choices has the current position? — pxe_position_choice_size","text":"many choices current position?","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_position_choice_size.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"How many choices has the current position? — pxe_position_choice_size","text":"","code":"pxe_position_choice_size(x) pxe_position_print_size(x)"},{"path":"https://ropengov.github.io/pxweb/reference/pxe_position_choice_size.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"How many choices has the current position? — pxe_position_choice_size","text":"x pxweb_explorer object check.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_position_is_api_catalogue.html","id":null,"dir":"Reference","previous_headings":"","what":"Is the current position an api_catalogue position? — pxe_position_is_api_catalogue","title":"Is the current position an api_catalogue position? — pxe_position_is_api_catalogue","text":"current position api_catalogue position?","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_position_is_api_catalogue.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is the current position an api_catalogue position? — pxe_position_is_api_catalogue","text":"","code":"pxe_position_is_api_catalogue(x)"},{"path":"https://ropengov.github.io/pxweb/reference/pxe_position_is_api_catalogue.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is the current position an api_catalogue position? — pxe_position_is_api_catalogue","text":"x pxweb_explorer object check.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_position_is_full_query.html","id":null,"dir":"Reference","previous_headings":"","what":"Is the current position a full query (i.e. choices for all metadata variables)? — pxe_position_is_full_query","title":"Is the current position a full query (i.e. choices for all metadata variables)? — pxe_position_is_full_query","text":"current position full query (.e. choices metadata variables)?","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_position_is_full_query.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is the current position a full query (i.e. choices for all metadata variables)? — pxe_position_is_full_query","text":"","code":"pxe_position_is_full_query(x)"},{"path":"https://ropengov.github.io/pxweb/reference/pxe_position_is_full_query.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is the current position a full query (i.e. choices for all metadata variables)? — pxe_position_is_full_query","text":"x pxweb_explorer object check.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_position_is_metadata.html","id":null,"dir":"Reference","previous_headings":"","what":"Is the current position a metadata object? — pxe_position_is_metadata","title":"Is the current position a metadata object? — pxe_position_is_metadata","text":"current position metadata object?","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_position_is_metadata.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is the current position a metadata object? — pxe_position_is_metadata","text":"","code":"pxe_position_is_metadata(x)"},{"path":"https://ropengov.github.io/pxweb/reference/pxe_position_is_metadata.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is the current position a metadata object? — pxe_position_is_metadata","text":"x pxweb_explorer object check.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_position_multiple_choice_allowed.html","id":null,"dir":"Reference","previous_headings":"","what":"Are multiple choices allowed? — pxe_position_multiple_choice_allowed","title":"Are multiple choices allowed? — pxe_position_multiple_choice_allowed","text":"multiple choices allowed?","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_position_multiple_choice_allowed.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Are multiple choices allowed? — pxe_position_multiple_choice_allowed","text":"","code":"pxe_position_multiple_choice_allowed(x)"},{"path":"https://ropengov.github.io/pxweb/reference/pxe_position_multiple_choice_allowed.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Are multiple choices allowed? — pxe_position_multiple_choice_allowed","text":"x pxweb_explorer object check.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_position_title.html","id":null,"dir":"Reference","previous_headings":"","what":"Get the table title for the current position — pxe_position_title","title":"Get the table title for the current position — pxe_position_title","text":"Get table title current position","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_position_title.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get the table title for the current position — pxe_position_title","text":"","code":"pxe_position_title(x)"},{"path":"https://ropengov.github.io/pxweb/reference/pxe_position_title.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get the table title for the current position — pxe_position_title","text":"x pxweb_explorer object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_position_variable_can_be_eliminated.html","id":null,"dir":"Reference","previous_headings":"","what":"Can the variable at the current position be eliminated? — pxe_position_variable_can_be_eliminated","title":"Can the variable at the current position be eliminated? — pxe_position_variable_can_be_eliminated","text":"Can variable current position eliminated?","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_position_variable_can_be_eliminated.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Can the variable at the current position be eliminated? — pxe_position_variable_can_be_eliminated","text":"","code":"pxe_position_variable_can_be_eliminated(x)"},{"path":"https://ropengov.github.io/pxweb/reference/pxe_position_variable_can_be_eliminated.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Can the variable at the current position be eliminated? — pxe_position_variable_can_be_eliminated","text":"x pxweb_explorer object check.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_print_download_code.html","id":null,"dir":"Reference","previous_headings":"","what":"Print code to download query — pxe_print_download_code","title":"Print code to download query — pxe_print_download_code","text":"Print code download query","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_print_download_code.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print code to download query — pxe_print_download_code","text":"","code":"pxe_print_download_code(pxe, as)"},{"path":"https://ropengov.github.io/pxweb/reference/pxe_print_download_code.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print code to download query — pxe_print_download_code","text":"pxe pxweb_query object. json r.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_pxobj_at_position.html","id":null,"dir":"Reference","previous_headings":"","what":"Return the pxweb object at the current position — pxe_pxobj_at_position","title":"Return the pxweb object at the current position — pxe_pxobj_at_position","text":"Return pxweb object current position","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxe_pxobj_at_position.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Return the pxweb object at the current position — pxe_pxobj_at_position","text":"","code":"pxe_pxobj_at_position(x) pxe_pxobj_at_position(x) <- value"},{"path":"https://ropengov.github.io/pxweb/reference/pxe_pxobj_at_position.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Return the pxweb object at the current position — pxe_pxobj_at_position","text":"x pxweb_explorer object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb-package.html","id":null,"dir":"Reference","previous_headings":"","what":"Interface to PX-WEB APIs from R — pxweb-package","title":"Interface to PX-WEB APIs from R — pxweb-package","text":"PXWEB common web API used many European Statistical agencies disseminate official statistics. pxweb package facilitates connections usage APIs.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb-package.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Interface to PX-WEB APIs from R — pxweb-package","text":"decription PXWEB API : https://www.scb.se/en/-us/--website--terms--use/open-data-api/ official home page PXWEB can found : https://www.scb.se/en/services/statistical-programs--px-files/px-web/","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb.html","id":null,"dir":"Reference","previous_headings":"","what":"S3 constructor for pxweb api object. — pxweb","title":"S3 constructor for pxweb api object. — pxweb","text":"pxwebapi object contain information calls pxweb api keep count number calls. object constructed object also cached R temp folder minimize calls api. urls passed constructor set pxweb api config. Garantuees: base_url pinged sub_path checked config captured API url checked pxweb api (config)","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"S3 constructor for pxweb api object. — pxweb","text":"","code":"pxweb(url) is.pxweb(x) # S3 method for pxweb print(x, ...)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"S3 constructor for pxweb api object. — pxweb","text":"url url pxweb api including language version api. See examples. x object test pxweb object. ... arguments supplied print().","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"S3 constructor for pxweb api object. — pxweb","text":"pxweb object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"S3 constructor for pxweb api object. — pxweb","text":"","code":"if (FALSE) { pxapi_1 <- pxweb(\"https://api.scb.se/OV0104/v1/doris/sv/ssd/START/ME/ME0104/ME0104C/ME0104T24\") pxapi_2 <- pxweb(url = \"https://api.scb.se/OV0104/v1/doris/sv\") }"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_add_api_subpath.html","id":null,"dir":"Reference","previous_headings":"","what":"Add the subpath slot to a pxweb path slot — pxweb_add_api_subpath","title":"Add the subpath slot to a pxweb path slot — pxweb_add_api_subpath","text":"Add subpath slot pxweb path slot","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_add_api_subpath.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add the subpath slot to a pxweb path slot — pxweb_add_api_subpath","text":"","code":"pxweb_add_api_subpath(obj)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_add_api_subpath.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add the subpath slot to a pxweb path slot — pxweb_add_api_subpath","text":"obj object add subpath ","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_add_api_subpath.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Add the subpath slot to a pxweb path slot — pxweb_add_api_subpath","text":"Queries path pos 1 config returned.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_add_call.html","id":null,"dir":"Reference","previous_headings":"","what":"Add an api call to a pxweb_api_s3 object — pxweb_add_call","title":"Add an api call to a pxweb_api_s3 object — pxweb_add_call","text":"pxweb_add_call function add call api call stack, compute Promise: stored rda api object always latest calls thread safe one session time call api.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_add_call.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add an api call to a pxweb_api_s3 object — pxweb_add_call","text":"","code":"pxweb_add_call(obj, time_stamp = Sys.time())"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_add_call.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add an api call to a pxweb_api_s3 object — pxweb_add_call","text":"obj pxweb_api_s3 object","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_add_config.html","id":null,"dir":"Reference","previous_headings":"","what":"Add the config slot to a pxweb object — pxweb_add_config","title":"Add the config slot to a pxweb object — pxweb_add_config","text":"Add config slot pxweb object","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_add_config.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add the config slot to a pxweb object — pxweb_add_config","text":"","code":"pxweb_add_config(obj)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_add_config.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add the config slot to a pxweb object — pxweb_add_config","text":"obj object add config ","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_add_config.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Add the config slot to a pxweb object — pxweb_add_config","text":"Checks exist config object object. Otherwise query api get add call call stack.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_add_mandatory_variables.html","id":null,"dir":"Reference","previous_headings":"","what":"Add mandatory variables to query — pxweb_add_mandatory_variables","title":"Add mandatory variables to query — pxweb_add_mandatory_variables","text":"Add mandatory variables query","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_add_mandatory_variables.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add mandatory variables to query — pxweb_add_mandatory_variables","text":"","code":"pxweb_add_mandatory_variables(pxq, pxmd)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_add_mandatory_variables.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add mandatory variables to query — pxweb_add_mandatory_variables","text":"pxq pxweb_query object. pxmd pxweb_metadata object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_add_mandatory_variables.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Add mandatory variables to query — pxweb_add_mandatory_variables","text":"Complement queries lack explicit requests variables requests every value variables.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_add_metadata_to_query.html","id":null,"dir":"Reference","previous_headings":"","what":"Add and remove metadata to query — pxweb_add_metadata_to_query","title":"Add and remove metadata to query — pxweb_add_metadata_to_query","text":"Add remove metadata query","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_add_metadata_to_query.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add and remove metadata to query — pxweb_add_metadata_to_query","text":"","code":"pxweb_add_metadata_to_query(pxq, pxmd) pxweb_remove_metadata_from_query(pxq, pxmd)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_add_metadata_to_query.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add and remove metadata to query — pxweb_add_metadata_to_query","text":"pxq pxweb_query object. pxmd pxweb_metadata object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_add_metadata_to_query.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Add and remove metadata to query — pxweb_add_metadata_to_query","text":"Add metadata values variables query filter \"\".","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_advanced_get.html","id":null,"dir":"Reference","previous_headings":"","what":"Do a GET call to PXWEB API for advanced users — pxweb_advanced_get","title":"Do a GET call to PXWEB API for advanced users — pxweb_advanced_get","text":"GET call PXWEB API advanced users","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_advanced_get.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Do a GET call to PXWEB API for advanced users — pxweb_advanced_get","text":"","code":"pxweb_advanced_get( url, query = NULL, verbose = TRUE, log_http_calls = FALSE, pxmdo = NULL, ... )"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_advanced_get.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Do a GET call to PXWEB API for advanced users — pxweb_advanced_get","text":"url pxweb object url can coherced pxweb object. query json string, json file list object can coherced pxweb_query object. verbose large queries print progress. log_http_calls http calls API logged (debugging reasons). TRUE, calls responses logged written \"log_pxweb_api_http_calls.txt\" working directory. pxmdo pxweb_metadata object use query. ... arguments sent httr::POST (queries) httr::GET (query = NULL). used query, also supply pxweb_metadata object. Otherwise parameters sent httr::POST httr::GET.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_advanced_get.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Do a GET call to PXWEB API for advanced users — pxweb_advanced_get","text":"function intended advanced users want supply specific arguments httr calls debug httr calls. pxweb_get() wrapper standard use.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_api_catalogue.html","id":null,"dir":"Reference","previous_headings":"","what":"Get the PXWEB API catalogue — pxweb_api_catalogue","title":"Get the PXWEB API catalogue — pxweb_api_catalogue","text":"Get PXWEB API catalogue","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_api_catalogue.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get the PXWEB API catalogue — pxweb_api_catalogue","text":"","code":"pxweb_api_catalogue() pxweb_api_catalogue_from_json(json) pxweb_api_catalogue_from_github(branch = \"master\") pxweb_api_catalogue_path()"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_api_catalogue.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get the PXWEB API catalogue — pxweb_api_catalogue","text":"list implemented API:s.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_api_catalogue.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get the PXWEB API catalogue — pxweb_api_catalogue","text":"","code":"pxweb_api_catalogue() #> $api.scb.se #> Api: api.scb.se #> Statistics Sweden #> ('scb') #> Version(s) : v1 #> Language(s) : en, sv #> Limit(s) : 30 calls per 10 sec. #> 110000 values per call. #> Url template : #> https://api.scb.se/OV0104/[version]/doris/[lang] #> #> $statfin.stat.fi #> Api: statfin.stat.fi #> Statistics Finland #> ('statfi', 'statfin') #> Version(s) : v1 #> Language(s) : en, fi, sv #> Limit(s) : 30 calls per 10 sec. #> 120000 values per call. #> Url template : #> https://statfin.stat.fi/PXWeb/api/[version]/[lang] #> #> $pxwebapi2.stat.fi #> Api: pxwebapi2.stat.fi #> Statistics Finland (old version) #> Version(s) : v1 #> Language(s) : fi #> Limit(s) : 1000 calls per 10 sec. #> 110000 values per call. #> Url template : #> https://pxwebapi2.stat.fi/PXWeb/api/[version]/[lang] #> #> $statistik.sjv.se #> Api: statistik.sjv.se #> The Swedish Agricultural Agency #> ('jordbruksverket') #> Version(s) : v1 #> Language(s) : sv #> Limit(s) : 1000 calls per 10 sec. #> 1000 values per call. #> Url template : #> https://statistik.sjv.se/PXWeb/api/[version]/[lang] #> #> $`fohm-app.folkhalsomyndigheten.se` #> Api: fohm-app.folkhalsomyndigheten.se #> The Public Health Agency of Sweden #> ('fohm') #> Version(s) : v1 #> Language(s) : sv #> Limit(s) : 1000 calls per 10 sec. #> 1000 values per call. #> Url template : #> http://fohm-app.folkhalsomyndigheten.se/Folkhalsodata/api/[version]/[lang] #> #> $statistik.konj.se #> Api: statistik.konj.se #> The Swedish National Institute of Economic Research #> ('konj') #> Version(s) : v1 #> Language(s) : en, sv #> Limit(s) : 10 calls per 10 sec. #> 1000 values per call. #> Url template : #> http://statistik.konj.se/PXWeb/api/[version]/[lang] #> #> $prognos.konj.se #> Api: prognos.konj.se #> The Swedish national institute of economic research, forecast database #> ('konjforcast') #> Version(s) : v1 #> Language(s) : sv #> Limit(s) : 10 calls per 10 sec. #> 1000 values per call. #> Url template : #> http://prognos.konj.se/PXWeb/api/[version]/[lang] #> #> $statdb.luke.fi #> Api: statdb.luke.fi #> LUKE Natural Resources Institute Finland #> ('luke') #> Version(s) : v1 #> Language(s) : en, fi, sv #> Limit(s) : 10 calls per 10 sec. #> 10000 values per call. #> Url template : #> http://statdb.luke.fi/PXWeb/api/[version]/[lang] #> #> $vero2.stat.fi #> Api: vero2.stat.fi #> Verohallinto - Finnish Tax Administration #> ('vero') #> Version(s) : v1 #> Language(s) : en, fi, sv #> Limit(s) : 100 calls per 10 sec. #> 150000 values per call. #> Url template : #> http://vero2.stat.fi/PXWeb/api/[version]/[lang] #> #> $px.hagstofa.is #> Api: px.hagstofa.is #> Statistics Iceland #> ('statice') #> Version(s) : v1 #> Language(s) : en, is #> Limit(s) : 30 calls per 1 sec. #> 10000 values per call. #> Url template : #> http://px.hagstofa.is/px[lang]/api/[version]/[lang] #> #> $statistik.linkoping.se #> Api: statistik.linkoping.se #> Linköping municipality in Sweden #> ('linkoping') #> Version(s) : v1 #> Language(s) : sv #> Limit(s) : 1000 calls per 10 sec. #> 1000 values per call. #> Url template : #> http://statistik.linkoping.se/PXWeb/api/[version]/[lang] #> #> $pxwebb2017.vgregion.se #> Api: pxwebb2017.vgregion.se #> Vastra Gotaland Region in Sweden #> ('vgregion') #> Version(s) : v1 #> Language(s) : sv #> Limit(s) : 10 calls per 10 sec. #> 1000 values per call. #> Url template : #> http://pxwebb2017.vgregion.se/pxweb/api/[version]/[lang] #> #> $bank.stat.gl #> Api: bank.stat.gl #> Statbank Greenland #> ('greenland') #> Version(s) : v1 #> Language(s) : en, kl, da #> Limit(s) : 10000 calls per 10 sec. #> 1000000 values per call. #> Url template : #> https://bank.stat.gl/api/[version]/[lang] #> #> $px.rsv.is #> Api: px.rsv.is #> Icelandic Centre for Retail Studies #> ('rsv') #> Version(s) : v1 #> Language(s) : en, is #> Limit(s) : 30 calls per 1 sec. #> 10000 values per call. #> Url template : #> http://px.rsv.is/PXWeb/api/[version]/[lang] #> #> $statbank.hagstova.fo #> Api: statbank.hagstova.fo #> Statistics Faroe Islands #> ('hagstovan') #> Version(s) : v1 #> Language(s) : en, fo #> Limit(s) : 1000000 calls per 1000000 sec. #> 100000 values per call. #> Url template : #> https://statbank.hagstova.fo:443/api/[version]/[lang] #> #> $data.ssb.no #> Api: data.ssb.no #> Statistics Norway #> ('ssb') #> Version(s) : v0 #> Language(s) : en, no #> Limit(s) : 30 calls per 60 sec. #> 30000 values per call. #> Url template : #> http://data.ssb.no/api/[version]/[lang] #> #> $pxweb.asub.ax #> Api: pxweb.asub.ax #> Statistics Aland #> ('asub') #> Version(s) : v1 #> Language(s) : en, sv #> Limit(s) : 10 calls per 10 sec. #> 1000 values per call. #> Url template : #> https://pxweb.asub.ax/PXWeb/api/[version]/[lang]/ #> #> $makstat.stat.gov.mk #> Api: makstat.stat.gov.mk #> State Statistical Office of the Republic of Macedonia #> ('makstat') #> Version(s) : v1 #> Language(s) : en, mk #> Limit(s) : 30 calls per 1 sec. #> 10000 values per call. #> Url template : #> https://makstat.stat.gov.mk/PXWeb/api/[version]/[lang]/MakStat/ #> #> $data.stat.gov.lv #> Api: data.stat.gov.lv #> Latvia - official statistics #> ('csb_lv') #> Version(s) : v1 #> Language(s) : en, lv #> Limit(s) : 100 calls per 10 sec. #> 3800 values per call. #> Url template : #> https://data.stat.gov.lv/api/[version]/[lang]/ #> #> $statbank.statistica.md #> Api: statbank.statistica.md #> Statistics Moldova #> ('statistica_md') #> Version(s) : v1 #> Language(s) : en, ro #> Limit(s) : 10 calls per 10 sec. #> 1000 values per call. #> Url template : #> https://statbank.statistica.md/pxweb/api/[version]/[lang]/ #> #> $www.pxweb.bfs.admin.ch #> Api: www.pxweb.bfs.admin.ch #> Statistics Switzerland #> ('switzerland') #> Version(s) : v1 #> Language(s) : en, de, fr #> Limit(s) : 10 calls per 10 sec. #> 5000 values per call. #> Url template : #> https://www.pxweb.bfs.admin.ch/api/[version]/[lang] #> #> $`askdata.rks-gov.net` #> Api: askdata.rks-gov.net #> Statistics Kosovo #> ('askdata') #> Version(s) : v1 #> Language(s) : en #> Limit(s) : 10 calls per 10 sec. #> 1000 values per call. #> Url template : #> https://askdata.rks-gov.net/PXWeb/api/[version]/[lang]/ #> #> $trafi2.stat.fi #> Api: trafi2.stat.fi #> Finnish Transport Safety Agency #> ('trafi2') #> Version(s) : v1 #> Language(s) : en, sv, fi #> Limit(s) : 100 calls per 10 sec. #> 110000 values per call. #> Url template : #> https://trafi2.stat.fi/PXWeb/api/[version]/[lang]/ #> #> $w3.unece.org #> Api: w3.unece.org #> United Nations Economic Commission for Europe #> ('unece') #> Version(s) : v1 #> Language(s) : en #> Limit(s) : 10 calls per 10 sec. #> 100000 values per call. #> Url template : #> https://w3.unece.org/PXWeb2015/api/[version]/[lang]/ #> #> $`www.grande-region.lu` #> Api: www.grande-region.lu #> Portail statistique de la Grande Région #> ('grande-region') #> Version(s) : v1 #> Language(s) : fr, de #> Limit(s) : 10 calls per 10 sec. #> 1000 values per call. #> Url template : #> https://www.grande-region.lu/pxweb/api/[version]/[lang] #> #> $visitfinland.stat.fi #> Api: visitfinland.stat.fi #> Visit Finland (Rudolf service) #> Version(s) : v1 #> Language(s) : fi #> Limit(s) : 20 calls per 10 sec. #> 110000 values per call. #> Url template : #> http://visitfinland.stat.fi/PXWeb/api/[version]/[lang]/VisitFinland #> #> $stat.hel.fi #> Api: stat.hel.fi #> Helsingin seudun aluesarjat -tilastotietokanta #> Version(s) : v1 #> Language(s) : fi #> Limit(s) : 1000 calls per 10 sec. #> 100000 values per call. #> Url template : #> https://stat.hel.fi/api/[version]/[lang] #> #> $andmed.stat.ee #> Api: andmed.stat.ee #> Estonia - official statistics #> ('stat_ee') #> Version(s) : v1 #> Language(s) : en, et #> Limit(s) : 1000 calls per 10 sec. #> 1000000 values per call. #> Url template : #> https://andmed.stat.ee/api/[version]/[lang]/stat #> #> $pxweb.nordicstatistics.org #> Api: pxweb.nordicstatistics.org #> Nordic Statistics Database #> Version(s) : v1 #> Language(s) : en #> Limit(s) : 10 calls per 10 sec. #> 1000 values per call. #> Url template : #> https://pxweb.nordicstatistics.org/api/[version]/[lang]/ #> #> $pxweb.stat.si #> Api: pxweb.stat.si #> SiStat Database #> Version(s) : v1 #> Language(s) : sl #> Limit(s) : 100 calls per 10 sec. #> 10000000 values per call. #> Url template : #> https://pxweb.stat.si/SiStatData/api/[version]/[lang]/Data #> #> attr(,\"class\") #> [1] \"pxweb_api_catalogue\" \"list\""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_api_catalogue_entry.html","id":null,"dir":"Reference","previous_headings":"","what":"Constructor for pxweb_api_catalogue_entry. — pxweb_api_catalogue_entry","title":"Constructor for pxweb_api_catalogue_entry. — pxweb_api_catalogue_entry","text":"Constructor pxweb_api_catalogue_entry.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_api_catalogue_entry.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Constructor for pxweb_api_catalogue_entry. — pxweb_api_catalogue_entry","text":"","code":"pxweb_api_catalogue_entry(x) # S3 method for list pxweb_api_catalogue_entry(x) assert_pxweb_api_catalogue_entry(x)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_api_catalogue_entry.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Constructor for pxweb_api_catalogue_entry. — pxweb_api_catalogue_entry","text":"x object assert pxweb_api_catalogue_entry.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_api_name.html","id":null,"dir":"Reference","previous_headings":"","what":"Get the api name, rootpath, subpath, path or dbpath — pxweb_api_name","title":"Get the api name, rootpath, subpath, path or dbpath — pxweb_api_name","text":"Get api name, rootpath, subpath, path dbpath","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_api_name.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get the api name, rootpath, subpath, path or dbpath — pxweb_api_name","text":"","code":"pxweb_api_name(x) # S3 method for url pxweb_api_name(x) # S3 method for pxweb pxweb_api_name(x) # S3 method for pxweb_api_catalogue_entry pxweb_api_name(x) # S3 method for pxweb_explorer pxweb_api_name(x) pxweb_api_rootpath(x) # S3 method for url pxweb_api_rootpath(x) # S3 method for pxweb pxweb_api_rootpath(x) # S3 method for pxweb_explorer pxweb_api_rootpath(x) pxweb_api_subpath(x, init_slash = TRUE, as_vector = FALSE) # S3 method for pxweb pxweb_api_subpath(x, init_slash = TRUE, as_vector = FALSE) # S3 method for pxweb_explorer pxweb_api_subpath(x, init_slash = TRUE, as_vector = FALSE) pxweb_api_path(x, init_slash = TRUE, as_vector = FALSE) # S3 method for url pxweb_api_path(x, init_slash = TRUE, as_vector = FALSE) # S3 method for pxweb pxweb_api_path(x, init_slash = TRUE, as_vector = FALSE) # S3 method for pxweb_explorer pxweb_api_path(x, init_slash = TRUE, as_vector = FALSE) pxweb_api_dbpath(x, init_slash = TRUE, as_vector = FALSE) # S3 method for pxweb pxweb_api_dbpath(x, init_slash = TRUE, as_vector = FALSE) # S3 method for pxweb_explorer pxweb_api_path(x, init_slash = TRUE, as_vector = FALSE) assert_path(x) pxe_position_path( x, init_slash = TRUE, as_vector = FALSE, include_rootpath = FALSE ) pxe_metadata_path(x, as_vector = FALSE)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_api_name.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get the api name, rootpath, subpath, path or dbpath — pxweb_api_name","text":"x object get name path init_slash subpath path start /. Default TRUE. as_vector subpath path vector split /. Default FALSE. include_rootpath rootpath included? Default FALSE","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_api_name.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get the api name, rootpath, subpath, path or dbpath — pxweb_api_name","text":"PXWEB API contain following path: API-NAME/API-VERSION/LANGUAGE/DATABASE-ID//TABLE-ID full url made rootpath, subpath, path. rootpath made protocol API-NAME / hostname protocol (). subpath contain API-VERSION LANGUAGE can contain parts well. subpath shortest config can called . can seen base API. dbpath, data base path, contain DATABASE-ID//TABLE-ID. path, standar path url, .e. subpath + dbpath. path ends slash, subpath dbpath may begin slash, see parameters","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_as_data_frame.html","id":null,"dir":"Reference","previous_headings":"","what":"Coerce a pxweb_data object to a data.frame — pxweb_as_data_frame","title":"Coerce a pxweb_data object to a data.frame — pxweb_as_data_frame","text":"Coerce pxweb_data object data.frame","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_as_data_frame.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Coerce a pxweb_data object to a data.frame — pxweb_as_data_frame","text":"","code":"pxweb_as_data_frame( x, row.names = NULL, optional = FALSE, ..., stringsAsFactors = FALSE, column.name.type = \"text\", variable.value.type = \"text\" ) # S3 method for pxweb_data pxweb_as_data_frame( x, row.names = NULL, optional = FALSE, ..., stringsAsFactors = FALSE, column.name.type = \"text\", variable.value.type = \"text\" ) # S3 method for pxweb_data_comments pxweb_as_data_frame( x, row.names = NULL, optional = FALSE, ..., stringsAsFactors = FALSE ) # S3 method for pxweb_data_comment pxweb_as_data_frame( x, row.names = NULL, optional = FALSE, ..., stringsAsFactors = FALSE ) # S3 method for pxweb_levels pxweb_as_data_frame( x, row.names = NULL, optional = FALSE, ..., stringsAsFactors = FALSE ) # S3 method for pxweb_data as.data.frame( x, row.names = NULL, optional = FALSE, ..., stringsAsFactors = FALSE, column.name.type = \"text\", variable.value.type = \"text\" ) # S3 method for pxweb_data_comments as.data.frame( x, row.names = NULL, optional = FALSE, ..., stringsAsFactors = FALSE ) # S3 method for pxweb_levels as.data.frame( x, row.names = NULL, optional = FALSE, ..., stringsAsFactors = FALSE ) # S3 method for pxweb_metadata as.data.frame( x, row.names = NULL, optional = FALSE, ..., stringsAsFactors = FALSE ) pxweb_as_matrix( x, row.names = NULL, column.name.type = \"text\", variable.value.type = \"text\" ) # S3 method for pxweb_data pxweb_as_matrix( x, row.names = NULL, column.name.type = \"text\", variable.value.type = \"text\" ) # S3 method for pxweb_data as.matrix( x, ..., row.names = NULL, column.name.type = \"text\", variable.value.type = \"text\" ) pxweb_pxd_slot_idx_pos(x)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_as_data_frame.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Coerce a pxweb_data object to a data.frame — pxweb_as_data_frame","text":"x object convert data.frame. row.names See .data.frame. optional See .data.frame. ... See .data.frame. stringsAsFactors See .data.frame. column.name.type character: code text used column names? variable.value.type character: code text used values columns?","code":""},{"path":[]},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_as_json.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert object to json — pxweb_as_json","title":"Convert object to json — pxweb_as_json","text":"Convert object json","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_as_json.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert object to json — pxweb_as_json","text":"","code":"pxweb_as_json(x) # S3 method for pxweb_query pxweb_as_json(x)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_as_json.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert object to json — pxweb_as_json","text":"x object convert.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_c.html","id":null,"dir":"Reference","previous_headings":"","what":"Combine pxweb objects — pxweb_c","title":"Combine pxweb objects — pxweb_c","text":"Combine pxweb objects","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_c.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Combine pxweb objects — pxweb_c","text":"","code":"pxweb_c(x)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_c.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Combine pxweb objects — pxweb_c","text":"x list pxweb objects.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_cite.html","id":null,"dir":"Reference","previous_headings":"","what":"Cite a PXWEB data object — pxweb_cite","title":"Cite a PXWEB data object — pxweb_cite","text":"Cite PXWEB data object","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_cite.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Cite a PXWEB data object — pxweb_cite","text":"","code":"pxweb_cite(x, style = \"citation\")"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_cite.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Cite a PXWEB data object — pxweb_cite","text":"x pxweb_data object cite. style see bibentry.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_cite.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Cite a PXWEB data object — pxweb_cite","text":"Functionality automatic cite PXWEB data objects.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_clear_cache.html","id":null,"dir":"Reference","previous_headings":"","what":"Clear cache of all (or one) pxweb object — pxweb_clear_cache","title":"Clear cache of all (or one) pxweb object — pxweb_clear_cache","text":"Clear cache (one) pxweb object","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_clear_cache.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Clear cache of all (or one) pxweb object — pxweb_clear_cache","text":"","code":"pxweb_clear_cache(x = NULL)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_clear_cache.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Clear cache of all (or one) pxweb object — pxweb_clear_cache","text":"x pxweb object clear cache . Default NULL (clear everything).","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_clear_cache.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Clear cache of all (or one) pxweb object — pxweb_clear_cache","text":"Clean cache sleep restore api timing limit.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Construct a pxweb_data object. — pxweb_data","title":"Construct a pxweb_data object. — pxweb_data","text":"object contain data given PXWEB table.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Construct a pxweb_data object. — pxweb_data","text":"","code":"pxweb_data(x)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Construct a pxweb_data object. — pxweb_data","text":"x list returned PXWEB API convert pxweb_data object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Construct a pxweb_data object. — pxweb_data","text":"pxweb_data object","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_data_c.html","id":null,"dir":"Reference","previous_headings":"","what":"Combine pxweb objects — pxweb_data_c","title":"Combine pxweb objects — pxweb_data_c","text":"Combine pxweb objects","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_data_c.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Combine pxweb objects — pxweb_data_c","text":"","code":"pxweb_data_c(x)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_data_c.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Combine pxweb objects — pxweb_data_c","text":"x list pxweb objects.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_data_colnames.html","id":null,"dir":"Reference","previous_headings":"","what":"Get query filter — pxweb_data_colnames","title":"Get query filter — pxweb_data_colnames","text":"Get query filter","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_data_colnames.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get query filter — pxweb_data_colnames","text":"","code":"pxweb_data_colnames(pxd, type = \"text\")"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_data_colnames.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get query filter — pxweb_data_colnames","text":"pxd pxweb_data object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_data_colnames.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get query filter — pxweb_data_colnames","text":"character vector column names.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_data_column_comment.html","id":null,"dir":"Reference","previous_headings":"","what":"Construct a pxweb_data_comment object — pxweb_data_column_comment","title":"Construct a pxweb_data_comment object — pxweb_data_column_comment","text":"Construct pxweb_data_comment object","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_data_column_comment.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Construct a pxweb_data_comment object — pxweb_data_column_comment","text":"","code":"pxweb_data_column_comment(x, column_idx) pxweb_data_value_comment(x, comment_idx) pxweb_data_obs_comment(x, obs_idx)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_data_column_comment.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Construct a pxweb_data_comment object — pxweb_data_column_comment","text":"x pxweb_data extract pxweb_data_comment object . column_idx index column extract. comment_idx index comment extract. obs_idx index comment extract.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_data_comments.html","id":null,"dir":"Reference","previous_headings":"","what":"Construct a pxweb_data_comments object. — pxweb_data_comments","title":"Construct a pxweb_data_comments object. — pxweb_data_comments","text":"object contain comments given PXWEB table.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_data_comments.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Construct a pxweb_data_comments object. — pxweb_data_comments","text":"","code":"pxweb_data_comments(x) # S3 method for pxweb_data pxweb_data_comments(x)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_data_comments.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Construct a pxweb_data_comments object. — pxweb_data_comments","text":"x pxweb_data object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_data_comments.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Construct a pxweb_data_comments object. — pxweb_data_comments","text":"pxweb_data_comments object","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_data_comments.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Construct a pxweb_data_comments object. — pxweb_data_comments","text":"","code":"if (FALSE) { url <- \"https://api.scb.se/OV0104/v1/doris/en/ssd/BE/BE0101/BE0101A/BefolkningNy\" json_query <- file.path(system.file(package = \"pxweb\"), \"extdata\", \"examples\", \"json_query_example.json\") pxd <- pxweb_get(url = url, query = json_query) pxdcs <- pxweb_data_comments(x = pxd) pxdc_df <- as.data.frame(pxdcs, stringsAsFactors = TRUE) }"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_data_dim.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute the dimension of the query pxweb_data object — pxweb_data_dim","title":"Compute the dimension of the query pxweb_data object — pxweb_data_dim","text":"Compute dimension query pxweb_data object","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_data_dim.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute the dimension of the query pxweb_data object — pxweb_data_dim","text":"","code":"pxweb_data_dim(pxd)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_data_dim.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute the dimension of the query pxweb_data object — pxweb_data_dim","text":"pxd pxweb_data object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_data_jsonstat.html","id":null,"dir":"Reference","previous_headings":"","what":"Construct a pxweb_data_jsonstat object. — pxweb_data_jsonstat","title":"Construct a pxweb_data_jsonstat object. — pxweb_data_jsonstat","text":"object contain data given PXWEB table.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_data_jsonstat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Construct a pxweb_data_jsonstat object. — pxweb_data_jsonstat","text":"","code":"pxweb_data_jsonstat(x)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_data_jsonstat.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Construct a pxweb_data_jsonstat object. — pxweb_data_jsonstat","text":"x list returned PXWEB API convert pxweb_data_jsonstat object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_data_jsonstat.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Construct a pxweb_data_jsonstat object. — pxweb_data_jsonstat","text":"pxweb_data_jsonstat object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_database_list.html","id":null,"dir":"Reference","previous_headings":"","what":"Construct a pxweb_database_list object. — pxweb_database_list","title":"Construct a pxweb_database_list object. — pxweb_database_list","text":"object contain list databases given PXWEB api.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_database_list.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Construct a pxweb_database_list object. — pxweb_database_list","text":"","code":"pxweb_database_list(x)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_database_list.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Construct a pxweb_database_list object. — pxweb_database_list","text":"x list returned PXWEB API convert pxweb_database_list object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_database_list.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Construct a pxweb_database_list object. — pxweb_database_list","text":"pxweb_database_list object","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_explorer.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a pxweb_explorer object. — pxweb_explorer","title":"Create a pxweb_explorer object. — pxweb_explorer","text":"position current position api, character vector root. Note position alway correct url. Metadata choices part position root bottom path (position) user can go. length 0, user can essentially go hostname. paste(root_path + position, collapse = \"/\") used construct path position case url. print bar separation purposes","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_explorer.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a pxweb_explorer object. — pxweb_explorer","text":"","code":"pxweb_explorer(x = NULL) # S3 method for `NULL` pxweb_explorer(x) # S3 method for character pxweb_explorer(x) # S3 method for pxweb pxweb_explorer(x) # S3 method for pxweb_api_catalogue_entry pxweb_explorer(x) assert_pxweb_explorer(x) # S3 method for pxweb_explorer print(x, ...) print_bar() pxe_print_choices(x)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_explorer.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a pxweb_explorer object. — pxweb_explorer","text":"x pxweb object, PXWEB url, NULL api api catalogue.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_explorer.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a pxweb_explorer object. — pxweb_explorer","text":"","code":"## The functions below are internal generic functions ## x <- pxweb_explorer() ## url <- \"api.scb.se\" ## x <- pxweb_explorer(x = url) ## url <- \"https://api.scb.se/OV0104/v1/doris/en/ssd/BE/BE0101/BE0101A/\" ## x <- pxweb_explorer(x = url) ## url <- \"https://api.scb.se/OV0104/v1/doris/en/ssd/BE/BE0101/BE0101A/BefolkningNy\" ## x <- pxweb_explorer(x = url)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_fix_url.html","id":null,"dir":"Reference","previous_headings":"","what":"Fix url characters — pxweb_fix_url","title":"Fix url characters — pxweb_fix_url","text":"Fix url characters","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_fix_url.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fix url characters — pxweb_fix_url","text":"","code":"pxweb_fix_url(x)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_fix_url.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fix url characters — pxweb_fix_url","text":"x string fix","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_get.html","id":null,"dir":"Reference","previous_headings":"","what":"Do a GET call to PXWEB API — pxweb_get","title":"Do a GET call to PXWEB API — pxweb_get","text":"GET call PXWEB API","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_get.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Do a GET call to PXWEB API — pxweb_get","text":"","code":"pxweb_get(url, query = NULL, verbose = TRUE)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_get.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Do a GET call to PXWEB API — pxweb_get","text":"url pxweb object url can coherced pxweb object. query json string, json file list object can coherced pxweb_query object. verbose large queries print progress.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_get.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Do a GET call to PXWEB API — pxweb_get","text":"","code":"if (FALSE) { url <- \"https://api.scb.se/OV0104/v1/doris/sv/ssd/BE/BE0101/BE0101A/BefolkningNy\" px_meta_data <- pxweb_get(url) url <- \"https://api.scb.se/OV0104/v1/doris/sv/ssd/BE/BE0101\" px_levels <- pxweb_get(url) url <- \"https://api.scb.se/OV0104/v1/doris/sv\" px_levels <- pxweb_get(url) url <- \"https://api.scb.se/OV0104/v1/doris/sv/ssd/BE/BE0101/BE0101A/BefolkningNy\" query <- file.path( system.file(package = \"pxweb\"), \"extdata\", \"examples\", \"json_query_example.json\" ) px_data <- pxweb_get(url = url, query = query) # Convert to data.frame as.data.frame(px_data, column.name.type = \"text\", variable.value.type = \"text\") # Get raw data as.matrix(px_data, column.name.type = \"code\", variable.value.type = \"code\") # Get data comments pxweb_data_comments(px_data) # Get jsonstat data jstat <- query <- file.path( system.file(package = \"pxweb\"), \"extdata\", \"examples\", \"json-stat_query_example.json\" ) jstat_data <- pxweb_get(url = url, query = query) # Get very large datasets (multiple downloads needed) big_query <- file.path( system.file(package = \"pxweb\"), \"extdata\", \"examples\", \"json_big_query_example.json\" ) px_data <- pxweb_get(url = url, query = big_query) }"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_get_api_test_data_frame.html","id":null,"dir":"Reference","previous_headings":"","what":"Build api test data.frame — pxweb_get_api_test_data_frame","title":"Build api test data.frame — pxweb_get_api_test_data_frame","text":"Build api test data.frame","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_get_api_test_data_frame.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Build api test data.frame — pxweb_get_api_test_data_frame","text":"","code":"pxweb_get_api_test_data_frame(x)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_get_api_test_data_frame.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Build api test data.frame — pxweb_get_api_test_data_frame","text":"x pxweb object","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_get_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Do a GET call to PXWEB API and return a data.frame — pxweb_get_data","title":"Do a GET call to PXWEB API and return a data.frame — pxweb_get_data","text":"GET call PXWEB API return data.frame","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_get_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Do a GET call to PXWEB API and return a data.frame — pxweb_get_data","text":"","code":"pxweb_get_data( url, query, verbose = TRUE, column.name.type = \"text\", variable.value.type = \"text\" )"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_get_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Do a GET call to PXWEB API and return a data.frame — pxweb_get_data","text":"url pxweb object url can coherced pxweb object. query json string, json file list object can coherced pxweb_query object. verbose large queries print progress. column.name.type character: code text used column names? variable.value.type character: code text used values columns?","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_get_data.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Do a GET call to PXWEB API and return a data.frame — pxweb_get_data","text":"functions use pxweb_query PXWEB url return data.frame. wrapper pxweb_get function.","code":""},{"path":[]},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_get_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Do a GET call to PXWEB API and return a data.frame — pxweb_get_data","text":"","code":"if (FALSE) { url <- \"https://api.scb.se/OV0104/v1/doris/sv/ssd/BE/BE0101/BE0101A/BefolkningNy\" query <- file.path( system.file(package = \"pxweb\"), \"extdata\", \"examples\", \"json_query_example.json\" ) df <- pxweb_get_data(url = url, query = query) }"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_http_log_on.html","id":null,"dir":"Reference","previous_headings":"","what":"Setup a structure to log all API calls — pxweb_http_log_on","title":"Setup a structure to log all API calls — pxweb_http_log_on","text":"Setup structure log API calls","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_http_log_on.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Setup a structure to log all API calls — pxweb_http_log_on","text":"","code":"pxweb_http_log_on(fn = \"log_pxweb_api_http_calls.txt\") pxweb_http_log_off() pxweb_log_paths_path() pxweb_http_log_is_on() pxweb_http_log_response(r) pxweb_response_to_log_as_json(r)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_http_log_on.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Setup a structure to log all API calls — pxweb_http_log_on","text":"fn file name log file.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_http_log_on.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Setup a structure to log all API calls — pxweb_http_log_on","text":"Set internal structure handle http PXWEB API calls. http calls stored log file. access path log file, path stored pxweb folder tempdir(). path given pxweb_log_paths_path(). file exists, http calls logged (appended) log file object contains path.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_interactive.html","id":null,"dir":"Reference","previous_headings":"","what":"Find and download data interactively from a PXWEB API — pxweb_interactive","title":"Find and download data interactively from a PXWEB API — pxweb_interactive","text":"Wrapper function (pxweb_get) simply find download data current R session.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_interactive.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find and download data interactively from a PXWEB API — pxweb_interactive","text":"","code":"pxweb_interactive(x = NULL) interactive_pxweb(x = NULL)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_interactive.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find and download data interactively from a PXWEB API — pxweb_interactive","text":"x name alias pxweb api connect , pxweb object url.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_interactive.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find and download data interactively from a PXWEB API — pxweb_interactive","text":"function returns list three slots: url: URL data query: query access data data: downloaded data (chosen download data)","code":""},{"path":[]},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_interactive.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find and download data interactively from a PXWEB API — pxweb_interactive","text":"","code":"pxweb_api_catalogue() # List apis #> $api.scb.se #> Api: api.scb.se #> Statistics Sweden #> ('scb') #> Version(s) : v1 #> Language(s) : en, sv #> Limit(s) : 30 calls per 10 sec. #> 110000 values per call. #> Url template : #> https://api.scb.se/OV0104/[version]/doris/[lang] #> #> $statfin.stat.fi #> Api: statfin.stat.fi #> Statistics Finland #> ('statfi', 'statfin') #> Version(s) : v1 #> Language(s) : en, fi, sv #> Limit(s) : 30 calls per 10 sec. #> 120000 values per call. #> Url template : #> https://statfin.stat.fi/PXWeb/api/[version]/[lang] #> #> $pxwebapi2.stat.fi #> Api: pxwebapi2.stat.fi #> Statistics Finland (old version) #> Version(s) : v1 #> Language(s) : fi #> Limit(s) : 1000 calls per 10 sec. #> 110000 values per call. #> Url template : #> https://pxwebapi2.stat.fi/PXWeb/api/[version]/[lang] #> #> $statistik.sjv.se #> Api: statistik.sjv.se #> The Swedish Agricultural Agency #> ('jordbruksverket') #> Version(s) : v1 #> Language(s) : sv #> Limit(s) : 1000 calls per 10 sec. #> 1000 values per call. #> Url template : #> https://statistik.sjv.se/PXWeb/api/[version]/[lang] #> #> $`fohm-app.folkhalsomyndigheten.se` #> Api: fohm-app.folkhalsomyndigheten.se #> The Public Health Agency of Sweden #> ('fohm') #> Version(s) : v1 #> Language(s) : sv #> Limit(s) : 1000 calls per 10 sec. #> 1000 values per call. #> Url template : #> http://fohm-app.folkhalsomyndigheten.se/Folkhalsodata/api/[version]/[lang] #> #> $statistik.konj.se #> Api: statistik.konj.se #> The Swedish National Institute of Economic Research #> ('konj') #> Version(s) : v1 #> Language(s) : en, sv #> Limit(s) : 10 calls per 10 sec. #> 1000 values per call. #> Url template : #> http://statistik.konj.se/PXWeb/api/[version]/[lang] #> #> $prognos.konj.se #> Api: prognos.konj.se #> The Swedish national institute of economic research, forecast database #> ('konjforcast') #> Version(s) : v1 #> Language(s) : sv #> Limit(s) : 10 calls per 10 sec. #> 1000 values per call. #> Url template : #> http://prognos.konj.se/PXWeb/api/[version]/[lang] #> #> $statdb.luke.fi #> Api: statdb.luke.fi #> LUKE Natural Resources Institute Finland #> ('luke') #> Version(s) : v1 #> Language(s) : en, fi, sv #> Limit(s) : 10 calls per 10 sec. #> 10000 values per call. #> Url template : #> http://statdb.luke.fi/PXWeb/api/[version]/[lang] #> #> $vero2.stat.fi #> Api: vero2.stat.fi #> Verohallinto - Finnish Tax Administration #> ('vero') #> Version(s) : v1 #> Language(s) : en, fi, sv #> Limit(s) : 100 calls per 10 sec. #> 150000 values per call. #> Url template : #> http://vero2.stat.fi/PXWeb/api/[version]/[lang] #> #> $px.hagstofa.is #> Api: px.hagstofa.is #> Statistics Iceland #> ('statice') #> Version(s) : v1 #> Language(s) : en, is #> Limit(s) : 30 calls per 1 sec. #> 10000 values per call. #> Url template : #> http://px.hagstofa.is/px[lang]/api/[version]/[lang] #> #> $statistik.linkoping.se #> Api: statistik.linkoping.se #> Linköping municipality in Sweden #> ('linkoping') #> Version(s) : v1 #> Language(s) : sv #> Limit(s) : 1000 calls per 10 sec. #> 1000 values per call. #> Url template : #> http://statistik.linkoping.se/PXWeb/api/[version]/[lang] #> #> $pxwebb2017.vgregion.se #> Api: pxwebb2017.vgregion.se #> Vastra Gotaland Region in Sweden #> ('vgregion') #> Version(s) : v1 #> Language(s) : sv #> Limit(s) : 10 calls per 10 sec. #> 1000 values per call. #> Url template : #> http://pxwebb2017.vgregion.se/pxweb/api/[version]/[lang] #> #> $bank.stat.gl #> Api: bank.stat.gl #> Statbank Greenland #> ('greenland') #> Version(s) : v1 #> Language(s) : en, kl, da #> Limit(s) : 10000 calls per 10 sec. #> 1000000 values per call. #> Url template : #> https://bank.stat.gl/api/[version]/[lang] #> #> $px.rsv.is #> Api: px.rsv.is #> Icelandic Centre for Retail Studies #> ('rsv') #> Version(s) : v1 #> Language(s) : en, is #> Limit(s) : 30 calls per 1 sec. #> 10000 values per call. #> Url template : #> http://px.rsv.is/PXWeb/api/[version]/[lang] #> #> $statbank.hagstova.fo #> Api: statbank.hagstova.fo #> Statistics Faroe Islands #> ('hagstovan') #> Version(s) : v1 #> Language(s) : en, fo #> Limit(s) : 1000000 calls per 1000000 sec. #> 100000 values per call. #> Url template : #> https://statbank.hagstova.fo:443/api/[version]/[lang] #> #> $data.ssb.no #> Api: data.ssb.no #> Statistics Norway #> ('ssb') #> Version(s) : v0 #> Language(s) : en, no #> Limit(s) : 30 calls per 60 sec. #> 30000 values per call. #> Url template : #> http://data.ssb.no/api/[version]/[lang] #> #> $pxweb.asub.ax #> Api: pxweb.asub.ax #> Statistics Aland #> ('asub') #> Version(s) : v1 #> Language(s) : en, sv #> Limit(s) : 10 calls per 10 sec. #> 1000 values per call. #> Url template : #> https://pxweb.asub.ax/PXWeb/api/[version]/[lang]/ #> #> $makstat.stat.gov.mk #> Api: makstat.stat.gov.mk #> State Statistical Office of the Republic of Macedonia #> ('makstat') #> Version(s) : v1 #> Language(s) : en, mk #> Limit(s) : 30 calls per 1 sec. #> 10000 values per call. #> Url template : #> https://makstat.stat.gov.mk/PXWeb/api/[version]/[lang]/MakStat/ #> #> $data.stat.gov.lv #> Api: data.stat.gov.lv #> Latvia - official statistics #> ('csb_lv') #> Version(s) : v1 #> Language(s) : en, lv #> Limit(s) : 100 calls per 10 sec. #> 3800 values per call. #> Url template : #> https://data.stat.gov.lv/api/[version]/[lang]/ #> #> $statbank.statistica.md #> Api: statbank.statistica.md #> Statistics Moldova #> ('statistica_md') #> Version(s) : v1 #> Language(s) : en, ro #> Limit(s) : 10 calls per 10 sec. #> 1000 values per call. #> Url template : #> https://statbank.statistica.md/pxweb/api/[version]/[lang]/ #> #> $www.pxweb.bfs.admin.ch #> Api: www.pxweb.bfs.admin.ch #> Statistics Switzerland #> ('switzerland') #> Version(s) : v1 #> Language(s) : en, de, fr #> Limit(s) : 10 calls per 10 sec. #> 5000 values per call. #> Url template : #> https://www.pxweb.bfs.admin.ch/api/[version]/[lang] #> #> $`askdata.rks-gov.net` #> Api: askdata.rks-gov.net #> Statistics Kosovo #> ('askdata') #> Version(s) : v1 #> Language(s) : en #> Limit(s) : 10 calls per 10 sec. #> 1000 values per call. #> Url template : #> https://askdata.rks-gov.net/PXWeb/api/[version]/[lang]/ #> #> $trafi2.stat.fi #> Api: trafi2.stat.fi #> Finnish Transport Safety Agency #> ('trafi2') #> Version(s) : v1 #> Language(s) : en, sv, fi #> Limit(s) : 100 calls per 10 sec. #> 110000 values per call. #> Url template : #> https://trafi2.stat.fi/PXWeb/api/[version]/[lang]/ #> #> $w3.unece.org #> Api: w3.unece.org #> United Nations Economic Commission for Europe #> ('unece') #> Version(s) : v1 #> Language(s) : en #> Limit(s) : 10 calls per 10 sec. #> 100000 values per call. #> Url template : #> https://w3.unece.org/PXWeb2015/api/[version]/[lang]/ #> #> $`www.grande-region.lu` #> Api: www.grande-region.lu #> Portail statistique de la Grande Région #> ('grande-region') #> Version(s) : v1 #> Language(s) : fr, de #> Limit(s) : 10 calls per 10 sec. #> 1000 values per call. #> Url template : #> https://www.grande-region.lu/pxweb/api/[version]/[lang] #> #> $visitfinland.stat.fi #> Api: visitfinland.stat.fi #> Visit Finland (Rudolf service) #> Version(s) : v1 #> Language(s) : fi #> Limit(s) : 20 calls per 10 sec. #> 110000 values per call. #> Url template : #> http://visitfinland.stat.fi/PXWeb/api/[version]/[lang]/VisitFinland #> #> $stat.hel.fi #> Api: stat.hel.fi #> Helsingin seudun aluesarjat -tilastotietokanta #> Version(s) : v1 #> Language(s) : fi #> Limit(s) : 1000 calls per 10 sec. #> 100000 values per call. #> Url template : #> https://stat.hel.fi/api/[version]/[lang] #> #> $andmed.stat.ee #> Api: andmed.stat.ee #> Estonia - official statistics #> ('stat_ee') #> Version(s) : v1 #> Language(s) : en, et #> Limit(s) : 1000 calls per 10 sec. #> 1000000 values per call. #> Url template : #> https://andmed.stat.ee/api/[version]/[lang]/stat #> #> $pxweb.nordicstatistics.org #> Api: pxweb.nordicstatistics.org #> Nordic Statistics Database #> Version(s) : v1 #> Language(s) : en #> Limit(s) : 10 calls per 10 sec. #> 1000 values per call. #> Url template : #> https://pxweb.nordicstatistics.org/api/[version]/[lang]/ #> #> $pxweb.stat.si #> Api: pxweb.stat.si #> SiStat Database #> Version(s) : v1 #> Language(s) : sl #> Limit(s) : 100 calls per 10 sec. #> 10000000 values per call. #> Url template : #> https://pxweb.stat.si/SiStatData/api/[version]/[lang]/Data #> #> attr(,\"class\") #> [1] \"pxweb_api_catalogue\" \"list\" ## The examples below can only be run in interactive mode ## x <- pxweb_interactive() ## x <- pxweb_interactive(x = \"api.scb.se\") ## x <- pxweb_interactive(x = \"https://api.scb.se/OV0104/v1/doris/en/ssd/BE/BE0101/\") ## x <- pxweb_interactive(x = \"https://api.scb.se/OV0104/v1/doris/en/ssd/BE/BE0101/BE0101A/\")"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_interactive_input.html","id":null,"dir":"Reference","previous_headings":"","what":"Get input from user — pxweb_interactive_input","title":"Get input from user — pxweb_interactive_input","text":"Get input user","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_interactive_input.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get input from user — pxweb_interactive_input","text":"","code":"pxweb_interactive_input(pxe, test_input = NULL)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_interactive_input.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get input from user — pxweb_interactive_input","text":"pxe pxweb_explorer object get user input . test_input supplying test input (testing ).","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_levels.html","id":null,"dir":"Reference","previous_headings":"","what":"Construct a pxweb_levels object. — pxweb_levels","title":"Construct a pxweb_levels object. — pxweb_levels","text":"object contain levels given PXWEB api position.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_levels.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Construct a pxweb_levels object. — pxweb_levels","text":"","code":"pxweb_levels(x)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_levels.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Construct a pxweb_levels object. — pxweb_levels","text":"x list returned PXWEB API convert pxweb_levels object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_levels.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Construct a pxweb_levels object. — pxweb_levels","text":"pxweb_levels object","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_metadata.html","id":null,"dir":"Reference","previous_headings":"","what":"Construct a pxweb_metadata object. — pxweb_metadata","title":"Construct a pxweb_metadata object. — pxweb_metadata","text":"object contain metadata given PXWEB table.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_metadata.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Construct a pxweb_metadata object. — pxweb_metadata","text":"","code":"pxweb_metadata(x)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_metadata.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Construct a pxweb_metadata object. — pxweb_metadata","text":"x list returned PXWEB API convert pxweb_metadata object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_metadata.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Construct a pxweb_metadata object. — pxweb_metadata","text":"pxweb_metadata object","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_metadata_add_null_values.html","id":null,"dir":"Reference","previous_headings":"","what":"Add values to NULL value variables in PXWEB metadata objects — pxweb_metadata_add_null_values","title":"Add values to NULL value variables in PXWEB metadata objects — pxweb_metadata_add_null_values","text":"Add values NULL value variables PXWEB metadata objects","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_metadata_add_null_values.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add values to NULL value variables in PXWEB metadata objects — pxweb_metadata_add_null_values","text":"","code":"pxweb_metadata_add_null_values(x, px)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_metadata_add_null_values.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add values to NULL value variables in PXWEB metadata objects — pxweb_metadata_add_null_values","text":"x object check pxweb_metadata object add values. px pxweb object","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_metadata_add_null_values.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Add values to NULL value variables in PXWEB metadata objects — pxweb_metadata_add_null_values","text":"metadata objects may NULL values. cases values downloaded added metadata object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_metadata_dim.html","id":null,"dir":"Reference","previous_headings":"","what":"Compue the dimension of a metadata object — pxweb_metadata_dim","title":"Compue the dimension of a metadata object — pxweb_metadata_dim","text":"Compue dimension metadata object","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_metadata_dim.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compue the dimension of a metadata object — pxweb_metadata_dim","text":"","code":"pxweb_metadata_dim(pxmd)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_metadata_dim.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compue the dimension of a metadata object — pxweb_metadata_dim","text":"pxmd pxweb_metadata object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_metadata_elimination.html","id":null,"dir":"Reference","previous_headings":"","what":"Get boolean vector — pxweb_metadata_elimination","title":"Get boolean vector — pxweb_metadata_elimination","text":"Get boolean vector","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_metadata_elimination.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get boolean vector — pxweb_metadata_elimination","text":"","code":"pxweb_metadata_elimination(pxmd)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_metadata_elimination.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get boolean vector — pxweb_metadata_elimination","text":"pxmd pxweb_metadata object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_metadata_elimination.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get boolean vector — pxweb_metadata_elimination","text":"pxweb_metadata eliminations named boolean vector.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_metadata_time.html","id":null,"dir":"Reference","previous_headings":"","what":"Get boolean vector — pxweb_metadata_time","title":"Get boolean vector — pxweb_metadata_time","text":"Get boolean vector","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_metadata_time.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get boolean vector — pxweb_metadata_time","text":"","code":"pxweb_metadata_time(pxmd)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_metadata_time.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get boolean vector — pxweb_metadata_time","text":"pxmd pxweb_metadata object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_metadata_time.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get boolean vector — pxweb_metadata_time","text":"pxweb_metadata eliminations named boolean vector.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_parse_response.html","id":null,"dir":"Reference","previous_headings":"","what":"Parse the response from a PXWEB API (advanced) — pxweb_parse_response","title":"Parse the response from a PXWEB API (advanced) — pxweb_parse_response","text":"function parses response call made PXWEB API using httr R package. way possible parse content calls made outside pxweb R package.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_parse_response.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Parse the response from a PXWEB API (advanced) — pxweb_parse_response","text":"","code":"pxweb_parse_response(x) is_pxweb_response(x)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_parse_response.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Parse the response from a PXWEB API (advanced) — pxweb_parse_response","text":"x httr response object PXWEB call.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_query.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a PXWEB query — pxweb_query","title":"Create a PXWEB query — pxweb_query","text":"Creates pxweb query object either list named values, json query file json query string. See examples .","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_query.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a PXWEB query — pxweb_query","text":"","code":"pxweb_query(x) # S3 method for character pxweb_query(x) # S3 method for json pxweb_query(x) # S3 method for pxweb_query pxweb_query(x) # S3 method for list pxweb_query(x) # S3 method for response pxweb_query(x) # S3 method for pxweb_explorer pxweb_query(x)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_query.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a PXWEB query — pxweb_query","text":"x object cast pxweb_query object.","code":""},{"path":[]},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_query.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a PXWEB query — pxweb_query","text":"","code":"dims <- list( Alue = c(\"*\"), \"Asuntokunnan koko\" = c(\"*\"), Talotyyppi = c(\"S\"), Vuosi = c(\"*\") ) pxq1 <- pxweb_query(dims) json_query <- file.path( system.file(package = \"pxweb\"), \"extdata\", \"examples\", \"json_query_example.json\" ) pxq2 <- pxweb_query(json_query)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_query_as_json.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert a pxweb_query object to a json string — pxweb_query_as_json","title":"Convert a pxweb_query object to a json string — pxweb_query_as_json","text":"Convert pxweb_query object json string","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_query_as_json.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert a pxweb_query object to a json string — pxweb_query_as_json","text":"","code":"pxweb_query_as_json(pxq, ...)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_query_as_json.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert a pxweb_query object to a json string — pxweb_query_as_json","text":"pxq pxweb_query object. ... argument jsonlite::toJSON().","code":""},{"path":[]},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_query_as_json.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert a pxweb_query object to a json string — pxweb_query_as_json","text":"","code":"json_query <- file.path( system.file(package = \"pxweb\"), \"extdata\", \"examples\", \"json_query_example.json\" ) pxq <- pxweb_query(json_query) json <- pxweb_query_as_json(pxq, pretty = TRUE)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_query_as_rcode.html","id":null,"dir":"Reference","previous_headings":"","what":"Print a pxweb_query object as R code — pxweb_query_as_rcode","title":"Print a pxweb_query object as R code — pxweb_query_as_rcode","text":"Print pxweb_query object R code","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_query_as_rcode.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print a pxweb_query object as R code — pxweb_query_as_rcode","text":"","code":"pxweb_query_as_rcode(pxq)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_query_as_rcode.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print a pxweb_query object as R code — pxweb_query_as_rcode","text":"pxq pxweb_query object.","code":""},{"path":[]},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_query_dim.html","id":null,"dir":"Reference","previous_headings":"","what":"Compue the dimension of the query — pxweb_query_dim","title":"Compue the dimension of the query — pxweb_query_dim","text":"Compue dimension query","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_query_dim.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compue the dimension of the query — pxweb_query_dim","text":"","code":"pxweb_query_dim(pxq)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_query_dim.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compue the dimension of the query — pxweb_query_dim","text":"pxq pxweb_query object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_query_dim_splittable.html","id":null,"dir":"Reference","previous_headings":"","what":"Get vector indicating splittable variables — pxweb_query_dim_splittable","title":"Get vector indicating splittable variables — pxweb_query_dim_splittable","text":"Get vector indicating splittable variables","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_query_dim_splittable.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get vector indicating splittable variables — pxweb_query_dim_splittable","text":"","code":"pxweb_query_dim_splittable(pxq, pxmd)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_query_dim_splittable.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get vector indicating splittable variables — pxweb_query_dim_splittable","text":"pxq pxweb_query object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_query_dim_splittable.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get vector indicating splittable variables — pxweb_query_dim_splittable","text":"named logical vector.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_query_dim_splittable.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get vector indicating splittable variables — pxweb_query_dim_splittable","text":"Splitable variables variables can split. Content variables split, variables filter == \"top\". Currently, can sure time variables eliminated variables can split. Hopefully next API makes clear.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_query_filter.html","id":null,"dir":"Reference","previous_headings":"","what":"Get query values — pxweb_query_filter","title":"Get query values — pxweb_query_filter","text":"Get query values","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_query_filter.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get query values — pxweb_query_filter","text":"","code":"pxweb_query_filter(pxq)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_query_filter.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get query values — pxweb_query_filter","text":"pxq pxweb_query object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_query_filter.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get query values — pxweb_query_filter","text":"query variable selection filters named character vector.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_query_values.html","id":null,"dir":"Reference","previous_headings":"","what":"Get query filter — pxweb_query_values","title":"Get query filter — pxweb_query_values","text":"Get query filter","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_query_values.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get query filter — pxweb_query_values","text":"","code":"pxweb_query_values(pxq)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_query_values.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get query filter — pxweb_query_values","text":"pxq pxweb_query object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_query_values.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get query filter — pxweb_query_values","text":"query variable selection values named list character vectors.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_split_query.html","id":null,"dir":"Reference","previous_headings":"","what":"Split query in optimal sub-queries — pxweb_split_query","title":"Split query in optimal sub-queries — pxweb_split_query","text":"Split query optimal sub-queries","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_split_query.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Split query in optimal sub-queries — pxweb_split_query","text":"","code":"pxweb_split_query(pxq, px, pxmd)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_split_query.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Split query in optimal sub-queries — pxweb_split_query","text":"pxq pxweb_query object. px pxweb object. pxmd pxweb_metadata object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_split_query.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Split query in optimal sub-queries — pxweb_split_query","text":"list pxweb_query objects.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_split_query.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Split query in optimal sub-queries — pxweb_split_query","text":"Computes (brute-force) optimal split query match api maximum value limit. also take account time variables content variables split. Also variables filter \"top\" split, since top filter supply individual levels, just number. can probably improved .","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_tempdir.html","id":null,"dir":"Reference","previous_headings":"","what":"Setup temorary directory for the pxweb — pxweb_tempdir","title":"Setup temorary directory for the pxweb — pxweb_tempdir","text":"Setup temorary directory pxweb","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_tempdir.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Setup temorary directory for the pxweb — pxweb_tempdir","text":"","code":"pxweb_tempdir(to = \"apis\")"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_tempdir.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Setup temorary directory for the pxweb — pxweb_tempdir","text":"part temp folder (apis logs)","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_test_api.html","id":null,"dir":"Reference","previous_headings":"","what":"Test a full or a part of a PXWEB api. — pxweb_test_api","title":"Test a full or a part of a PXWEB api. — pxweb_test_api","text":"function can used test whole pxweb api using api base url. using branch tree api tested branch.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_test_api.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test a full or a part of a PXWEB api. — pxweb_test_api","text":"","code":"pxweb_test_api( url, test_type = \"first\", n = 1, verbose = TRUE, time_limit = Inf )"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_test_api.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test a full or a part of a PXWEB api. — pxweb_test_api","text":"url base url pxweb api (branch metadata tree) test_type type test done. first observation table. random sample size n. Download full tables. touch api downloading first table metadata. minimal testing API. n sample size test_type sample. verbose function print information. time_limit Time limit second API allowed tested.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_test_api.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test a full or a part of a PXWEB api. — pxweb_test_api","text":"Function returns data.frame information node Two variables added: checked : node checked error : Whether errors encountered call download_error : Whether errors encountered download","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_test_api.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Test a full or a part of a PXWEB api. — pxweb_test_api","text":"","code":"if (FALSE) { url <- \"https://bank.stat.gl/api/v1/en/Greenland/BE/BE01\" res <- pxweb_test_api(url) res <- pxweb_test_api(url, test_type = \"touch\") }"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_test_create_api_paths.html","id":null,"dir":"Reference","previous_headings":"","what":"Create all paths from a list of pxweb_api_catalogue entries — pxweb_test_create_api_paths","title":"Create all paths from a list of pxweb_api_catalogue entries — pxweb_test_create_api_paths","text":"Create paths list pxweb_api_catalogue entries","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_test_create_api_paths.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create all paths from a list of pxweb_api_catalogue entries — pxweb_test_create_api_paths","text":"","code":"pxweb_test_create_api_paths(apis)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_test_create_api_paths.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create all paths from a list of pxweb_api_catalogue entries — pxweb_test_create_api_paths","text":"apis list pxweb_api_catalogue_entry elements","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_test_time_limit.html","id":null,"dir":"Reference","previous_headings":"","what":"Test time limit object — pxweb_test_time_limit","title":"Test time limit object — pxweb_test_time_limit","text":"Test time limit object","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_test_time_limit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test time limit object — pxweb_test_time_limit","text":"","code":"pxweb_test_time_limit(time_limit) is_test_time_limit_reached(x)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_test_time_limit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test time limit object — pxweb_test_time_limit","text":"time_limit number seconds API tested.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_test_time_limit.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Test time limit object — pxweb_test_time_limit","text":"Used limit testing API:s.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_validate_query_with_metadata.html","id":null,"dir":"Reference","previous_headings":"","what":"Validate a pxweb_query with a pxweb_metadata object — pxweb_validate_query_with_metadata","title":"Validate a pxweb_query with a pxweb_metadata object — pxweb_validate_query_with_metadata","text":"Validate pxweb_query pxweb_metadata object","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_validate_query_with_metadata.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Validate a pxweb_query with a pxweb_metadata object — pxweb_validate_query_with_metadata","text":"","code":"pxweb_validate_query_with_metadata(pxq, pxmd)"},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_validate_query_with_metadata.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Validate a pxweb_query with a pxweb_metadata object — pxweb_validate_query_with_metadata","text":"pxq pxweb_query object. pxmd pxweb_metadata object.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_validate_query_with_metadata.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Validate a pxweb_query with a pxweb_metadata object — pxweb_validate_query_with_metadata","text":"Validate query metadata object asses query can used query table.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/pxweb_validate_query_with_metadata.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Validate a pxweb_query with a pxweb_metadata object — pxweb_validate_query_with_metadata","text":"","code":"if (FALSE) { url <- \"https://api.scb.se/OV0104/v1/doris/sv/ssd/BE/BE0101/BE0101A/BefolkningNy\" json_query <- file.path( system.file(package = \"pxweb\"), \"extdata\", \"examples\", \"json_query_example.json\" ) pxq <- pxweb_query(json_query) pxweb_validate_query_with_metadata(pxq, pxweb_get(url)) }"},{"path":"https://ropengov.github.io/pxweb/reference/save_pxweb.html","id":null,"dir":"Reference","previous_headings":"","what":"Save and load pxweb objects from R temp folder — save_pxweb","title":"Save and load pxweb objects from R temp folder — save_pxweb","text":"Save load pxweb objects R temp folder","code":""},{"path":"https://ropengov.github.io/pxweb/reference/save_pxweb.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Save and load pxweb objects from R temp folder — save_pxweb","text":"","code":"save_pxweb(obj) load_pxweb(obj) load_pxweb_calls(obj) load_pxweb_config(obj) load_pxweb_api_subpath(obj)"},{"path":"https://ropengov.github.io/pxweb/reference/save_pxweb.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Save and load pxweb objects from R temp folder — save_pxweb","text":"obj pxweb object","code":""},{"path":"https://ropengov.github.io/pxweb/reference/split_dimensions_left_right.html","id":null,"dir":"Reference","previous_headings":"","what":"Split variables into chunks — split_dimensions_left_right","title":"Split variables into chunks — split_dimensions_left_right","text":"Split variables chunks","code":""},{"path":"https://ropengov.github.io/pxweb/reference/split_dimensions_left_right.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Split variables into chunks — split_dimensions_left_right","text":"","code":"split_dimensions_left_right(x, bool, max_size)"},{"path":"https://ropengov.github.io/pxweb/reference/split_dimensions_left_right.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Split variables into chunks — split_dimensions_left_right","text":"pxweb_split_dimensions","code":""},{"path":"https://ropengov.github.io/pxweb/reference/split_dimensions_left_right.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Split variables into chunks — split_dimensions_left_right","text":"Splitable variables variables can split. Content variables split, variables filter == \"top\"","code":""},{"path":"https://ropengov.github.io/pxweb/reference/str_pad.html","id":null,"dir":"Reference","previous_headings":"","what":"Pad a string to a fixed size — str_pad","title":"Pad a string to a fixed size — str_pad","text":"Pad string fixed size","code":""},{"path":"https://ropengov.github.io/pxweb/reference/str_pad.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Pad a string to a fixed size — str_pad","text":"","code":"str_pad(txt, n = 5, pad = \" \", type = \"left\")"},{"path":"https://ropengov.github.io/pxweb/reference/str_pad.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Pad a string to a fixed size — str_pad","text":"txt character vector pad n final char width pad pad symbol type pad 'left' 'right'.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/str_trim.html","id":null,"dir":"Reference","previous_headings":"","what":"Taken from trimws for reasons of compatibility with previous R versios. — str_trim","title":"Taken from trimws for reasons of compatibility with previous R versios. — str_trim","text":"Taken trimws reasons compatibility previous R versios.","code":""},{"path":"https://ropengov.github.io/pxweb/reference/str_trim.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Taken from trimws for reasons of compatibility with previous R versios. — str_trim","text":"","code":"str_trim(x, which = c(\"both\", \"left\", \"right\"))"},{"path":"https://ropengov.github.io/pxweb/reference/str_trim.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Taken from trimws for reasons of compatibility with previous R versios. — str_trim","text":"x string trim. trim string.","code":""},{"path":[]},{"path":"https://ropengov.github.io/pxweb/news/index.html","id":"version-0162","dir":"Changelog","previous_headings":"","what":"Version 0.16.2","title":"Version 0.16.2","text":"CRAN release: 2022-10-31 Return better error messages using .data.frame() pxweb metadata objects. Fix Statistics Swedens new https API.","code":""},{"path":"https://ropengov.github.io/pxweb/news/index.html","id":"version-0161","dir":"Changelog","previous_headings":"","what":"Version 0.16.1","title":"Version 0.16.1","text":"CRAN release: 2022-08-24 Remove tests failing CRAN.","code":""},{"path":"https://ropengov.github.io/pxweb/news/index.html","id":"version-0160","dir":"Changelog","previous_headings":"","what":"Version 0.16.0","title":"Version 0.16.0","text":"exposed pxweb_parse_response() is_pxweb_response() package API advanced users want make httr calls PXWEB API.","code":""},{"path":"https://ropengov.github.io/pxweb/news/index.html","id":"version-0150","dir":"Changelog","previous_headings":"","what":"Version 0.15.0","title":"Version 0.15.0","text":"Added possibility download px sdmx response formats files Added StatSI API Added codecov code coverage stats Fixed minor API configs","code":""},{"path":"https://ropengov.github.io/pxweb/news/index.html","id":"version-0140","dir":"Changelog","previous_headings":"","what":"Version 0.14.0","title":"Version 0.14.0","text":"Added feature print pxweb_query objects R code","code":""},{"path":"https://ropengov.github.io/pxweb/news/index.html","id":"version-0104","dir":"Changelog","previous_headings":"","what":"Version 0.10.4","title":"Version 0.10.4","text":"CRAN release: 2021-02-24 Bug fixes informative error messages","code":""},{"path":"https://ropengov.github.io/pxweb/news/index.html","id":"version-092","dir":"Changelog","previous_headings":"","what":"Version 0.9.2","title":"Version 0.9.2","text":"Added API link Visit Finland (Rudolf)","code":""},{"path":"https://ropengov.github.io/pxweb/news/index.html","id":"version-08","dir":"Changelog","previous_headings":"","what":"Version 0.8","title":"Version 0.8","text":"Package rewritten order enhance efficiency design","code":""},{"path":"https://ropengov.github.io/pxweb/news/index.html","id":"version-0637","dir":"Changelog","previous_headings":"","what":"Version 0.6.37","title":"Version 0.6.37","text":"CRAN release: 2018-06-12","code":""},{"path":"https://ropengov.github.io/pxweb/news/index.html","id":"new-features-0-6-37","dir":"Changelog","previous_headings":"","what":"New features","title":"Version 0.6.37","text":"Added data.ssb.API list inst/extdata/api.json Added NEWS.md file","code":""}]