From 5a4a54515d202b7bf4e9b360ec4eaedc5df78d39 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 20 Dec 2023 08:56:45 +0000 Subject: [PATCH] Built site for eurostat: 4.0.0@5d8ece6 --- 404.html | 7 +- BS5/rogtemplate.css | 29 +- LICENSE-text.html | 5 +- .../articles/dimlst_vs_allconceptschemes.html | 8 + articles/blogposts.html | 7 +- articles/cheatsheet.html | 7 +- articles/dimlst_vs_allconceptschemes.html | 485 +++ articles/eurostat_tutorial.html | 1602 ++++++++-- articles/index.html | 7 +- articles/mapping.html | 369 ++- .../mapping_files/figure-html/choro1-1.png | Bin 0 -> 983103 bytes .../mapping_files/figure-html/choro2-1.png | Bin 0 -> 1279392 bytes .../figure-html/unnamed-chunk-11-1.png | Bin 346129 -> 0 bytes .../figure-html/unnamed-chunk-5-1.png | Bin 228683 -> 0 bytes articles/maps.html | 443 +-- .../Proj4Leaflet-1.0.1/proj4leaflet.js | 272 ++ articles/maps_files/figure-html/map1ex-1.png | Bin 133239 -> 951890 bytes articles/maps_files/figure-html/maps1-2-1.png | Bin 0 -> 951890 bytes articles/maps_files/figure-html/maps2-1.png | Bin 219079 -> 708676 bytes articles/maps_files/figure-html/maps4-1.png | Bin 408719 -> 1002362 bytes .../htmlwidgets-1.6.4/htmlwidgets.js | 901 ++++++ .../leaflet-1.3.1/images/layers-2x.png | Bin 0 -> 1259 bytes .../leaflet-1.3.1/images/layers.png | Bin 0 -> 696 bytes .../leaflet-1.3.1/images/marker-icon-2x.png | Bin 0 -> 2464 bytes .../leaflet-1.3.1/images/marker-icon.png | Bin 0 -> 1466 bytes .../leaflet-1.3.1/images/marker-shadow.png | Bin 0 -> 618 bytes articles/maps_files/leaflet-1.3.1/leaflet.css | 636 ++++ articles/maps_files/leaflet-1.3.1/leaflet.js | 5 + .../leaflet-binding-2.2.1/leaflet.js | 2789 +++++++++++++++++ .../leaflet-providers_2.0.0.js | 1178 +++++++ .../leaflet-providers-plugin.js | 3 + .../leafletfix-1.0.0/leafletfix.css | 36 + articles/maps_files/proj4-2.6.2/proj4.min.js | 1 + .../rstudio_leaflet-1.3.1/images/1px.png | Bin 0 -> 68 bytes .../rstudio_leaflet-1.3.1/rstudio_leaflet.css | 41 + articles/publications.html | 7 +- articles/vignette.html | 9 +- authors.html | 18 +- ...F4xlVMF-BfR8bXMIhJHg45mwgGEFl0_3vqPQA.woff | Bin 47300 -> 47288 bytes .../font.css | 0 deps/bootstrap-5.2.2/bootstrap.bundle.min.js | 7 - .../bootstrap.bundle.min.js.map | 1 - deps/bootstrap-5.2.2/bootstrap.min.css | 6 - deps/bootstrap-5.3.1/bootstrap.bundle.min.js | 7 + .../bootstrap.bundle.min.js.map | 1 + deps/bootstrap-5.3.1/bootstrap.min.css | 5 + deps/data-deps.txt | 6 +- index.html | 84 +- news/index.html | 75 +- pkgdown.yml | 3 +- reference/add_nuts_level.html | 5 +- reference/check_access_to_data.html | 5 +- reference/clean_eurostat_cache.html | 8 +- reference/convert_time_col.html | 12 +- reference/convert_time_col2.html | 99 - reference/cut_to_classes.html | 11 +- reference/dic_order.html | 8 +- reference/eu_countries.html | 11 +- reference/eurostat-defunct.html | 103 + reference/eurostat-package.html | 340 +- reference/eurostat_geodata_60_2016-1.png | Bin 0 -> 293264 bytes reference/eurostat_geodata_60_2016.html | 102 +- reference/eurotime2date.html | 156 +- reference/eurotime2date2.html | 214 -- reference/eurotime2num.html | 63 +- reference/eurotime2num2.html | 152 - reference/fixity_checksum.html | 140 + reference/get_bibentry.html | 45 +- reference/get_eurostat.html | 351 ++- reference/get_eurostat_dic.html | 65 +- reference/get_eurostat_folder.html | 153 + reference/get_eurostat_geospatial.html | 243 +- reference/get_eurostat_interactive.html | 118 + reference/get_eurostat_json.html | 300 +- reference/get_eurostat_raw.html | 182 +- reference/get_eurostat_raw2.html | 171 - reference/get_eurostat_toc.html | 180 +- reference/harmonize_country_code.html | 11 +- reference/harmonize_geo_code.html | 5 +- reference/index.html | 62 +- reference/label_eurostat.html | 62 +- reference/label_eurostat2.html | 213 -- reference/list_eurostat_cache_items.html | 106 + reference/recode_to_nuts_2013.html | 5 +- reference/recode_to_nuts_2016.html | 5 +- reference/reexports.html | 83 +- reference/search_eurostat.html | 190 +- reference/set_eurostat_cache_dir.html | 7 +- reference/set_eurostat_toc.html | 17 +- reference/tgs00026.html | 6 +- reference/tidy_eurostat.html | 118 +- reference/tidy_eurostat2.html | 160 - reference/toc_count_children.html | 104 + reference/toc_count_whitespace.html | 139 + reference/toc_determine_hierarchy.html | 134 + reference/toc_list_children.html | 104 + search.json | 2 +- sitemap.xml | 36 +- 98 files changed, 11444 insertions(+), 2422 deletions(-) create mode 100644 articles/articles/dimlst_vs_allconceptschemes.html create mode 100644 articles/dimlst_vs_allconceptschemes.html create mode 100644 articles/mapping_files/figure-html/choro1-1.png create mode 100644 articles/mapping_files/figure-html/choro2-1.png delete mode 100644 articles/mapping_files/figure-html/unnamed-chunk-11-1.png delete mode 100644 articles/mapping_files/figure-html/unnamed-chunk-5-1.png create mode 100644 articles/maps_files/Proj4Leaflet-1.0.1/proj4leaflet.js create mode 100644 articles/maps_files/figure-html/maps1-2-1.png create mode 100644 articles/maps_files/htmlwidgets-1.6.4/htmlwidgets.js create mode 100644 articles/maps_files/leaflet-1.3.1/images/layers-2x.png create mode 100644 articles/maps_files/leaflet-1.3.1/images/layers.png create mode 100644 articles/maps_files/leaflet-1.3.1/images/marker-icon-2x.png create mode 100644 articles/maps_files/leaflet-1.3.1/images/marker-icon.png create mode 100644 articles/maps_files/leaflet-1.3.1/images/marker-shadow.png create mode 100644 articles/maps_files/leaflet-1.3.1/leaflet.css create mode 100644 articles/maps_files/leaflet-1.3.1/leaflet.js create mode 100644 articles/maps_files/leaflet-binding-2.2.1/leaflet.js create mode 100644 articles/maps_files/leaflet-providers-2.0.0/leaflet-providers_2.0.0.js create mode 100644 articles/maps_files/leaflet-providers-plugin-2.2.1/leaflet-providers-plugin.js create mode 100644 articles/maps_files/leafletfix-1.0.0/leafletfix.css create mode 100644 articles/maps_files/proj4-2.6.2/proj4.min.js create mode 100644 articles/maps_files/rstudio_leaflet-1.3.1/images/1px.png create mode 100644 articles/maps_files/rstudio_leaflet-1.3.1/rstudio_leaflet.css rename deps/{Roboto_Mono-0.4.7 => Roboto_Mono-0.4.8}/L0xuDF4xlVMF-BfR8bXMIhJHg45mwgGEFl0_3vqPQA.woff (97%) rename deps/{Roboto_Mono-0.4.7 => Roboto_Mono-0.4.8}/font.css (100%) delete mode 100644 deps/bootstrap-5.2.2/bootstrap.bundle.min.js delete mode 100644 deps/bootstrap-5.2.2/bootstrap.bundle.min.js.map delete mode 100644 deps/bootstrap-5.2.2/bootstrap.min.css create mode 100644 deps/bootstrap-5.3.1/bootstrap.bundle.min.js create mode 100644 deps/bootstrap-5.3.1/bootstrap.bundle.min.js.map create mode 100644 deps/bootstrap-5.3.1/bootstrap.min.css delete mode 100644 reference/convert_time_col2.html create mode 100644 reference/eurostat-defunct.html create mode 100644 reference/eurostat_geodata_60_2016-1.png delete mode 100644 reference/eurotime2date2.html delete mode 100644 reference/eurotime2num2.html create mode 100644 reference/fixity_checksum.html create mode 100644 reference/get_eurostat_folder.html create mode 100644 reference/get_eurostat_interactive.html delete mode 100644 reference/get_eurostat_raw2.html delete mode 100644 reference/label_eurostat2.html create mode 100644 reference/list_eurostat_cache_items.html delete mode 100644 reference/tidy_eurostat2.html create mode 100644 reference/toc_count_children.html create mode 100644 reference/toc_count_whitespace.html create mode 100644 reference/toc_determine_hierarchy.html create mode 100644 reference/toc_list_children.html diff --git a/404.html b/404.html index 84b383a6..38fcd964 100644 --- a/404.html +++ b/404.html @@ -13,8 +13,8 @@ - - + + @@ -38,7 +38,7 @@ eurostat - 3.8.3 + 4.0.0 + + + + + +
+ + + + +
+
+ + + +
+

Introduction +

+

As Eurostat is in the process of getting rid of Bulk Download +facilities, there are inevitably some changes that affect the +eurostat package as well. One of those is the removal of +old .dic objects that have been used in translating +Eurostat variable codes into cleartext labels in English, French or +German.

+

All things must pass. We have removed the old +label_eurostat_vars() function that simply downloaded +dimlst.dic, sort of ‘master file’ of all available codes +and their cleartext labels, and used that to label all Eurostat +datasets. Now labeling is done by downloading a Concept Scheme file for +each individual dataset and using that information to give labels to the +dataset in the desired language.

+
+
+

Comparison of old and new +

+

An example of the old English version dimlst.dic file (downloaded +2023-12-18 from here), +10 first rows:

+
ACCIDENT    Accident
+ACCOMMOD    Mode of accommodation 
+ACCOMSIZE   Size of accommodation by number of bedplaces
+ACCOMUNIT   Accommodation unit
+ACL00   Classification of activities for time use
+ACTIVITY    Type of activity
+ADMINISTR   Administration indicator
+AFFORD  Affordability
+AGE Age class
+AGECHILD    Age of the child
+AGEDEF  Age definition
+

An example of the new Concept Scheme file for dataset +NAMA_10_GDP (see instructions for downloading here):

+
<s:Concept id="freq" urn="urn:sdmx:org.sdmx.infomodel.conceptscheme.Concept=ESTAT:NAMA_10_GDP(45.0).freq">
+  <c:Name xml:lang="en">
+    Time frequency
+  </c:Name>
+  <c:Name xml:lang="de">
+    Zeitliche Frequenz
+  </c:Name>
+  <c:Name xml:lang="fr">
+    Fréquence (relative au temps)
+  </c:Name>
+  <s:CoreRepresentation>
+    <s:Enumeration>
+      <Ref agencyID="ESTAT" class="Codelist" id="FREQ" package="codelist" version="3.2"/>
+    </s:Enumeration>
+  </s:CoreRepresentation>
+</s:Concept>
+<s:Concept id="unit" urn="urn:sdmx:org.sdmx.infomodel.conceptscheme.Concept=ESTAT:NAMA_10_GDP(45.0).unit">
+  <c:Name xml:lang="en">
+    Unit of measure
+  </c:Name>
+  <c:Name xml:lang="de">
+    Maßeinheit
+  </c:Name>
+  <c:Name xml:lang="fr">
+    Unité de mesure
+  </c:Name>
+  <s:CoreRepresentation>
+    <s:Enumeration>
+      <Ref agencyID="ESTAT" class="Codelist" id="UNIT" package="codelist" version="22.0"/>
+    </s:Enumeration>
+  </s:CoreRepresentation>
+</s:Concept>
+

The apparent benefit of XML presentation is that all language +versions can be found in the same file. This makes the files a bit +larger than old .tsv files but for individual datasets the size is still +manageable.

+

Concept id’s or Ref id’s (“unit”, “UNIT”) can be used to look up +further classifications in Codelists. In the old .dic metaphor all +definition files were “dictionaries” where dimlst.dic was a +special case, a dictionary of dictionaries, whereas in the new metaphor +there is more of a hierarchy of definitions. For example in the case of +units all available English labels can be downloaded in JSON-stat and +TSV formats:

+

https://ec.europa.eu/eurostat/api/dissemination/sdmx/2.1/codelist/ESTAT/UNIT?format=TSV&lang=en +https://ec.europa.eu/eurostat/api/dissemination/sdmx/2.1/codelist/ESTAT/UNIT?format=JSON&lang=en

+

However, the new TSV files and the old .dic files are virtually +identical:

+
# unit.dic
+TOTAL   Total
+NR  Number
+NR_HAB  Number per inhabitant
+THS Thousand
+MIO Million
+BN  Billion
+CT  Euro cent
+EUR Euro
+THS_EUR Thousand euro
+MIO_EUR Million euro
+BN_EUR  Billion euro
+[...]
+[711 lines]
+
+# ESTAT_UNIT_22.0_EN.tsv
+TOTAL   Total
+NR  Number
+NR_HAB  Number per inhabitant
+THS Thousand
+MIO Million
+BN  Billion
+CT  Euro cent
+EUR Euro
+THS_EUR Thousand euro
+MIO_EUR Million euro
+BN_EUR  Billion euro
+[...]
+[711 lines]
+
+
+

Replicating old style dimlst.dic with new xml files +

+

In some cases it may have been useful to access all labels for all +datasets from a single file. In theory this is possible with Concept +Schemes as well, by downlaoding all concept schemes at once in the form +of “ALL_CONCEPTSCHEMES.xml” file, at 29.7 Mb large. We can parse the xml +file to create a list that is similar to the old dimlst.dic +object to see if there are any functional differences.

+
+library(xml2)
+# file downloaded from https://ec.europa.eu/eurostat/api/dissemination/sdmx/2.1/conceptscheme/ESTAT/?compressed=true and unpacked
+xml_object <- xml2::read_xml("ALL_CONCEPTSCHEMES.xml")
+number <- length(xml2::xml_find_all(xml_object, ".//s:Concept"))
+dic_df <- data.frame(
+  code_name = rep(NA, times = number),
+  full_name = rep(NA, times = number)
+)
+attributes <- xml2::xml_attrs(xml2::xml_find_all(xml_object, ".//s:Concept"))
+contents <- xml2::xml_text(xml2::xml_find_all(xml_object, ".//s:Concept/c:Name[@xml:lang='en']"))
+for (i in seq_len(number)) {
+  dic_df$code_name[i] <- unname(attributes[[i]]["id"])
+}
+# This is ok because the length of <s:Concept> and <c:Name> is the same
+dic_df$full_name <- contents
+

We can see that there are more unique codes than labels and that some +labels are being used in several different codes:

+
+length(unique(dic_df$full_name))
+# [1] 586
+length(unique(dic_df$code_name))
+# [1] 592
+

To make the data.frame similar to the one that we would get from +reading a tab-separated .dic object:

+
+# Select unique rows
+library(dplyr)
+
+new_df <- dic_df %>% 
+  distinct()
+
+# codes toupper
+new_df$code_name <- toupper(new_df$code_name)
+
+new_df_sort <- new_df[order(new_df$code_name),]
+
+# Remove row numbers
+rownames(new_df_sort) <- NULL
+
+head(new_df_sort)
+#   code_name                                    full_name
+# 1  ACCIDENT                                     Accident
+# 2  ACCOMMOD                        Mode of accommodation
+# 3 ACCOMSIZE Size of accommodation by number of bedplaces
+# 4 ACCOMUNIT                           Accommodation unit
+# 5     ACL00    Classification of activities for time use
+# 6  ACTIVITY                             Type of activity
+

As comparison to the dimlst.dic object:

+
+# downloaded from https://ec.europa.eu/eurostat/estat-navtree-portlet-prod/BulkDownloadListing?sort=1&dir=dic%2Fen
+dimlst_dic <- readr::read_tsv("dimlst.dic",
+                col_names = c("code_name", "full_name"),
+                col_types = readr::cols(.default = readr::col_character()))
+
+head(dimlst_dic)
+##  A tibble: 6 × 2
+#   code_name full_name                                   
+#   <chr>     <chr>                                       
+# 1 ACCIDENT  Accident                                    
+# 2 ACCOMMOD  Mode of accommodation                       
+# 3 ACCOMSIZE Size of accommodation by number of bedplaces
+# 4 ACCOMUNIT Accommodation unit                          
+# 5 ACL00     Classification of activities for time use   
+# 6 ACTIVITY  Type of activity   
+

Clearly, the two objects have different types (the former is a +data.frame, the latter is a tibble), but that doesn’t stop us from +noticing that at least the 6 first rows are similar with each other. +However, dimlst.dic has 623 rows while new_df +object has 593 rows (obs.). Let’s find out what the differences are:

+
+setdiff(dimlst_dic$code_name, new_df_sort$code_name)
+#  [1] "AGR_INP"    "CALCMETH"   "DIMLST"     "ECOSYST"    "ECOSYST_C"  "FARMSIZE"   "HLTH_HLE"  
+#  [8] "HOSPCARE"   "HOUS_ANI"   "INDIC_AGR"  "IND_ACCT"   "IND_IMPV"   "ISSUER"     "LEARNING"  
+# [15] "LEV_INTRF"  "MANSTO"     "NRG_FLOW"   "NRG_TECH"   "OBS_STATUS" "OGA_FAM"    "OGA_NRH"   
+# [22] "OGA_RH"     "OGA_TYPE"   "PEDS"       "PERS_INV"   "PRD_ACCT"   "PRD_AMO"    "RAWMATPR"  
+# [29] "RAWMATSEC"  "REVDATE"    "SIZE_TUR"   "TABLE_DIC"  "TIME"       "VOT_CAT"    "WEEK"      
+# [36] "YN_CARE"    "YN_DIF"     "YN_DIS" 
+# length: 38 items
+length(setdiff(dimlst_dic$code_name, new_df_sort$code_name))
+# [1] 38
+setdiff(new_df_sort$code_name, dimlst_dic$code_name)
+# [1] "FIELDID"     "INDIC_EU"    "OBS_FLAG"    "OBS_VALUE"   "SIZEN_R2"    "TARGET"      "TARGET_FLAG"
+# [8] "TIME_PERIOD"
+length(setdiff(new_df_sort$code_name, dimlst_dic$code_name))
+# [1] 8
+

To summarize, the old dimlst.dic file has 38 codes that +are not found in the ALL_CONCEPTSCHEMES.xml file. The new +ALL_CONCEPTSCHEMES.xml has 8 codes that are not found in +the old dimlst.dic.

+

For more information about the different fields, let’s print the +codes and their descriptions. Unique to dimlst_dic +object:

+
+print(dimlst_dic[which(dimlst_dic$code_name %in% setdiff(dimlst_dic$code_name, new_df_sort$code_name)),], n = 40)
+# A tibble: 38 × 2
+#    code_name  full_name                                                                     
+#    <chr>      <chr>                                                                         
+#  1 AGR_INP    Agricultural inputs                                                           
+#  2 CALCMETH   Calculation method                                                            
+#  3 DIMLST     null                                                                          
+#  4 ECOSYST    Ecosystem typology                                                            
+#  5 ECOSYST_C  Ecosystem typology - converted                                                
+#  6 FARMSIZE   Size of farm                                                                  
+#  7 HLTH_HLE   Health and life expectancy                                                    
+#  8 HOSPCARE   Hospital care                                                                 
+#  9 HOUS_ANI   Animal housing                                                                
+# 10 INDIC_AGR  Agricultural indicators                                                       
+# 11 IND_ACCT   Industries and accounting items                                               
+# 12 IND_IMPV   Industries, imports and valuations                                            
+# 13 ISSUER     Type of issuer                                                                
+# 14 LEARNING   Learning form                                                                 
+# 15 LEV_INTRF  Level of interference                                                         
+# 16 MANSTO     Manure storage                                                                
+# 17 NRG_FLOW   Energy flows                                                                  
+# 18 NRG_TECH   Energy technologies                                                           
+# 19 OBS_STATUS Observation status (Flag)                                                     
+# 20 OGA_FAM    Other gainful activity of the family members                                  
+# 21 OGA_NRH    Other gainful activity of the holder (not related to the agricultural holding)
+# 22 OGA_RH     Other gainful activity of the holder (related to the agricultural holding)    
+# 23 OGA_TYPE   Types of other gainful activity (OGA) related to the agricultural holding     
+# 24 PEDS       Potential Environmentally Damaging Subsidies (ESA transfers)                  
+# 25 PERS_INV   Persons involved in the accident                                              
+# 26 PRD_ACCT   Products and accounting items                                                 
+# 27 PRD_AMO    Products, adjustments and market output                                       
+# 28 RAWMATPR   Primary raw materials                                                         
+# 29 RAWMATSEC  Secondary raw materials                                                       
+# 30 REVDATE    Revision date                                                                 
+# 31 SIZE_TUR   Size classes of turnover                                                      
+# 32 TABLE_DIC  null                                                                          
+# 33 TIME       Period of time                                                                
+# 34 VOT_CAT    Category of voters                                                            
+# 35 WEEK       Calendar week                                                                 
+# 36 YN_CARE    Use of profesional care - Yes/No                                              
+# 37 YN_DIF     Difficulties - Yes/No                                                         
+# 38 YN_DIS     Disability - Yes/No    
+

Unique to new_df or new_df_sort:

+
+new_df_sort[which(new_df_sort$code_name %in% setdiff(new_df_sort$code_name, dimlst_dic$code_name)),]
+#       code_name                        full_name
+# 152     FIELDID             Agricultural product
+# 221    INDIC_EU    Indicators for EU2020 project
+# 364    OBS_FLAG        Observation status (Flag)
+# 365   OBS_VALUE                Observation value
+# 464    SIZEN_R2  Enterprise size and Nace Rev. 2
+# 502      TARGET         TARGET Observation value
+# 503 TARGET_FLAG TARGET Observation status (Flag)
+# 510 TIME_PERIOD                             Time
+

Of these, “FIELDID / Agricultural product” seems almost like an input +error as there are also “prod_apr / Agricultural product (old codes)” +and “agriprod / Agricultural products” on the list. If that were the +case, the correct course of action is to of course give feedback to +Eurostat.

+
+
+

Types of duplicates +

+

There are also some duplicates in the list created from the XML file. +Duplicates exist both in the code_name column or in the +full_name column.

+
+new_df_sort[duplicated(new_df_sort$code_name),]
+#     code_name               full_name
+# 471    SO_EUR Standardoutput in Euros
+
+new_df_sort[duplicated(new_df_sort$full_name),]
+#     code_name                                               full_name
+# 35   ASYL_APP                                          Applicant type
+# 179    HHTYPE                                       Type of household
+# 227 INDIC_INN                                    Innovation indicator
+# 233 INDIC_NRG                                        Energy indicator
+# 237 INDIC_SBS Economical indicator for structural business statistics
+# 452  SECTPART                                       Sector (ESA 2010)
+# 528        TY                                     Type of expenditure
+

The differences can be due to typos (probably ?):

+
+new_df_sort[which(new_df_sort$code_name == "SO_EUR"),]
+#     code_name                full_name
+# 470    SO_EUR Standard output in Euros
+# 471    SO_EUR  Standardoutput in Euros
+
+new_df_sort[which(new_df_sort$full_name == "Type of household"),]
+#     code_name         full_name
+# 178     HHTYP Type of household
+# 179    HHTYPE Type of household
+
+new_df_sort[which(new_df_sort$full_name == "Innovation indicator"),]
+#     code_name            full_name
+# 226  INDIC_IN Innovation indicator
+# 227 INDIC_INN Innovation indicator
+
+new_df_sort[which(new_df_sort$full_name == "Economical indicator for structural business statistics"),]
+#     code_name                                               full_name
+# 236  INDIC_SB Economical indicator for structural business statistics
+# 237 INDIC_SBS Economical indicator for structural business statistics
+

…or due to actual differences (?) in the fields, although there could +also be some kind of a misunderstanding:

+
+# Different types of applicants
+new_df_sort[which(new_df_sort$full_name == "Applicant type"),]
+#    code_name      full_name
+# 24 APPLICANT Applicant type
+# 35  ASYL_APP Applicant type
+
+new_df_sort[which(new_df_sort$full_name == "Energy indicator"),]
+#     code_name        full_name
+# 218  INDIC_EN Energy indicator
+# 233 INDIC_NRG Energy indicator
+
+new_df_sort[which(new_df_sort$full_name == "Sector (ESA 2010)"),]
+#     code_name         full_name
+# 450  SECTOR10 Sector (ESA 2010)
+# 452  SECTPART Sector (ESA 2010)
+
+new_df_sort[which(new_df_sort$full_name == "Type of expenditure"),]
+#     code_name           full_name
+# 144     EXPEN Type of expenditure
+# 528        TY Type of expenditure
+
+
+

Conclusion +

+

Changes in methods of delivering metadata affect, naturally, all end +users of Eurostat data. With the eurostat package version 4.0.0 we have +aimed at retaining the user-facing functionalities and the expected +outputs. The interesting world of XML parsing is kept under the hood and +should not be of concern for users.

+

This document is written mainly as a future reference for ourselves +if we might at some point be wondering why something that was possible +before is not possible anymore, or for users who have had scripts +relying on functions like label_eurostat_vars().

+

Feel free to open an issue or a pull request in Github if there are +any suggestions or corrections you would like to make.

+
+
+
+ + + + +
+ + + + + + + diff --git a/articles/eurostat_tutorial.html b/articles/eurostat_tutorial.html index 43d7cec1..803c97c2 100644 --- a/articles/eurostat_tutorial.html +++ b/articles/eurostat_tutorial.html @@ -14,8 +14,8 @@ - - + + @@ -40,7 +40,7 @@ eurostat - 3.8.3 + 4.0.0 - - - - - -
-
-
- -
-

Internal function to convert time column.

-
- -
-

Usage

-
convert_time_col2(x, time_format)
-
- -
-

Arguments

-
x
-

A time column (vector) from a downloaded dataset

- - -
time_format
-

one of the following: date, date_last, or num. -See tidy_eurostat() for more information.

- -
- -
- - -
- - - -
- - - - - - diff --git a/reference/cut_to_classes.html b/reference/cut_to_classes.html index eac0b408..ac1ee9f9 100644 --- a/reference/cut_to_classes.html +++ b/reference/cut_to_classes.html @@ -1,6 +1,6 @@ Cuts the Values Column into Classes and Polishes the Labels — cut_to_classes • eurostatCuts the Values Column into Classes and Polishes the Labels — cut_to_classes • eurostatOrder of Variable Levels from Eurostat Dictionary. — dic_order • eurostatOrder of Variable Levels from Eurostat Dictionary. — dic_order • eurostat @@ -10,7 +10,7 @@ eurostat - 3.8.3 + 4.0.0 + + + + + +
+
+
+ +
+

This list of defunct functions is maintained to document changes to eurostat functions in a +transparent manner.

+
+ +
+

Usage

+
grepEurostatTOC(...)
+
+ +
+

Arguments

+
...
+

Generic representation of old arguments

+ +
+
+

Details

+

The following functions are defunct:

+
  • grepEurostatTOC: Use search_eurostat instead

  • +
+ +
+ + +
+ + + +
+ + + + + + diff --git a/reference/eurostat-package.html b/reference/eurostat-package.html index 547f55e5..a72f2064 100644 --- a/reference/eurostat-package.html +++ b/reference/eurostat-package.html @@ -1,5 +1,9 @@ -R Tools for Eurostat open data — eurostat-package • eurostatR Tools for Eurostat open data — eurostat-package • eurostat @@ -10,7 +14,7 @@ eurostat - 3.8.3 + 4.0.0 - - - - - -
-
-
- -
-

Date conversion from Eurostat time format. A function to -convert Eurostat time values to objects of class Date() -representing calendar dates.

-
- -
-

Usage

-
eurotime2date2(x, last = FALSE)
-
- -
-

Arguments

-
x
-

a charter string with time information in Eurostat time format.

- - -
last
-

a logical. If FALSE (default) the date is -the first date of the period (month, quarter or year). If TRUE -the date is the last date of the period.

- -
-
-

Value

- - -

an object of class Date().

-
-
-

Details

-

Available patterns are YYYY (year), YYYY-SN (semester), YYYY-QN (quarter), -YYYY-MM (month), YYYY-WNN (week) and YYYY-MM-DD (day).

-
-
-

References

-

See citation("eurostat"):

-

# 
-# Kindly cite the eurostat R package as follows:
-# 
-#   (C) Leo Lahti, Janne Huovari, Markus Kainu, Przemyslaw Biecek.
-#   Retrieval and analysis of Eurostat open data with the eurostat
-#   package. R Journal 9(1):385-392, 2017. doi: 10.32614/RJ-2017-019
-#   Package URL: http://ropengov.github.io/eurostat Article URL:
-#   https://journal.r-project.org/archive/2017/RJ-2017-019/index.html
-# 
-# A BibTeX entry for LaTeX users is
-# 
-#   @Article{,
-#     title = {Retrieval and Analysis of Eurostat Open Data with the eurostat Package},
-#     author = {Leo Lahti and Janne Huovari and Markus Kainu and Przemyslaw Biecek},
-#     journal = {The R Journal},
-#     volume = {9},
-#     number = {1},
-#     pages = {385--392},
-#     year = {2017},
-#     doi = {10.32614/RJ-2017-019},
-#     url = {https://doi.org/10.32614/RJ-2017-019},
-#   }

-
- -
-

Author

-

Janne Huovari janne.huovari@ptt.fi

-
- -
-

Examples

-
# \donttest{
-na_q <- get_eurostat("namq_10_pc", time_format = "raw")
-na_q$time <- eurotime2date(x = na_q$time)
-unique(na_q$time)
-#>   [1] "2023-04-01" "2023-01-01" "2022-10-01" "2022-07-01" "2022-04-01"
-#>   [6] "2022-01-01" "2021-10-01" "2021-07-01" "2021-04-01" "2021-01-01"
-#>  [11] "2020-10-01" "2020-07-01" "2020-04-01" "2020-01-01" "2019-10-01"
-#>  [16] "2019-07-01" "2019-04-01" "2019-01-01" "2018-10-01" "2018-07-01"
-#>  [21] "2018-04-01" "2018-01-01" "2017-10-01" "2017-07-01" "2017-04-01"
-#>  [26] "2017-01-01" "2016-10-01" "2016-07-01" "2016-04-01" "2016-01-01"
-#>  [31] "2015-10-01" "2015-07-01" "2015-04-01" "2015-01-01" "2014-10-01"
-#>  [36] "2014-07-01" "2014-04-01" "2014-01-01" "2013-10-01" "2013-07-01"
-#>  [41] "2013-04-01" "2013-01-01" "2012-10-01" "2012-07-01" "2012-04-01"
-#>  [46] "2012-01-01" "2011-10-01" "2011-07-01" "2011-04-01" "2011-01-01"
-#>  [51] "2010-10-01" "2010-07-01" "2010-04-01" "2010-01-01" "2009-10-01"
-#>  [56] "2009-07-01" "2009-04-01" "2009-01-01" "2008-10-01" "2008-07-01"
-#>  [61] "2008-04-01" "2008-01-01" "2007-10-01" "2007-07-01" "2007-04-01"
-#>  [66] "2007-01-01" "2006-10-01" "2006-07-01" "2006-04-01" "2006-01-01"
-#>  [71] "2005-10-01" "2005-07-01" "2005-04-01" "2005-01-01" "2004-10-01"
-#>  [76] "2004-07-01" "2004-04-01" "2004-01-01" "2003-10-01" "2003-07-01"
-#>  [81] "2003-04-01" "2003-01-01" "2002-10-01" "2002-07-01" "2002-04-01"
-#>  [86] "2002-01-01" "2001-10-01" "2001-07-01" "2001-04-01" "2001-01-01"
-#>  [91] "2000-10-01" "2000-07-01" "2000-04-01" "2000-01-01" "1999-10-01"
-#>  [96] "1999-07-01" "1999-04-01" "1999-01-01" "1998-10-01" "1998-07-01"
-#> [101] "1998-04-01" "1998-01-01" "1997-10-01" "1997-07-01" "1997-04-01"
-#> [106] "1997-01-01" "1996-10-01" "1996-07-01" "1996-04-01" "1996-01-01"
-#> [111] "1995-10-01" "1995-07-01" "1995-04-01" "1995-01-01" "1994-10-01"
-#> [116] "1994-07-01" "1994-04-01" "1994-01-01" "1993-10-01" "1993-07-01"
-#> [121] "1993-04-01" "1993-01-01" "1992-10-01" "1992-07-01" "1992-04-01"
-#> [126] "1992-01-01" "1991-10-01" "1991-07-01" "1991-04-01" "1991-01-01"
-#> [131] "1990-10-01" "1990-07-01" "1990-04-01" "1990-01-01" "1989-10-01"
-#> [136] "1989-07-01" "1989-04-01" "1989-01-01" "1988-10-01" "1988-07-01"
-#> [141] "1988-04-01" "1988-01-01" "1987-10-01" "1987-07-01" "1987-04-01"
-#> [146] "1987-01-01" "1986-10-01" "1986-07-01" "1986-04-01" "1986-01-01"
-#> [151] "1985-10-01" "1985-07-01" "1985-04-01" "1985-01-01" "1984-10-01"
-#> [156] "1984-07-01" "1984-04-01" "1984-01-01" "1983-10-01" "1983-07-01"
-#> [161] "1983-04-01" "1983-01-01" "1982-10-01" "1982-07-01" "1982-04-01"
-#> [166] "1982-01-01" "1981-10-01" "1981-07-01" "1981-04-01" "1981-01-01"
-#> [171] "1980-10-01" "1980-07-01" "1980-04-01" "1980-01-01"
-# }
-
-if (FALSE) {
-# Test for weekly data
-get_eurostat(
-  id = "lfsi_abs_w", 
-  select_time = c("W"), 
-  time_format = "date", 
-  legacy_bulk_download = FALSE
-  )
-}
-
-
-
- - -
- - - -
- - - - - - diff --git a/reference/eurotime2num.html b/reference/eurotime2num.html index 27a3316e..b0d94930 100644 --- a/reference/eurotime2num.html +++ b/reference/eurotime2num.html @@ -1,5 +1,5 @@ -Conversion of Eurostat Time Format to Numeric — eurotime2num • eurostatConversion of Eurostat Time Format to Numeric — eurotime2num • eurostat @@ -10,7 +10,7 @@ eurostat - 3.8.3 + 4.0.0 - - - - - -
-
-
- -
-

A conversion of a Eurostat time format to numeric.

-
- -
-

Usage

-
eurotime2num2(x)
-
- -
-

Arguments

-
x
-

a charter string with time information in Eurostat time format.

- -
-
-

Value

- - -

see as.numeric().

-
-
-

Details

-

Bi-annual (semester), quarterly, monthly and weekly data can be presented as -a fraction of the year in beginning of the period. Conversion of daily data -is not supported.

-
- -
-

Author

-

Janne Huovari janne.huovari@ptt.fi, Pyry Kantanen

-
- -
-

Examples

-
# \donttest{
-na_q <- get_eurostat("namq_10_pc", time_format = "raw")
-na_q$time <- eurotime2num(x = na_q$time)
-
-unique(na_q$time)
-#>   [1] 2023.25 2023.00 2022.75 2022.50 2022.25 2022.00 2021.75 2021.50 2021.25
-#>  [10] 2021.00 2020.75 2020.50 2020.25 2020.00 2019.75 2019.50 2019.25 2019.00
-#>  [19] 2018.75 2018.50 2018.25 2018.00 2017.75 2017.50 2017.25 2017.00 2016.75
-#>  [28] 2016.50 2016.25 2016.00 2015.75 2015.50 2015.25 2015.00 2014.75 2014.50
-#>  [37] 2014.25 2014.00 2013.75 2013.50 2013.25 2013.00 2012.75 2012.50 2012.25
-#>  [46] 2012.00 2011.75 2011.50 2011.25 2011.00 2010.75 2010.50 2010.25 2010.00
-#>  [55] 2009.75 2009.50 2009.25 2009.00 2008.75 2008.50 2008.25 2008.00 2007.75
-#>  [64] 2007.50 2007.25 2007.00 2006.75 2006.50 2006.25 2006.00 2005.75 2005.50
-#>  [73] 2005.25 2005.00 2004.75 2004.50 2004.25 2004.00 2003.75 2003.50 2003.25
-#>  [82] 2003.00 2002.75 2002.50 2002.25 2002.00 2001.75 2001.50 2001.25 2001.00
-#>  [91] 2000.75 2000.50 2000.25 2000.00 1999.75 1999.50 1999.25 1999.00 1998.75
-#> [100] 1998.50 1998.25 1998.00 1997.75 1997.50 1997.25 1997.00 1996.75 1996.50
-#> [109] 1996.25 1996.00 1995.75 1995.50 1995.25 1995.00 1994.75 1994.50 1994.25
-#> [118] 1994.00 1993.75 1993.50 1993.25 1993.00 1992.75 1992.50 1992.25 1992.00
-#> [127] 1991.75 1991.50 1991.25 1991.00 1990.75 1990.50 1990.25 1990.00 1989.75
-#> [136] 1989.50 1989.25 1989.00 1988.75 1988.50 1988.25 1988.00 1987.75 1987.50
-#> [145] 1987.25 1987.00 1986.75 1986.50 1986.25 1986.00 1985.75 1985.50 1985.25
-#> [154] 1985.00 1984.75 1984.50 1984.25 1984.00 1983.75 1983.50 1983.25 1983.00
-#> [163] 1982.75 1982.50 1982.25 1982.00 1981.75 1981.50 1981.25 1981.00 1980.75
-#> [172] 1980.50 1980.25 1980.00
-# }
-
-
-
- - -
- - - -
- - - - - - diff --git a/reference/fixity_checksum.html b/reference/fixity_checksum.html new file mode 100644 index 00000000..ce6b28c2 --- /dev/null +++ b/reference/fixity_checksum.html @@ -0,0 +1,140 @@ + +Calculate a fixity checksum for an object — fixity_checksum • eurostat + Skip to contents + + +
+
+
+ +
+

Uses a hash function (md5) on an object and calculates a digest of the object +in the form of a character string.

+
+ +
+

Usage

+
fixity_checksum(data_object, algorithm = "md5")
+
+ +
+

Source

+

https://www.dpconline.org/handbook/technical-solutions-and-tools/fixity-and-checksums

+
+
+

Arguments

+
data_object
+

A dataset downloaded with some eurostat package function.

+ + +
algorithm
+

Algorithm to use when calculating a checksum for a dataset. +Default is 'md5', but can be any supported algorithm in digest function.

+ +
+
+

Details

+

“Fixity, in the preservation sense, means the assurance that a digital file +has remained unchanged, i.e. fixed.” (Bailey, 2014). In practice, fixity +can most easily be established by calculating a checksum for the data object +that changes if anything in the data object has changed. What we use as a +checksum here is by default calculated with md5 hash algorithm. It is +possible to use other algorithms supported by the imported digest function, +see function documentation.

+

In the case of big objects with millions of rows of data calculating a +checksum can take a bit longer and require some amount of RAM to be +available. Selecting another algorithm might perform faster and/or more +efficiently. Whichever algorithm you are using, please make sure to report +it transparently in your work for transparency and ensuring replicability.

+

This function takes the whole data object as an input, meaning that +everything counts when calculating the fixity checksum. If the dataset +column names are labeled, if the data itself is labeled, if stringsAsFactors +is TRUE, if flags are removed or kept, if data is somehow edited... all these +affect the calculated checksum. It is advisable to calculate the checksum +immediately after downloading the data, before adding any labels or doing +other mutating operations. If you are using other arguments than the default +ones when downloading data, it is also good to report the exact arguments +used.

+

This implementation fulfills the level 1 requirement of National Digital +Stewardship Alliance (NDSA) preservation levels by creating "fixity info +if it wasn’t provided with the content". In the current version of the +package, fixity information has to be created manually and is at the +responsibility of the user.

+
+
+

See also

+ +
+ +
+ + +
+ + + +
+ + + + + + diff --git a/reference/get_bibentry.html b/reference/get_bibentry.html index 8eed6ea6..ede6235d 100644 --- a/reference/get_bibentry.html +++ b/reference/get_bibentry.html @@ -1,7 +1,7 @@ Create A Data Bibliography — get_bibentry • eurostatCreate A Data Bibliography — get_bibentry • eurostatRead Eurostat Data — get_eurostat • eurostatGet Eurostat Data — get_eurostat • eurostat @@ -10,7 +10,7 @@ eurostat - 3.8.3 + 4.0.0 + + + + + +
+
+
+ +
+

Loops over all files in a Eurostat database folder, downloads the data and +assigns the datasets to environment.

+
+ +
+

Usage

+
get_eurostat_folder(code, env = .EurostatEnv)
+
+ +
+

Arguments

+
code
+

Folder code from Eurostat Table of Contents.

+ + +
env
+

Name of the environment where downloaded datasets are assigned. +Default is .EurostatEnv. If NULL, datasets are returned as a list object.

+ +
+
+

Details

+

The datasets are assigned into .EurostatEnv by default, using dataset codes +as object names. The datasets are downloaded from SDMX API as TSV files, +meaning that they are returned without filtering. No filters can be +provided using this function.

+

Please do not attempt to download too many datasets or the whole database +at once. The number of datasets that can be downloaded at once is hardcoded +to 20. The function also asks the user for confirmation if the number of +datasets in a folder is more than 10. This is by design to discourage +straining Eurostat API.

+
+ +
+

Data source: Eurostat SDMX 2.1 Dissemination API

+

Data is downloaded from Eurostat SDMX 2.1 API endpoint +as compressed TSV files that are transformed into tabular format. +See Eurostat documentation for more information: +https://wikis.ec.europa.eu/display/EUROSTATHELP/API+SDMX+2.1+-+data+query

+

The new dissemination API replaces the old bulk download facility that was +used by Eurostat before October 2023 and by the eurostat R package versions +before 4.0.0. +See Eurostat documentation about the transition from Bulk Download to API +for more information about the differences between the old bulk download +facility and the data provided by the new API connection: +https://wikis.ec.europa.eu/display/EUROSTATHELP/Transition+-+from+Eurostat+Bulk+Download+to+API

+

See especially the document Migrating_to_API_TSV.pdf that describes the +changes in TSV file format in new applications.

+

For more information about SDMX 2.1, see SDMX standards: Section 7: +Guidelines for the use of web services, Version 2.1: +https://sdmx.org/wp-content/uploads/SDMX_2-1_SECTION_7_WebServicesGuidelines.pdf

+
+ +
+

Author

+

Pyry Kantanen

+
+ +
+ + +
+ + + +
+ + + + + + diff --git a/reference/get_eurostat_geospatial.html b/reference/get_eurostat_geospatial.html index 17d32761..f426f568 100644 --- a/reference/get_eurostat_geospatial.html +++ b/reference/get_eurostat_geospatial.html @@ -1,7 +1,11 @@ -Download Geospatial Data from GISCO — get_eurostat_geospatial • eurostatDownload Geospatial Data from GISCO — get_eurostat_geospatial • eurostat @@ -12,7 +16,7 @@ eurostat - 3.8.3 + 4.0.0 + + + + + +
+
+
+ +
+

A simple interactive helper function to go through the steps of downloading +and/or finding suitable eurostat datasets.

+
+ +
+

Usage

+
get_eurostat_interactive(code = NULL)
+
+ +
+

Arguments

+
code
+

A unique identifier / code for the dataset of interest. If code is not +known search_eurostat() function can be used to search Eurostat table +of contents.

+ +
+
+

Details

+

This function is intended to enable easy exploration of different eurostat +package functionalities and functions. In order to not drown the end user +in endless menus this function does not allow for setting +all possible get_eurostat() function arguments. It is possible to set +time_format, type, lang, stringsAsFactors, keepFlags, and +use.data.table in the interactive menus.

+

In some datasets setting these parameters may result in a +"Error in label_eurostat" error, for example: +"labels for XXXXXX includes duplicated labels in the Eurostat dictionary". +In these cases, and with other more complex queries, please +use get_eurostat() function directly.

+
+
+

See also

+ +
+ +
+ + +
+ + + +
+ + + + + + diff --git a/reference/get_eurostat_json.html b/reference/get_eurostat_json.html index 136c9632..32df263c 100644 --- a/reference/get_eurostat_json.html +++ b/reference/get_eurostat_json.html @@ -1,5 +1,5 @@ -Get Data from Eurostat API in JSON — get_eurostat_json • eurostatGet Data from Eurostat API in JSON — get_eurostat_json • eurostat @@ -10,7 +10,7 @@ eurostat - 3.8.3 + 4.0.0 - - - - - -
-
-
- -
-

Download data from the eurostat database through the new -dissemination API.

-
- -
-

Usage

-
get_eurostat_raw2(id)
-
- -
-

Arguments

-
id
-

A code name for the dataset of interested. See the table of -contents of eurostat datasets for more details.

- -
-
-

Value

- - -

A dataset in tibble format. First column contains comma -separated codes of cases. Other columns usually corresponds to -years and column names are years with preceding X. Data is in -character format as it contains values together with eurostat -flags for data.

-
-
-

Details

-

Data is downloaded from -https://ec.europa.eu/eurostat/estat-navtree-portlet-prod/BulkDownloadListing -and transformed into tabular format.

-
-
-

References

-

See citation("eurostat"):

-

# 
-# Kindly cite the eurostat R package as follows:
-# 
-#   (C) Leo Lahti, Janne Huovari, Markus Kainu, Przemyslaw Biecek.
-#   Retrieval and analysis of Eurostat open data with the eurostat
-#   package. R Journal 9(1):385-392, 2017. doi: 10.32614/RJ-2017-019
-#   Package URL: http://ropengov.github.io/eurostat Article URL:
-#   https://journal.r-project.org/archive/2017/RJ-2017-019/index.html
-# 
-# A BibTeX entry for LaTeX users is
-# 
-#   @Article{,
-#     title = {Retrieval and Analysis of Eurostat Open Data with the eurostat Package},
-#     author = {Leo Lahti and Janne Huovari and Markus Kainu and Przemyslaw Biecek},
-#     journal = {The R Journal},
-#     volume = {9},
-#     number = {1},
-#     pages = {385--392},
-#     year = {2017},
-#     doi = {10.32614/RJ-2017-019},
-#     url = {https://doi.org/10.32614/RJ-2017-019},
-#   }

-
-
-

See also

- -
-
-

Author

-

Przemyslaw Biecek, Leo Lahti, Janne Huovari and Pyry Kantanen

-
- -
-

Examples

-
# \donttest{
-eurostat:::get_eurostat_raw("educ_iste")
-#> # A tibble: 213 × 16
-#>    `indic_ed,geo\\time` `2012` `2011` `2010` `2009` `2008` `2007` `2006` `2005`
-#>    <chr>                <chr>  <chr>  <chr>  <chr>  <chr>  <chr>  <chr>  <chr> 
-#>  1 ST1_1,AL             NA     NA     NA     NA     NA     NA     NA     NA    
-#>  2 ST1_1,AT             10.1   10.2   10.4   10.6   11.0   11.5   11.7   11.8  
-#>  3 ST1_1,BE             10.5 d 10.5 d 10.5 d 10.5 d 10.8 d 10.8 d 10.9 d 10.8 d
-#>  4 ST1_1,BE_FRA         NA     10.1   10.2   10.3   NA     10.4   10.4   NA    
-#>  5 ST1_1,BE_VLA         NA     10.8   10.7   10.7   11.0   11.1   11.2   NA    
-#>  6 ST1_1,BG             13.9   13.8   13.6   13.5   12.8   12.8   12.9   13.2  
-#>  7 ST1_1,CY             11.5   11.4   11.5   11.8   12.3   13.0   14.0   14.1  
-#>  8 ST1_1,CZ             13.2   13.3   14.2 d 14.2 d 14.2 d 14.5 d 13.4   14.4  
-#>  9 ST1_1,DE             15.4   15.7   16.1   16.6   16.7   16.9   17.2   17.2  
-#> 10 ST1_1,DK             : u    : u    : u    : u    : u    : u    : u    : u   
-#> # ℹ 203 more rows
-#> # ℹ 7 more variables: `2004` <chr>, `2003` <chr>, `2002` <chr>, `2001` <chr>,
-#> #   `2000` <chr>, `1999` <chr>, `1998` <chr>
-# }
-
-
-
- - -
- - - -
- - - - - - diff --git a/reference/get_eurostat_toc.html b/reference/get_eurostat_toc.html index 10d728c3..05c7823b 100644 --- a/reference/get_eurostat_toc.html +++ b/reference/get_eurostat_toc.html @@ -1,5 +1,5 @@ -Download Table of Contents of Eurostat Data Sets — get_eurostat_toc • eurostatDownload Table of Contents of Eurostat Data Sets — get_eurostat_toc • eurostat @@ -10,7 +10,7 @@ eurostat - 3.8.3 + 4.0.0 - - - - - -
-
-
- -
-

Get definitions for Eurostat codes from Eurostat dictionaries.

-
- -
-

Usage

-
label_eurostat2(
-  x,
-  dic = NULL,
-  code = NULL,
-  eu_order = FALSE,
-  lang = "en",
-  countrycode = NULL,
-  countrycode_nomatch = NULL,
-  custom_dic = NULL,
-  fix_duplicated = FALSE
-)
-
- -
-

Arguments

-
x
-

A character or a factor vector or a data_frame.

- - -
dic
-

A string (vector) naming eurostat dictionary or dictionaries. -If NULL (default) dictionary names taken from column names of -the data_frame.

- - -
code
-

For data_frames names of the column for which also code columns -should be retained. The suffix "_code" is added to code column names.

- - -
eu_order
-

Logical. Should Eurostat ordering used for label levels. -Affects only factors.

- - -
lang
-

A character, code for language. Available are "en" (default), -"fr" and "de".

- - -
countrycode
-

A NULL or a name of the coding scheme for -the countrycode::countrycode() -to label "geo" variable with countrycode-package. It can be used to -convert to short and long country names in many different languages. -If NULL (default) eurostat dictionary is used instead.

- - -
countrycode_nomatch
-

What to do when using the countrycode to label -a "geo" and countrycode fails to find a match, for example other than -country codes like EU28. The original code is used with -a NULL (default), eurostat dictionary label is used with "eurostat", -and NA is used with NA.

- - -
custom_dic
-

a named vector or named list of named vectors to give an -own dictionary for (part of) codes. Names of the vector should be codes -and values labels. List can be used to specify dictionaries and then -list names should be dictionary codes.

- - -
fix_duplicated
-

A logical. If TRUE, the code is added to the -duplicated label values. If FALSE (default) error is given if -labeling produce duplicates.

- -
-
-

Value

- - -

a vector or a data_frame.

-
-
-

Details

-

A character or a factor vector of codes returns a corresponding -vector of definitions. label_eurostat() labels also data_frames from -get_eurostat(). For vectors a dictionary name have to be -supplied. For data_frames dictionary names are taken from column names. -"time" and "values" columns are returned as they were, so you can supply -data_frame from get_eurostat() and get data_frame with -definitions instead of codes.

-

Some Eurostat dictionaries includes duplicated labels. By default -duplicated labels cause an error, but they can be fixed automatically -with fix_duplicated = TRUE.

-
- -
-

Author

-

Janne Huovari janne.huovari@ptt.fi

-
- -
-

Examples

-
if (FALSE) {
-lp <- get_eurostat("nama_10_lp_ulc")
-lpl <- label_eurostat(lp)
-str(lpl)
-lpl_order <- label_eurostat(lp, eu_order = TRUE)
-lpl_code <- label_eurostat(lp, code = "unit")
-label_eurostat_vars(names(lp))
-label_eurostat_tables("nama_10_lp_ulc")
-label_eurostat(c("FI", "DE", "EU28"), dic = "geo")
-label_eurostat(c("FI", "DE", "EU28"), dic = "geo", custom_dic = c(DE = "Germany"))
-label_eurostat(c("FI", "DE", "EU28"),
-  dic = "geo", countrycode = "country.name",
-  custom_dic = c(EU28 = "EU")
-)
-label_eurostat(c("FI", "DE", "EU28"), dic = "geo", countrycode = "country.name")
-# In Finnish
-label_eurostat(c("FI", "DE", "EU28"), dic = "geo", countrycode = "cldr.short.fi")
-}
-
-
-
-
- - -
- - - -
- - - - - - diff --git a/reference/list_eurostat_cache_items.html b/reference/list_eurostat_cache_items.html new file mode 100644 index 00000000..b2c76fb4 --- /dev/null +++ b/reference/list_eurostat_cache_items.html @@ -0,0 +1,106 @@ + +Output cache information as data.frame — list_eurostat_cache_items • eurostat + Skip to contents + + +
+
+
+ +
+

Parses cache_list.json file and returns a data.frame

+
+ +
+

Usage

+
list_eurostat_cache_items(cache_dir = NULL)
+
+ +
+

Arguments

+
cache_dir
+

a path to a cache directory. NULL (default) uses and creates +'eurostat' directory in the temporary directory defined by base R +tempdir() function. The user can set the cache directory to an existing +directory by using this argument. The cache directory can also be set with +set_eurostat_cache_dir() function.

+ +
+
+

Value

+ + +

A data.frame object with 3 columns: dataset code, download date and +query md5 hash

+
+ +
+ + +
+ + + +
+ + + + + + diff --git a/reference/recode_to_nuts_2013.html b/reference/recode_to_nuts_2013.html index 1cd51d9e..a2326bad 100644 --- a/reference/recode_to_nuts_2013.html +++ b/reference/recode_to_nuts_2013.html @@ -2,7 +2,7 @@ Recode geo labels and rename regions from NUTS2016 to NUTS2013 — recode_to_nuts_2013 • eurostatRecode geo labels and rename regions from NUTS2016 to NUTS2013 — recode_to_nuts_2013 • eurostatRecode geo labels and rename regions from NUTS2013 to NUTS2016 — recode_to_nuts_2016 • eurostatRecode geo labels and rename regions from NUTS2013 to NUTS2016 — recode_to_nuts_2016 • eurostatRecode Region Codes From Source To Target NUTS Typology — reexports • eurostateurostat - 3.8.3 + 4.0.0 - - - - - -
-
-
- -
-

Transform raw Eurostat data table downloaded from the new -dissemination API into the row-column-value format (RCV).

-
- -
-

Usage

-
tidy_eurostat2(
-  dat,
-  time_format = "date",
-  select_time = NULL,
-  stringsAsFactors = FALSE,
-  keepFlags = FALSE
-)
-
- -
-

Arguments

-
dat
-

a data_frame from get_eurostat_raw().

- - -
time_format
-

a string giving a type of the conversion of the time column from the -eurostat format. A "date" (default) converts to a Date() -with a first date of the period. A "date_last" converts to a Date() with -a last date of the period. A "num" converts to a numeric and "raw" -does not do conversion. See eurotime2date() and eurotime2num().

- - -
select_time
-

a single character symbol for a time frequency, a vector -containing multiple time frequencies, or NULL (default). -Available options are "A" (annual), "Q" (quarterly), "S" -(semester, 1st or 2nd half of the year), "M" (monthly) and "D" (daily). -When downloading data from the New Dissemination API, it is now possible -to select multiple time frequencies and return them in the same data.frame -object.

- - -
stringsAsFactors
-

if TRUE (the default) variables are -converted to factors in original Eurostat order. If FALSE -they are returned as strings.

- - -
keepFlags
-

a logical whether the flags (e.g. "confidential", -"provisional") should be kept in a separate column or if they -can be removed. Default is FALSE

- -
-
-

Value

- - -

tibble in the molten format with the last column 'values'.

-
-
-

References

-

See citation("eurostat").

-
- -
-

Author

-

Przemyslaw Biecek, Leo Lahti, Janne Huovari and Pyry Kantanen

-
- -
-

Examples

-
if (FALSE) {
-# Example of a dataset with multiple time series
-get_eurostat("AVIA_GOR_ME", time_format = "date_last", cache = F, bulk_new_style = TRUE)
-}
-
-
-
-
- - -
- - - -
- - - - - - diff --git a/reference/toc_count_children.html b/reference/toc_count_children.html new file mode 100644 index 00000000..19b2eb71 --- /dev/null +++ b/reference/toc_count_children.html @@ -0,0 +1,104 @@ + +Count number of children — toc_count_children • eurostat + Skip to contents + + +
+
+
+ +
+

Determine how many children a certain TOC item (usually a folder) has.

+
+ +
+

Usage

+
toc_count_children(code)
+
+ +
+

Arguments

+
code
+

Eurostat TOC item code (folder, dataset, table)

+ +
+ +
+

Author

+

Pyry Kantanen

+
+ +
+ + +
+ + + +
+ + + + + + diff --git a/reference/toc_count_whitespace.html b/reference/toc_count_whitespace.html new file mode 100644 index 00000000..1118bc99 --- /dev/null +++ b/reference/toc_count_whitespace.html @@ -0,0 +1,139 @@ + +Count white space at the start of the title — toc_count_whitespace • eurostat + Skip to contents + + +
+
+
+ +
+

Counts the number of white space characters at the start +of the string.

+
+ +
+

Usage

+
toc_count_whitespace(input_string)
+
+ +
+

Arguments

+
input_string
+

A string containing Eurostat TOC titles

+ +
+
+

Value

+ + +

Numeric (number of white space characters)

+
+
+

Details

+

Used in toc_determine_hierarchy function to determine hierarchy. +Hierarchy is defined in Eurostat .txt format TOC files by the number of +white space characters at intervals of four. For example, +" Foo" (4 white space characters) is one level higher than +" Bar" (8 white space characters). +"Database by themes" (0 white space characters before the first +alphanumeric character) is highest in the hierarchy.

+

The function will return a warning if the input has white space in anything +else than as increments of 4. 0, 4, 8... are acceptable but 3, 6, 10... +are not.

+
+ +
+

Author

+

Pyry Kantanen

+
+ +
+

Examples

+
strings <- c("    abc", "  cdf", "no_spaces")
+for (string in strings) {
+ whitespace_count <- eurostat:::toc_count_whitespace(string)
+ cat("String:", string, "\tWhitespace Count:", whitespace_count, "\n")
+}
+#> String:     abc 	Whitespace Count: 4 
+#> String:   cdf 	Whitespace Count: 2 
+#> String: no_spaces 	Whitespace Count: 0 
+
+
+
+
+ + +
+ + + +
+ + + + + + diff --git a/reference/toc_determine_hierarchy.html b/reference/toc_determine_hierarchy.html new file mode 100644 index 00000000..b2e5478c --- /dev/null +++ b/reference/toc_determine_hierarchy.html @@ -0,0 +1,134 @@ + +Determine level in hierarchy — toc_determine_hierarchy • eurostat + Skip to contents + + +
+
+
+ +
+

Divides the number of spaces before alphanumeric characters +with 4 and uses the result to determine hierarchy. Top level is 0.

+
+ +
+

Usage

+
toc_determine_hierarchy(input_string)
+
+ +
+

Arguments

+
input_string
+

A string containing Eurostat TOC titles

+ +
+
+

Value

+ + +

Numeric

+
+
+

Details

+

Used in toc_determine_hierarchy function to determine hierarchy. +Hierarchy is defined in Eurostat .txt format TOC files by the number of +white space characters at intervals of four. For example, +" Foo" (4 white space characters) is one level higher than +" Bar" (8 white space characters). +"Database by themes" (0 white space characters before the first +alphanumeric character) is highest in the hierarchy.

+

The function will return a warning if the input has white space in anything +else than as increments of 4. 0, 4, 8... are acceptable but 3, 6, 10... +are not.

+
+ +
+

Author

+

Pyry Kantanen

+
+ +
+

Examples

+
strings <- c("        abc", "    cdf", "no_spaces")
+eurostat:::toc_determine_hierarchy(strings)
+#> [1] 2 1 0
+
+
+
+
+ + +
+ + + +
+ + + + + + diff --git a/reference/toc_list_children.html b/reference/toc_list_children.html new file mode 100644 index 00000000..da530296 --- /dev/null +++ b/reference/toc_list_children.html @@ -0,0 +1,104 @@ + +List children — toc_list_children • eurostat + Skip to contents + + +
+
+
+ +
+

List children of a specific folder.

+
+ +
+

Usage

+
toc_list_children(code)
+
+ +
+

Arguments

+
code
+

Eurostat TOC item code (folder, dataset, table)

+ +
+ +
+

Author

+

Pyry Kantanen

+
+ +
+ + +
+ + + +
+ + + + + + diff --git a/search.json b/search.json index 2499dcc3..47dae4c6 100644 --- a/search.json +++ b/search.json @@ -1 +1 @@ -[{"path":"https://ropengov.github.io/eurostat/articles/eurostat_tutorial.html","id":"r-tools-for-eurostat-open-data","dir":"Articles","previous_headings":"","what":"R Tools for Eurostat Open Data","title":"Tutorial for the eurostat R package","text":"rOpenGov R package provides tools access Eurostat database, can also browse -line data sets documentation. contact information source code, see package website.","code":""},{"path":"https://ropengov.github.io/eurostat/articles/eurostat_tutorial.html","id":"installation","dir":"Articles","previous_headings":"","what":"Installation","title":"Tutorial for the eurostat R package","text":"Release version (CRAN): Development version (Github): Overall, eurostat package includes following functions:","code":"install.packages(\"eurostat\") library(remotes) remotes::install_github(\"ropengov/eurostat\") check_access_to_data Check access to ec.europe.eu clean_eurostat_cache Clean Eurostat Cache cut_to_classes Cuts the Values Column into Classes and Polishes the Labels dic_order Order of Variable Levels from Eurostat Dictionary. eu_countries Countries and Country Codes eurostat-package R Tools for Eurostat open data eurostat_geodata_60_2016 Geospatial data of Europe from GISCO in 1:60 million scale from year 2016 eurotime2date Date Conversion from Eurostat Time Format eurotime2date2 Date Conversion from New Eurostat Time Format eurotime2num Conversion of Eurostat Time Format to Numeric eurotime2num2 Conversion of Eurostat Time Format to Numeric get_bibentry Create A Data Bibliography get_eurostat Read Eurostat Data get_eurostat_dic Download Eurostat Dictionary get_eurostat_geospatial Download Geospatial Data from GISCO get_eurostat_json Get Data from Eurostat API in JSON get_eurostat_raw Download Data from Eurostat Database get_eurostat_raw2 Download Data from Eurostat Dissemination API get_eurostat_toc Download Table of Contents of Eurostat Data Sets harmonize_country_code Harmonize Country Code label_eurostat Get Eurostat Codes label_eurostat2 Get Eurostat Codes for data downloaded from new dissemination API search_eurostat Grep Datasets Titles from Eurostat set_eurostat_cache_dir Set Eurostat Cache tgs00026 Auxiliary Data evaluate <- curl::has_internet()"},{"path":"https://ropengov.github.io/eurostat/articles/eurostat_tutorial.html","id":"finding-data","dir":"Articles","previous_headings":"","what":"Finding data","title":"Tutorial for the eurostat R package","text":"Function get_eurostat_toc() downloads table contents eurostat datasets. values column ‘code’ used download selected dataset. data sets (e.g. ‘comext’ type) accessible standard interface. See get_eurostat() function documentation details. search_eurostat() can search table contents particular patterns, e.g. datasets related passenger transport. kable function produces nice markdown output. Note type argument function restrict search instance datasets tables. Codes dataset can searched also Eurostat database. Eurostat database gives codes Data Navigation Tree every dataset parenthesis.","code":"# Load the package library(eurostat) # library(rvest) # Get Eurostat data listing toc <- get_eurostat_toc() # Check the first items library(knitr) kable(tail(toc)) # info about passengers kable(head(search_eurostat(\"passenger transport\")))"},{"path":"https://ropengov.github.io/eurostat/articles/eurostat_tutorial.html","id":"downloading-data","dir":"Articles","previous_headings":"","what":"Downloading data","title":"Tutorial for the eurostat R package","text":"package supports two Eurostats download methods: bulk download facility Web Services’ JSON API. bulk download facility fastest method download whole datasets. also often way JSON API limitation maximum 50 sub-indicators time whole datasets usually exceeds . download small section dataset JSON API faster, allows make data selection downloading. user usually bother methods, used via main function get_eurostat(). table id given, whole table downloaded bulk download facility. also filters defined JSON API used. example indicator ‘Modal split passenger transport’. percentage share mode transport total inland transport, expressed passenger-kilometres (pkm) based transport passenger cars, buses coaches, trains. data based movements national territory, regardless nationality vehicle. However, data collection harmonized EU level. Pick print id data set download: [1] NA Get whole corresponding table. table annual data, convenient use numeric time variable use default date format: Investigate structure downloaded data set: can get part dataset defining filters argument. named list, names corresponds variable names (lower case) values vectors codes corresponding desired series (upper case). time variable, addition time, also sinceTimePeriod lastTimePeriod can used.","code":"# For the original data, see # http://ec.europa.eu/eurostat/tgm/table.do?tab=table&init=1&plugin=1&language=en&pcode=tsdtr210 id <- search_eurostat(\"Modal split of passenger transport\", type = \"table\" )$code[1] print(id) dat <- get_eurostat(id, time_format = \"num\") str(dat) kable(head(dat)) dat2 <- get_eurostat(id, filters = list(geo = c(\"EU28\", \"FI\"), lastTimePeriod = 1), time_format = \"num\") kable(dat2)"},{"path":"https://ropengov.github.io/eurostat/articles/eurostat_tutorial.html","id":"replacing-codes-with-labels","dir":"Articles","previous_headings":"Downloading data","what":"Replacing codes with labels","title":"Tutorial for the eurostat R package","text":"default variables returned Eurostat codes, get human-readable labels instead, use type = \"label\" argument. Eurostat codes downloaded data set can replaced human-readable labels Eurostat dictionaries label_eurostat() function. label_eurostat() allows conversion individual variable vectors variable names well. Vehicle information 3 levels. can check now :","code":"datl2 <- get_eurostat(id, filters = list( geo = c(\"EU28\", \"FI\"), lastTimePeriod = 1 ), type = \"label\", time_format = \"num\" ) kable(head(datl2)) datl <- label_eurostat(dat) kable(head(datl)) label_eurostat_vars(names(datl)) levels(datl$vehicle)"},{"path":[]},{"path":"https://ropengov.github.io/eurostat/articles/eurostat_tutorial.html","id":"efta-eurozone-eu-and-eu-candidate-countries","dir":"Articles","previous_headings":"Selecting and modifying data","what":"EFTA, Eurozone, EU and EU candidate countries","title":"Tutorial for the eurostat R package","text":"facilitate smooth visualization standard European geographic areas, package provides ready-made lists country codes used eurostat database EFTA (efta_countries), Euro area (ea_countries), EU (eu_countries) EU candidate countries (eu_candidate_countries). can used select specific groups countries closer investigation. conversions standard country coding systems, see countrycode R package. retrieve country code list EFTA, instance, use:","code":"data(efta_countries) kable(efta_countries)"},{"path":"https://ropengov.github.io/eurostat/articles/eurostat_tutorial.html","id":"eu-data-from-2012-in-all-vehicles","dir":"Articles","previous_headings":"Selecting and modifying data","what":"EU data from 2012 in all vehicles:","title":"Tutorial for the eurostat R package","text":"","code":"dat_eu12 <- subset(datl, geo == \"European Union - 28 countries\" & time == 2012) kable(dat_eu12, row.names = FALSE)"},{"path":"https://ropengov.github.io/eurostat/articles/eurostat_tutorial.html","id":"eu-data-from-2000---2012-with-vehicle-types-as-variables","dir":"Articles","previous_headings":"Selecting and modifying data","what":"EU data from 2000 - 2012 with vehicle types as variables:","title":"Tutorial for the eurostat R package","text":"Reshaping data best done spread() tidyr.","code":"library(\"tidyr\") dat_eu_0012 <- subset(dat, geo == \"EU28\" & time %in% 2000:2012) dat_eu_0012_wide <- spread(dat_eu_0012, vehicle, values) kable(subset(dat_eu_0012_wide, select = -geo), row.names = FALSE)"},{"path":"https://ropengov.github.io/eurostat/articles/eurostat_tutorial.html","id":"train-passengers-for-selected-eu-countries-in-2000---2012","dir":"Articles","previous_headings":"Selecting and modifying data","what":"Train passengers for selected EU countries in 2000 - 2012","title":"Tutorial for the eurostat R package","text":"","code":"dat_trains <- subset(datl, geo %in% c(\"Austria\", \"Belgium\", \"Finland\", \"Sweden\") & time %in% 2000:2012 & vehicle == \"Trains\") dat_trains_wide <- spread(dat_trains, geo, values) kable(subset(dat_trains_wide, select = -vehicle), row.names = FALSE)"},{"path":"https://ropengov.github.io/eurostat/articles/eurostat_tutorial.html","id":"sdmx","dir":"Articles","previous_headings":"Selecting and modifying data","what":"SDMX","title":"Tutorial for the eurostat R package","text":"Eurostat data available also Statistical Data Metadata eXchange (SDMX) Web Services. eurostat R package provide custom tools following generic R packages provide access eurostat SDMX version: restatapi rsdmx rjsdmx","code":""},{"path":"https://ropengov.github.io/eurostat/articles/eurostat_tutorial.html","id":"further-examples","dir":"Articles","previous_headings":"","what":"Further examples","title":"Tutorial for the eurostat R package","text":"examples, see package homepage.","code":""},{"path":[]},{"path":"https://ropengov.github.io/eurostat/articles/eurostat_tutorial.html","id":"recommended-packages","dir":"Articles","previous_headings":"Citations and related work","what":"Recommended packages","title":"Tutorial for the eurostat R package","text":"NOTE: recommend check also giscoR package (https://dieghernan.github.io/giscoR/). another API package provides R tools Eurostat geographic data support geospatial analysis visualization.","code":""},{"path":"https://ropengov.github.io/eurostat/articles/eurostat_tutorial.html","id":"citing-the-data-sources","dir":"Articles","previous_headings":"Citations and related work","what":"Citing the data sources","title":"Tutorial for the eurostat R package","text":"Eurostat data: cite Eurostat. Administrative boundaries: cite EuroGeographics","code":""},{"path":"https://ropengov.github.io/eurostat/articles/eurostat_tutorial.html","id":"citing-the-eurostat-r-package","dir":"Articles","previous_headings":"Citations and related work","what":"Citing the eurostat R package","title":"Tutorial for the eurostat R package","text":"main developers contributors, see package homepage. work can freely used, modified distributed BSD-2-clause (modified FreeBSD) license:","code":"citation(\"eurostat\") ## Kindly cite the eurostat R package as follows: ## ## (C) Leo Lahti, Janne Huovari, Markus Kainu, Przemyslaw Biecek. ## Retrieval and analysis of Eurostat open data with the eurostat ## package. R Journal 9(1):385-392, 2017. doi: 10.32614/RJ-2017-019 ## Package URL: http://ropengov.github.io/eurostat Article URL: ## https://journal.r-project.org/archive/2017/RJ-2017-019/index.html ## ## A BibTeX entry for LaTeX users is ## ## @Article{, ## title = {Retrieval and Analysis of Eurostat Open Data with the eurostat Package}, ## author = {Leo Lahti and Janne Huovari and Markus Kainu and Przemyslaw Biecek}, ## journal = {The R Journal}, ## volume = {9}, ## number = {1}, ## pages = {385--392}, ## year = {2017}, ## doi = {10.32614/RJ-2017-019}, ## url = {https://doi.org/10.32614/RJ-2017-019}, ## }"},{"path":"https://ropengov.github.io/eurostat/articles/eurostat_tutorial.html","id":"contact","dir":"Articles","previous_headings":"Citations and related work","what":"Contact","title":"Tutorial for the eurostat R package","text":"contact information, see package homepage.","code":""},{"path":"https://ropengov.github.io/eurostat/articles/eurostat_tutorial.html","id":"version-info","dir":"Articles","previous_headings":"","what":"Version info","title":"Tutorial for the eurostat R package","text":"tutorial created ","code":"sessionInfo() ## R version 4.3.1 (2023-06-16) ## 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] eurostat_3.8.3 knitr_1.43 ## ## loaded via a namespace (and not attached): ## [1] xfun_0.40 bslib_0.5.1 tzdb_0.4.0 vctrs_0.6.3 ## [5] tools_4.3.1 ISOweek_0.6-2 generics_0.1.3 curl_5.0.2 ## [9] parallel_4.3.1 tibble_3.2.1 proxy_0.4-27 fansi_1.0.4 ## [13] RefManageR_1.4.0 pkgconfig_2.0.3 KernSmooth_2.23-21 desc_1.4.2 ## [17] readxl_1.4.3 assertthat_0.2.1 lifecycle_1.0.3 compiler_4.3.1 ## [21] stringr_1.5.0 textshaping_0.3.6 htmltools_0.5.6 class_7.3-22 ## [25] sass_0.4.7 yaml_2.3.7 pillar_1.9.0 pkgdown_2.0.7 ## [29] crayon_1.5.2 jquerylib_0.1.4 tidyr_1.3.0 regions_0.1.8 ## [33] classInt_0.4-9 cachem_1.0.8 countrycode_1.5.0 tidyselect_1.2.0 ## [37] digest_0.6.33 stringi_1.7.12 dplyr_1.1.2 purrr_1.0.2 ## [41] bibtex_0.5.1 rprojroot_2.0.3 fastmap_1.1.1 here_1.0.1 ## [45] cli_3.6.1 magrittr_2.0.3 utf8_1.2.3 broom_1.0.5 ## [49] e1071_1.7-13 readr_2.1.4 backports_1.4.1 bit64_4.0.5 ## [53] lubridate_1.9.2 timechange_0.2.0 rmarkdown_2.24 httr_1.4.7 ## [57] bit_4.0.5 cellranger_1.1.0 ragg_1.2.5 hms_1.1.3 ## [61] memoise_2.0.1 evaluate_0.21 rlang_1.1.1 Rcpp_1.0.11 ## [65] glue_1.6.2 xml2_1.3.5 vroom_1.6.3 jsonlite_1.8.7 ## [69] R6_2.5.1 plyr_1.8.8 systemfonts_1.0.4 fs_1.6.3"},{"path":"https://ropengov.github.io/eurostat/articles/mapping.html","id":"choropleth-map","dir":"Articles","previous_headings":"","what":"Choropleth Map","title":"Mapping Regional Data, Mapping Metadata Problems","text":"Let us try place data ggplot2 map. Let us download map get_eurostat_geospatial. use NUTS2016, .e., year = 2016, regional boundary definition set 2016 used period 2018-2020. used definition 2021. always join data geometric information regions starting left map: Huge parts Europe covered, missing values randomly missing. France went regional reform; Turkey Albania provide data earlier. Ireland regional statistics available.","code":"library(ggplot2) map_nuts_2 <- eurostat::get_eurostat_geospatial( resolution = \"60\", nuts_level = \"2\", year = 2016 ) #> Loading required namespace: sf #> sf at resolution 1:60 read from local file #> Warning in eurostat::get_eurostat_geospatial(resolution = \"60\", nuts_level = #> \"2\", : Default of 'make_valid' for 'output_class=\"sf\"' will be changed in the #> future (see function details). indicator_with_map <- map_nuts_2 %>% left_join(regional_rd_personnel, by = \"geo\") indicator_with_map %>% ggplot() + geom_sf(aes(fill = values), color = \"dim grey\", size = .1 ) + scale_fill_gradient(low = \"#FAE000\", high = \"#00843A\") + facet_wrap(facets = \"time\") + labs( title = \"R&D Personnel & Researchers\", subtitle = \"In all sectors, both sexes by NUTS 2 regions\", caption = \"\\ua9 EuroGeographics for the administrative boundaries \\ua9 Tutorial and ready-to-use data on economy.dataobservatory.eu\", fill = NULL ) + theme_light() + theme(legend.position = \"none\") + coord_sf(xlim = c(-22, 48), ylim = c(34, 70))"},{"path":"https://ropengov.github.io/eurostat/articles/mapping.html","id":"missing-values-and-seemingly-missing-values","dir":"Articles","previous_headings":"","what":"Missing Values and Seemingly Missing Values","title":"Mapping Regional Data, Mapping Metadata Problems","text":"problems real missing data problems, coding problem. words, data , conforming boundaries NUTS2016 map. First need validate geographical coding dataset. task validate_nuts_regions(). validate dataset, see many interesting metadata observations. Even though dataset called R&D personnel researchers sector performance, sex NUTS 2 regions (rd_p_persreg), fact, contains data country NUTS1 levels. data non-EU countries 2009 part NUTS system. situation better 2018: dataset plagued data place NUTS2016 boundary definition, therefore NUTS2016 map! non-conforming bits? Plenty French units. France went regional administrative reform, data past, current boundaries coding. lesser extent, problem Poland UK. comparative data Asia country level, ended regional dataset. Norway, member EEA, 2021 officially part NUTS2021 system. nice provide data consistently past. aggregates like entire EU eurozone.","code":"validated_indicator <- regions::validate_nuts_regions(regional_rd_personnel) library(dplyr) validation_summary_2016 <- validated_indicator %>% group_by(.data$time, .data$typology) %>% summarize( observations = n(), values_missing = sum(is.na(.data$values)), values_present = sum(!is.na(.data$values)), valid_present = values_present / observations ) validation_summary_2016 %>% ungroup() %>% filter(.data$time == \"2009\") #> # A tibble: 7 × 6 #> time typology observations values_missing values_present valid_present #> #> 1 2009 country 28 1 27 0.964 #> 2 2009 non_eu_country 7 2 5 0.714 #> 3 2009 non_eu_nuts_le… 7 4 3 0.429 #> 4 2009 non_eu_nuts_le… 10 5 5 0.5 #> 5 2009 nuts_level_1 105 14 91 0.867 #> 6 2009 nuts_level_2 265 49 216 0.815 #> 7 2009 NA 56 3 53 0.946 validation_summary_2016 %>% ungroup() %>% filter(.data$time == \"2018\") #> # A tibble: 7 × 6 #> time typology observations values_missing values_present valid_present #> #> 1 2018 country 28 0 28 1 #> 2 2018 non_eu_country 7 1 6 0.857 #> 3 2018 non_eu_nuts_le… 7 1 6 0.857 #> 4 2018 non_eu_nuts_le… 10 0 10 1 #> 5 2018 nuts_level_1 105 45 60 0.571 #> 6 2018 nuts_level_2 265 113 152 0.574 #> 7 2018 NA 56 45 11 0.196 validated_indicator %>% filter(!.data$valid_2016) %>% select(all_of(\"geo\")) %>% unlist() %>% as.character() #> [1] \"BA\" \"BA\" \"CN_X_HK\" \"CN_X_HK\" \"EA19\" \"EA19\" #> [7] \"EU27_2020\" \"EU27_2020\" \"EU28\" \"EU28\" \"FR2\" \"FR2\" #> [13] \"FR21\" \"FR21\" \"FR22\" \"FR22\" \"FR23\" \"FR23\" #> [19] \"FR24\" \"FR24\" \"FR25\" \"FR25\" \"FR26\" \"FR26\" #> [25] \"FR3\" \"FR3\" \"FR30\" \"FR30\" \"FR4\" \"FR4\" #> [31] \"FR41\" \"FR41\" \"FR42\" \"FR42\" \"FR43\" \"FR43\" #> [37] \"FR5\" \"FR5\" \"FR51\" \"FR51\" \"FR52\" \"FR52\" #> [43] \"FR53\" \"FR53\" \"FR6\" \"FR6\" \"FR61\" \"FR61\" #> [49] \"FR62\" \"FR62\" \"FR63\" \"FR63\" \"FR7\" \"FR7\" #> [55] \"FR71\" \"FR71\" \"FR72\" \"FR72\" \"FR8\" \"FR8\" #> [61] \"FR81\" \"FR81\" \"FR82\" \"FR82\" \"FR83\" \"FR83\" #> [67] \"FRA\" \"FRA\" \"HR02\" \"HR02\" \"HU10\" \"HU10\" #> [73] \"IE01\" \"IE01\" \"IE02\" \"IE02\" \"JP\" \"JP\" #> [79] \"KR\" \"KR\" \"LT00\" \"LT00\" \"NO01\" \"NO01\" #> [85] \"NO03\" \"NO03\" \"NO04\" \"NO04\" \"NO05\" \"NO05\" #> [91] \"PL1\" \"PL1\" \"PL11\" \"PL11\" \"PL12\" \"PL12\" #> [97] \"PL3\" \"PL3\" \"PL31\" \"PL31\" \"PL32\" \"PL32\" #> [103] \"PL33\" \"PL33\" \"PL34\" \"PL34\" \"RU\" \"RU\" #> [109] \"UKM2\" \"UKM2\" \"UKM3\" \"UKM3\""},{"path":"https://ropengov.github.io/eurostat/articles/mapping.html","id":"recoding-and-renaming","dir":"Articles","previous_headings":"","what":"Recoding and Renaming","title":"Mapping Regional Data, Mapping Metadata Problems","text":"question , can save French data? boundaries regions changed, : somebody must reaggregate number researchers used work newly defined region back , reform. cases, regional boundaries change, name code region, task performed recode_nuts(): Let us take look problems identified regions::recode_nuts(): able recode quite data points NUTS2016 definition time observation 2009 well 2018. Sometimes recoding rows missing values, help much: know data , missing anyway. particularly year 2009 can save plenty data recorded obsolete coding. identify problems. coding used various time periods, clear recoding possibility, regions boundaries changed. history data, need recalculate , say, adding R&D personnel settlement new regional boundary. following non-empty cases present dataset, just coding used 2018-2020 period (.e., NUTS2016 coding.) able save 27 observations just fixing regional codes! , let us trick: change geo variable code_2016, , whenever equivalent geo code NUTS2016 definition, data . original geo variable contains codes used, example, NUTS2010 NUTS2013 boundary definitions. Let us make work visible creating three observation type variables: missing present dataset; correctly coded recoding; became visible recoding. let’s place now map:","code":"recoded_indicator <- regional_rd_personnel %>% regions::recode_nuts( geo_var = \"geo\", # your geograhical ID variable name nuts_year = 2016 # change this for other definitions ) recoding_summary <- recoded_indicator %>% mutate(observations = nrow(.data)) %>% mutate(typology_change = ifelse(grepl(\"Recoded\", .data$typology_change), yes = \"Recoded\", no = .data$typology_change )) %>% group_by(.data$typology_change, .data$time) %>% summarize( values_missing = sum(is.na(.data$values)), values_present = sum(!is.na(.data$values)), pct = values_present / (values_present + values_missing) ) recoding_summary #> # A tibble: 12 × 5 #> # Groups: typology_change [6] #> typology_change time values_missing values_present pct #> #> 1 Not found in NUTS 2009 1 11 0.917 #> 2 Not found in NUTS 2018 1 11 0.917 #> 3 Recoded 2009 12 42 0.778 #> 4 Recoded 2018 32 22 0.407 #> 5 Used in NUTS 1999-2013 2009 1 7 0.875 #> 6 Used in NUTS 1999-2013 2018 8 0 0 #> 7 Used in NUTS 2006-2013 2009 0 5 1 #> 8 Used in NUTS 2006-2013 2018 5 0 0 #> 9 Used in NUTS 2021-2021 2009 0 1 1 #> 10 Used in NUTS 2021-2021 2018 1 0 0 #> 11 unchanged 2009 64 334 0.839 #> 12 unchanged 2018 158 240 0.603 recoded_indicator %>% filter(.data$typology == \"nuts_level_2\") %>% filter(!is.na(.data$typology_change)) %>% filter( # Keep only pairs where we actually save # non-missing observations !is.na(values) ) %>% distinct(.data$geo, .data$code_2016) %>% filter( # We filter out cases of countries who # joined the NUTS system later .data$geo != .data$code_2016 ) #> # A tibble: 27 × 2 #> geo code_2016 #> #> 1 FR21 FRF2 #> 2 FR22 FRE2 #> 3 FR23 FRD2 #> 4 FR24 FRB0 #> 5 FR25 FRD1 #> 6 FR26 FRC1 #> 7 FR3 FRE1 #> 8 FR30 FRE1 #> 9 FR41 FRF3 #> 10 FR42 FRF1 #> # ℹ 17 more rows recoded_with_map <- map_nuts_2 %>% left_join( recoded_indicator %>% mutate(geo = .data$code_2016), by = \"geo\" ) regional_rd_personnel_recoded <- recoded_indicator %>% mutate(geo = .data$code_2016) %>% rename(values_2016 = .data$values) %>% select(-all_of(c(\"typology\", \"typology_change\", \"code_2016\"))) %>% full_join( regional_rd_personnel, by = c(\"prof_pos\", \"sex\", \"sectperf\", \"unit\", \"geo\", \"time\") ) %>% mutate(type = case_when( is.na(.data$values_2016) & is.na(.data$values) ~ \"missing\", is.na(.data$values) ~ \"after\", TRUE ~ \"before\" )) #> Warning: Use of .data in tidyselect expressions was deprecated in tidyselect 1.2.0. #> ℹ Please use `\"values\"` instead of `.data$values` #> This warning is displayed once every 8 hours. #> Call `lifecycle::last_lifecycle_warnings()` to see where this warning was #> generated. map_nuts_2 %>% left_join(regional_rd_personnel_recoded, by = \"geo\") %>% filter( # remove completely missing cases !is.na(.data$time) ) %>% ggplot() + geom_sf(aes(fill = type), color = \"dim grey\", size = .1 ) + scale_fill_manual(values = c(\"#FAE000\", \"#007CBB\", \"grey70\")) + guides(fill = guide_legend(reverse = T, title = NULL)) + facet_wrap(facets = \"time\") + labs( title = \"R&D Personnel & Researchers\", subtitle = \"In all sectors, both sexes by NUTS 2 regions\", caption = \"\\ua9 EuroGeographics for the administrative boundaries \\ua9 Daniel Antal, rOpenGov\", fill = NULL ) + theme_light() + theme(legend.position = c(.93, .7)) + coord_sf(xlim = c(-22, 48), ylim = c(34, 70))"},{"path":"https://ropengov.github.io/eurostat/articles/mapping.html","id":"conclusion","dir":"Articles","previous_headings":"","what":"Conclusion","title":"Mapping Regional Data, Mapping Metadata Problems","text":"improve dataset, improvement worked traditional imputation techniques well. example, replacing missing French data median value Europe created huge bias dataset. example simplification. many territorial typologies use Europe globally, main takeaway clear: sub-national boundaries changing fast, must make sure join datasets, data map boundary definitions.","code":""},{"path":[]},{"path":"https://ropengov.github.io/eurostat/articles/mapping.html","id":"citing-the-data-sources","dir":"Articles","previous_headings":"Citations and related work","what":"Citing the data sources","title":"Mapping Regional Data, Mapping Metadata Problems","text":"Eurostat data: cite Eurostat. Administrative boundaries: cite EuroGeographics.","code":""},{"path":"https://ropengov.github.io/eurostat/articles/mapping.html","id":"citing-the-eurostat-r-package","dir":"Articles","previous_headings":"Citations and related work","what":"Citing the eurostat R package","title":"Mapping Regional Data, Mapping Metadata Problems","text":"main developers contributors, see package homepage. work can freely used, modified distributed BSD-2-clause (modified FreeBSD) license:","code":"citation(\"eurostat\") #> Kindly cite the eurostat R package as follows: #> #> (C) Leo Lahti, Janne Huovari, Markus Kainu, Przemyslaw Biecek. #> Retrieval and analysis of Eurostat open data with the eurostat #> package. R Journal 9(1):385-392, 2017. doi: 10.32614/RJ-2017-019 #> Package URL: http://ropengov.github.io/eurostat Article URL: #> https://journal.r-project.org/archive/2017/RJ-2017-019/index.html #> #> A BibTeX entry for LaTeX users is #> #> @Article{, #> title = {Retrieval and Analysis of Eurostat Open Data with the eurostat Package}, #> author = {Leo Lahti and Janne Huovari and Markus Kainu and Przemyslaw Biecek}, #> journal = {The R Journal}, #> volume = {9}, #> number = {1}, #> pages = {385--392}, #> year = {2017}, #> doi = {10.32614/RJ-2017-019}, #> url = {https://doi.org/10.32614/RJ-2017-019}, #> }"},{"path":"https://ropengov.github.io/eurostat/articles/mapping.html","id":"citing-the-regions-r-package","dir":"Articles","previous_headings":"Citations and related work","what":"Citing the regions R package","title":"Mapping Regional Data, Mapping Metadata Problems","text":"main developer contributors, see package. work can freely used, modified distributed GPL-3 license:","code":"citation(\"regions\") #> To cite package 'regions' in publications use: #> #> Antal D (2021). _regions: Processing Regional Statistics_. R package #> version 0.1.8, . #> #> A BibTeX entry for LaTeX users is #> #> @Manual{, #> title = {regions: Processing Regional Statistics}, #> author = {Daniel Antal}, #> year = {2021}, #> note = {R package version 0.1.8}, #> url = {https://regions.dataobservatory.eu/}, #> }"},{"path":"https://ropengov.github.io/eurostat/articles/mapping.html","id":"contact","dir":"Articles","previous_headings":"Citations and related work","what":"Contact","title":"Mapping Regional Data, Mapping Metadata Problems","text":"contact information, see package homepage.","code":""},{"path":"https://ropengov.github.io/eurostat/articles/mapping.html","id":"version-info","dir":"Articles","previous_headings":"","what":"Version info","title":"Mapping Regional Data, Mapping Metadata Problems","text":"tutorial created ","code":"sessionInfo() #> R version 4.3.1 (2023-06-16) #> 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] ggplot2_3.4.3 dplyr_1.1.2 eurostat_3.8.3 regions_0.1.8 #> #> loaded via a namespace (and not attached): #> [1] gtable_0.3.4 xfun_0.40 bslib_0.5.1 tzdb_0.4.0 #> [5] vctrs_0.6.3 tools_4.3.1 ISOweek_0.6-2 generics_0.1.3 #> [9] curl_5.0.2 tibble_3.2.1 proxy_0.4-27 fansi_1.0.4 #> [13] highr_0.10 RefManageR_1.4.0 pkgconfig_2.0.3 KernSmooth_2.23-21 #> [17] desc_1.4.2 readxl_1.4.3 assertthat_0.2.1 lifecycle_1.0.3 #> [21] farver_2.1.1 compiler_4.3.1 stringr_1.5.0 textshaping_0.3.6 #> [25] munsell_0.5.0 htmltools_0.5.6 class_7.3-22 sass_0.4.7 #> [29] yaml_2.3.7 crayon_1.5.2 pillar_1.9.0 pkgdown_2.0.7 #> [33] jquerylib_0.1.4 tidyr_1.3.0 classInt_0.4-9 cachem_1.0.8 #> [37] countrycode_1.5.0 tidyselect_1.2.0 digest_0.6.33 stringi_1.7.12 #> [41] sf_1.0-14 purrr_1.0.2 grid_4.3.1 bibtex_0.5.1 #> [45] rprojroot_2.0.3 fastmap_1.1.1 colorspace_2.1-0 here_1.0.1 #> [49] cli_3.6.1 magrittr_2.0.3 utf8_1.2.3 broom_1.0.5 #> [53] e1071_1.7-13 withr_2.5.0 readr_2.1.4 scales_1.2.1 #> [57] backports_1.4.1 lubridate_1.9.2 timechange_0.2.0 rmarkdown_2.24 #> [61] httr_1.4.7 cellranger_1.1.0 ragg_1.2.5 hms_1.1.3 #> [65] memoise_2.0.1 evaluate_0.21 knitr_1.43 rlang_1.1.1 #> [69] Rcpp_1.0.11 DBI_1.1.3 glue_1.6.2 xml2_1.3.5 #> [73] jsonlite_1.8.7 R6_2.5.1 plyr_1.8.8 units_0.8-3 #> [77] systemfonts_1.0.4 fs_1.6.3"},{"path":"https://ropengov.github.io/eurostat/articles/maps.html","id":"r-tools-for-eurostat-open-data-maps","dir":"Articles","previous_headings":"","what":"R Tools for Eurostat Open Data: maps","title":"Map examples for the eurostat R package","text":"rOpenGov R package provides tools access Eurostat database, can also browse -line data sets documentation. contact information source code, see package website. See eurostat vignette installation basic use.","code":""},{"path":"https://ropengov.github.io/eurostat/articles/maps.html","id":"maps","dir":"Articles","previous_headings":"R Tools for Eurostat Open Data: maps","what":"Maps","title":"Map examples for the eurostat R package","text":"NOTE: recommend check also giscoR package (https://dieghernan.github.io/giscoR/). another API package provides R tools Eurostat geographic data support geospatial analysis visualization.","code":""},{"path":"https://ropengov.github.io/eurostat/articles/maps.html","id":"disposable-income-of-private-households-by-nuts-2-regions-at-160mln-resolution-using-tmap","dir":"Articles","previous_headings":"R Tools for Eurostat Open Data: maps > Maps","what":"Disposable income of private households by NUTS 2 regions at 1:60mln resolution using tmap","title":"Map examples for the eurostat R package","text":"mapping examples use tmap package. Construct map Interactive maps can generated well","code":"library(dplyr) #> #> Attaching package: 'dplyr' #> The following objects are masked from 'package:stats': #> #> filter, lag #> The following objects are masked from 'package:base': #> #> intersect, setdiff, setequal, union library(eurostat) library(sf) #> Linking to GEOS 3.10.2, GDAL 3.4.1, PROJ 8.2.1; sf_use_s2() is TRUE library(tmap) #> The legacy packages maptools, rgdal, and rgeos, underpinning the sp package, #> which was just loaded, will retire in October 2023. #> Please refer to R-spatial evolution reports for details, especially #> https://r-spatial.org/r/2023/05/15/evolution4.html. #> It may be desirable to make the sf package available; #> package maintainers should consider adding sf to Suggests:. #> The sp package is now running under evolution status 2 #> (status 2 uses the sf package in place of rgdal) # Download attribute data from Eurostat sp_data <- eurostat::get_eurostat(\"tgs00026\", time_format = \"raw\" ) %>% # subset to have only a single row per geo dplyr::filter(time == 2010, nchar(geo) == 4) %>% # categorise dplyr::mutate(income = cut_to_classes(values, n = 5)) # Download geospatial data from GISCO geodata <- get_eurostat_geospatial( output_class = \"sf\", resolution = \"60\", nuts_level = 2, year = 2013 ) #> Object cached at /tmp/Rtmp6OM9cZ/eurostat/sf60220134326.RData #> sf at resolution 1: 60 cached at: /tmp/Rtmp6OM9cZ/eurostat/sf60220134326.RData #> Warning in get_eurostat_geospatial(output_class = \"sf\", resolution = \"60\", : #> Default of 'make_valid' for 'output_class=\"sf\"' will be changed in the future #> (see function details). # merge with attribute data with geodata map_data <- inner_join(geodata, sp_data) #> Joining with `by = join_by(geo)` # Fix / remove some broken entries for the demo purpose geodata <- sf::st_make_valid(geodata) geodata <- geodata[sf::st_is_valid(geodata), ] # Create and plot the map map1 <- tmap::tm_shape(geodata) + tmap::tm_fill(\"lightgrey\") + tmap::tm_shape(map_data) + tmap::tm_grid() + tmap::tm_polygons(\"income\", title = \"Disposable household\\nincomes in 2010\", palette = \"Oranges\" ) print(map1) # Interactive tmap_mode(\"view\") map1 # Set the mode back to normal plotting tmap_mode(\"plot\") print(map1)"},{"path":"https://ropengov.github.io/eurostat/articles/maps.html","id":"disposable-income-of-private-households-by-nuts-2-regions-in-poland-with-labels-at-11mln-resolution-using-tmap","dir":"Articles","previous_headings":"R Tools for Eurostat Open Data: maps > Maps","what":"Disposable income of private households by NUTS 2 regions in Poland with labels at 1:1mln resolution using tmap","title":"Map examples for the eurostat R package","text":"","code":"library(eurostat) library(dplyr) library(sf) library(RColorBrewer) # Downloading and manipulating the tabular data print(\"Let us focus on year 2014 and NUTS-3 level\") #> [1] \"Let us focus on year 2014 and NUTS-3 level\" euro_sf2 <- get_eurostat(\"tgs00026\", time_format = \"raw\", filter = list(time = \"2014\") ) %>% # Subset to NUTS-3 level dplyr::filter(grepl(\"PL\", geo)) %>% # label the single geo column mutate( label = paste0(label_eurostat(.)[[\"geo\"]], \"\\n\", values, \"€\"), income = cut_to_classes(values) ) #> Table tgs00026 cached at /tmp/Rtmp6OM9cZ/eurostat/tgs00026_raw_code_FF.rds print(\"Download geospatial data from GISCO\") #> [1] \"Download geospatial data from GISCO\" geodata <- get_eurostat_geospatial(output_class = \"sf\", resolution = \"60\", nuts_level = 2, year = 2013) #> Object cached at /tmp/Rtmp6OM9cZ/eurostat/sf60220134326.RData #> Reading cache file /tmp/Rtmp6OM9cZ/eurostat/sf60220134326.RData #> sf at resolution 1: 60 from year 2013 read from cache file: /tmp/Rtmp6OM9cZ/eurostat/sf60220134326.RData # Merge with attribute data with geodata map_data <- inner_join(geodata, euro_sf2) #> Joining with `by = join_by(geo)` # Fix / remove some broken entries for the demo purpose geodata <- sf::st_make_valid(geodata) geodata <- geodata[sf::st_is_valid(geodata), ] # plot map library(tmap) map2 <- tm_shape(geodata) + tm_fill(\"lightgrey\") + tm_shape(map_data, is.master = TRUE) + tm_polygons(\"income\", title = \"Disposable household incomes in 2014\", palette = \"Oranges\", border.col = \"white\" ) + tm_text(\"NUTS_NAME\", just = \"center\") + tm_scale_bar() map2"},{"path":"https://ropengov.github.io/eurostat/articles/maps.html","id":"disposable-income-of-private-households-by-nuts-2-regions-at-110mln-resolution-using-spplot","dir":"Articles","previous_headings":"R Tools for Eurostat Open Data: maps > Maps","what":"Disposable income of private households by NUTS 2 regions at 1:10mln resolution using spplot","title":"Map examples for the eurostat R package","text":"","code":"library(sp) library(eurostat) library(dplyr) library(RColorBrewer) dat <- get_eurostat(\"tgs00026\", time_format = \"raw\") %>% # subsetting to year 2014 and NUTS-2 level dplyr::filter(time == 2014, nchar(geo) == 4) %>% # classifying the values the variable dplyr::mutate(cat = cut_to_classes(values)) # Download geospatial data from GISCO geodata <- get_eurostat_geospatial(output_class = \"spdf\", resolution = \"10\", nuts_level = 2, year = 2013) # merge with attribute data with geodata geodata@data <- left_join(geodata@data, dat) # plot map sp::spplot( obj = geodata, \"cat\", main = \"Disposable household income\", xlim = c(-22, 34), ylim = c(35, 70), col.regions = c(\"dim grey\", brewer.pal(n = 5, name = \"Oranges\")), col = \"white\", usePolypath = FALSE )"},{"path":"https://ropengov.github.io/eurostat/articles/maps.html","id":"disposable-income-of-private-households-by-nuts-2-regions-at-160mln-resolution-using-ggplot2","dir":"Articles","previous_headings":"R Tools for Eurostat Open Data: maps > Maps","what":"Disposable income of private households by NUTS 2 regions at 1:60mln resolution using ggplot2","title":"Map examples for the eurostat R package","text":"Meanwhile CRAN version ggplot2 lacking support simple features, can plot maps ggplot2 downloading geospatial data data.frame output_class argument set df.","code":"# Disposable income of private households by NUTS 2 regions at 1:60mln res library(eurostat) library(dplyr) library(ggplot2) data_eurostat <- get_eurostat(\"tgs00026\", time_format = \"raw\") %>% dplyr::filter(time == 2018, nchar(geo) == 4) %>% # classifying the values the variable dplyr::mutate(cat = cut_to_classes(values)) # Download geospatial data from GISCO data_geo <- get_eurostat_geospatial(resolution = \"60\", nuts_level = \"2\", year = 2021) #> Object cached at /tmp/Rtmp6OM9cZ/eurostat/sf60220214326.RData #> sf at resolution 1: 60 cached at: /tmp/Rtmp6OM9cZ/eurostat/sf60220214326.RData #> Warning in get_eurostat_geospatial(resolution = \"60\", nuts_level = \"2\", : #> Default of 'make_valid' for 'output_class=\"sf\"' will be changed in the future #> (see function details). # merge with attribute data with geodata data <- inner_join(data_geo, data_eurostat) #> Joining with `by = join_by(geo)` ## Joining, by = \"geo\" ggplot(data = data) + geom_sf(aes(fill = cat), color = \"dim grey\", size = 0.1) + scale_fill_brewer(palette = \"Oranges\") + guides(fill = guide_legend(reverse = TRUE, title = \"euro\")) + labs( title = \"Disposable household income in 2018\", caption = \"(C) EuroGeographics for the administrative boundaries Map produced in R with data from Eurostat-package \" ) + theme_light() + theme(legend.position = c(.8, .8)) + coord_sf(xlim = c(-12, 44), ylim = c(35, 70))"},{"path":[]},{"path":"https://ropengov.github.io/eurostat/articles/maps.html","id":"citing-the-data-sources","dir":"Articles","previous_headings":"Citations and related work","what":"Citing the data sources","title":"Map examples for the eurostat R package","text":"Eurostat data: cite Eurostat. Administrative boundaries: cite EuroGeographics","code":""},{"path":"https://ropengov.github.io/eurostat/articles/maps.html","id":"citing-the-eurostat-r-package","dir":"Articles","previous_headings":"Citations and related work","what":"Citing the eurostat R package","title":"Map examples for the eurostat R package","text":"main developers contributors, see package homepage. work can freely used, modified distributed BSD-2-clause (modified FreeBSD) license:","code":"citation(\"eurostat\") #> Kindly cite the eurostat R package as follows: #> #> (C) Leo Lahti, Janne Huovari, Markus Kainu, Przemyslaw Biecek. #> Retrieval and analysis of Eurostat open data with the eurostat #> package. R Journal 9(1):385-392, 2017. doi: 10.32614/RJ-2017-019 #> Package URL: http://ropengov.github.io/eurostat Article URL: #> https://journal.r-project.org/archive/2017/RJ-2017-019/index.html #> #> A BibTeX entry for LaTeX users is #> #> @Article{, #> title = {Retrieval and Analysis of Eurostat Open Data with the eurostat Package}, #> author = {Leo Lahti and Janne Huovari and Markus Kainu and Przemyslaw Biecek}, #> journal = {The R Journal}, #> volume = {9}, #> number = {1}, #> pages = {385--392}, #> year = {2017}, #> doi = {10.32614/RJ-2017-019}, #> url = {https://doi.org/10.32614/RJ-2017-019}, #> }"},{"path":"https://ropengov.github.io/eurostat/articles/maps.html","id":"contact","dir":"Articles","previous_headings":"Citations and related work","what":"Contact","title":"Map examples for the eurostat R package","text":"contact information, see package homepage.","code":""},{"path":"https://ropengov.github.io/eurostat/articles/maps.html","id":"version-info","dir":"Articles","previous_headings":"","what":"Version info","title":"Map examples for the eurostat R package","text":"tutorial created ","code":"sessionInfo() #> R version 4.3.1 (2023-06-16) #> 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] ggplot2_3.4.3 RColorBrewer_1.1-3 tmap_3.3-3 sf_1.0-14 #> [5] dplyr_1.1.2 eurostat_3.8.3 #> #> loaded via a namespace (and not attached): #> [1] DBI_1.1.3 tmaptools_3.1-1 s2_1.1.4 #> [4] readxl_1.4.3 rlang_1.1.1 magrittr_2.0.3 #> [7] e1071_1.7-13 compiler_4.3.1 png_0.1-8 #> [10] systemfonts_1.0.4 vctrs_0.6.3 stringr_1.5.0 #> [13] pkgconfig_2.0.3 wk_0.8.0 crayon_1.5.2 #> [16] fastmap_1.1.1 backports_1.4.1 lwgeom_0.2-13 #> [19] leafem_0.2.0 ISOweek_0.6-2 utf8_1.2.3 #> [22] rmarkdown_2.24 tzdb_0.4.0 ragg_1.2.5 #> [25] purrr_1.0.2 bit_4.0.5 xfun_0.40 #> [28] cachem_1.0.8 jsonlite_1.8.7 RefManageR_1.4.0 #> [31] highr_0.10 terra_1.7-39 broom_1.0.5 #> [34] parallel_4.3.1 R6_2.5.1 bslib_0.5.1 #> [37] stringi_1.7.12 lubridate_1.9.2 jquerylib_0.1.4 #> [40] cellranger_1.1.0 stars_0.6-3 Rcpp_1.0.11 #> [43] assertthat_0.2.1 knitr_1.43 base64enc_0.1-3 #> [46] readr_2.1.4 timechange_0.2.0 tidyselect_1.2.0 #> [49] dichromat_2.0-0.1 abind_1.4-5 yaml_2.3.7 #> [52] codetools_0.2-19 curl_5.0.2 lattice_0.21-8 #> [55] tibble_3.2.1 leafsync_0.1.0 plyr_1.8.8 #> [58] withr_2.5.0 evaluate_0.21 desc_1.4.2 #> [61] units_0.8-3 proxy_0.4-27 xml2_1.3.5 #> [64] pillar_1.9.0 KernSmooth_2.23-21 generics_0.1.3 #> [67] vroom_1.6.3 rprojroot_2.0.3 sp_2.0-0 #> [70] hms_1.1.3 munsell_0.5.0 regions_0.1.8 #> [73] scales_1.2.1 class_7.3-22 glue_1.6.2 #> [76] tools_4.3.1 fs_1.6.3 XML_3.99-0.14 #> [79] Cairo_1.6-1 grid_4.3.1 tidyr_1.3.0 #> [82] bibtex_0.5.1 crosstalk_1.2.0 colorspace_2.1-0 #> [85] raster_3.6-23 cli_3.6.1 textshaping_0.3.6 #> [88] fansi_1.0.4 viridisLite_0.4.2 countrycode_1.5.0 #> [91] gtable_0.3.4 sass_0.4.7 digest_0.6.33 #> [94] classInt_0.4-9 farver_2.1.1 htmlwidgets_1.6.2 #> [97] memoise_2.0.1 htmltools_0.5.6 pkgdown_2.0.7 #> [100] lifecycle_1.0.3 leaflet_2.1.2 httr_1.4.7 #> [103] here_1.0.1 bit64_4.0.5"},{"path":"https://ropengov.github.io/eurostat/articles/vignette.html","id":"installation","dir":"Articles","previous_headings":"","what":"Installation","title":"Vignette for the eurostat R package","text":"Release version (CRAN): Development version (Github): Load package: detailed examples use package, see online tutorial.","code":"install.packages(\"eurostat\") library(remotes) remotes::install_github(\"ropengov/eurostat\")"},{"path":"https://ropengov.github.io/eurostat/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Leo Lahti. Author, maintainer. Janne Huovari. Author. Markus Kainu. Author. Przemyslaw Biecek. Author. Daniel Antal. Contributor. Diego Hernangomez. Contributor. Joona Lehtomaki. Contributor. Francois Briatte. Contributor. Reto Stauffer. Contributor. Paul Rougieux. Contributor. Anna Vasylytsya. Contributor. Oliver Reiter. Contributor. Pyry Kantanen. Contributor. Enrico Spinielli. Contributor.","code":""},{"path":"https://ropengov.github.io/eurostat/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"(C) Leo Lahti, Janne Huovari, Markus Kainu, Przemyslaw Biecek. Retrieval analysis Eurostat open data eurostat package. R Journal 9(1):385-392, 2017. doi: 10.32614/RJ-2017-019 Package URL: http://ropengov.github.io/eurostat Article URL: https://journal.r-project.org/archive/2017/RJ-2017-019/index.html","code":"@Article{, title = {Retrieval and Analysis of Eurostat Open Data with the eurostat Package}, author = {Leo Lahti and Janne Huovari and Markus Kainu and Przemyslaw Biecek}, journal = {The R Journal}, volume = {9}, number = {1}, pages = {385--392}, year = {2017}, doi = {10.32614/RJ-2017-019}, url = {https://doi.org/10.32614/RJ-2017-019}, }"},{"path":"https://ropengov.github.io/eurostat/index.html","id":"eurostat-r-package-","dir":"","previous_headings":"","what":"Tools for Eurostat Open Data","title":"Tools for Eurostat Open Data","text":"R tools access open data Eurostat. Data search, download, manipulation visualization.","code":""},{"path":"https://ropengov.github.io/eurostat/index.html","id":"installation-and-use","dir":"","previous_headings":"","what":"Installation and use","title":"Tools for Eurostat Open Data","text":"Install stable version CRAN: Alternatively, install development version GitHub: Development version can also installed using r-universe: package provides several different ways get datasets Eurostat. Searching data one way, know look . See Tutorial resources package homepage information examples.","code":"install.packages(\"eurostat\") # Install from GitHub library(devtools) devtools::install_github(\"ropengov/eurostat\") # Enable this universe options(repos = c( ropengov = \"https://ropengov.r-universe.dev\", CRAN = \"https://cloud.r-project.org\" )) install.packages(\"eurostat\") # Load the package library(eurostat) # Perform a simple search and print a table passengers <- search_eurostat(\"passenger transport\") knitr::kable(head(passengers))"},{"path":"https://ropengov.github.io/eurostat/index.html","id":"recommended-packages","dir":"","previous_headings":"","what":"Recommended packages","title":"Tools for Eurostat Open Data","text":"recommended install giscoR package (https://dieghernan.github.io/giscoR/). another API package provides R tools Eurostat geographic data support geospatial analysis visualization.","code":""},{"path":"https://ropengov.github.io/eurostat/index.html","id":"contribute","dir":"","previous_headings":"","what":"Contribute","title":"Tools for Eurostat Open Data","text":"Contributions welcome: Use issue tracker feedback bug reports. Send pull requests Star us Github page Join discussion Gitter","code":""},{"path":"https://ropengov.github.io/eurostat/index.html","id":"acknowledgements","dir":"","previous_headings":"","what":"Acknowledgements","title":"Tools for Eurostat Open Data","text":"Kindly cite package follows: Leo Lahti, Przemyslaw Biecek, Markus Kainu Janne Huovari. Retrieval analysis Eurostat open data eurostat package. R Journal 9(1):385-392, 2017. R package version 3.7.15. DOI: 10.32614/RJ-2017-019. URL: https://ropengov.github.io/eurostat/ grateful contributors, including Daniel Antal, Joona Lehtomäki, Francois Briatte, Oliver Reiter, Eurostat open data portal! project part rOpenGov.","code":""},{"path":"https://ropengov.github.io/eurostat/index.html","id":"disclaimer","dir":"","previous_headings":"","what":"Disclaimer","title":"Tools for Eurostat Open Data","text":"package way officially related endorsed Eurostat. using data retrieved Eurostat database work, please indicate data source Eurostat. re-use involves kind modification data text, please state clearly end user. See Eurostat policy copyright free re-use data detailed information certain exceptions.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/add_nuts_level.html","id":null,"dir":"Reference","previous_headings":"","what":"Add the statistical aggregation level to data frame — add_nuts_level","title":"Add the statistical aggregation level to data frame — add_nuts_level","text":"Eurostat regional statistics contain country, various regional level information. many cases, example, mapping, useful filter national level data NUTS2 level regional data, example. function deprecated. Use comprehensive [regions::validate_nuts_regions()] instead.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/add_nuts_level.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add the statistical aggregation level to data frame — add_nuts_level","text":"","code":"add_nuts_level(dat, geo_labels = \"geo\")"},{"path":"https://ropengov.github.io/eurostat/reference/add_nuts_level.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add the statistical aggregation level to data frame — add_nuts_level","text":"dat data frame tibble returned get_eurostat(). geo_labels geographical label, defaults geo.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/add_nuts_level.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add the statistical aggregation level to data frame — add_nuts_level","text":"new numeric variable nuts_level numeric value NUTS level 0 (country), 1 (greater region), 2 (region), 3 (small region).","code":""},{"path":"https://ropengov.github.io/eurostat/reference/add_nuts_level.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Add the statistical aggregation level to data frame — add_nuts_level","text":"DEPRECATED FUNCTIONS BACKWARD COMPATIBILITY FUNCTIONS GIVE WARNING CALL APPROPRIATE regions FUNCTIONS","code":""},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/add_nuts_level.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Add the statistical aggregation level to data frame — add_nuts_level","text":"Daniel Antal","code":""},{"path":"https://ropengov.github.io/eurostat/reference/add_nuts_level.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add the statistical aggregation level to data frame — add_nuts_level","text":"","code":"dat <- data.frame( geo = c(\"FR\", \"IE04\", \"DEB1C\"), values = c(1000, 23, 12) ) add_nuts_level(dat) #> This function will be deprecated. Use regions::validate_nuts_regions() instead. #> geo values typology valid_2016 nuts_level #> 1 FR 1000 country TRUE 0 #> 2 IE04 23 nuts_level_2 TRUE 2 #> 3 DEB1C 12 nuts_level_3 TRUE 3"},{"path":"https://ropengov.github.io/eurostat/reference/check_access_to_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Check access to ec.europe.eu — check_access_to_data","title":"Check access to ec.europe.eu — check_access_to_data","text":"Check R access resources http://ec.europa.eu","code":""},{"path":"https://ropengov.github.io/eurostat/reference/check_access_to_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check access to ec.europe.eu — check_access_to_data","text":"","code":"check_access_to_data()"},{"path":"https://ropengov.github.io/eurostat/reference/check_access_to_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check access to ec.europe.eu — check_access_to_data","text":"logical.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/check_access_to_data.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Check access to ec.europe.eu — check_access_to_data","text":"Markus Kainu markus.kainu@kapsi.fi","code":""},{"path":"https://ropengov.github.io/eurostat/reference/check_access_to_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check access to ec.europe.eu — check_access_to_data","text":"","code":"# \\donttest{ check_access_to_data() #> [1] TRUE # }"},{"path":"https://ropengov.github.io/eurostat/reference/clean_eurostat_cache.html","id":null,"dir":"Reference","previous_headings":"","what":"Clean Eurostat Cache — clean_eurostat_cache","title":"Clean Eurostat Cache — clean_eurostat_cache","text":"Delete .rds files eurostat cache directory. See get_eurostat() cache.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/clean_eurostat_cache.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Clean Eurostat Cache — clean_eurostat_cache","text":"","code":"clean_eurostat_cache(cache_dir = NULL, config = FALSE)"},{"path":"https://ropengov.github.io/eurostat/reference/clean_eurostat_cache.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Clean Eurostat Cache — clean_eurostat_cache","text":"cache_dir path cache directory. NULL (default) tries clean default temporary cache directory. config Logical TRUE/FALSE. cached path deleted?","code":""},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/clean_eurostat_cache.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Clean Eurostat Cache — clean_eurostat_cache","text":"Przemyslaw Biecek, Leo Lahti, Janne Huovari, Markus Kainu Diego Hernangómez","code":""},{"path":"https://ropengov.github.io/eurostat/reference/clean_eurostat_cache.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Clean Eurostat Cache — clean_eurostat_cache","text":"","code":"if (FALSE) { clean_eurostat_cache() }"},{"path":"https://ropengov.github.io/eurostat/reference/convert_time_col.html","id":null,"dir":"Reference","previous_headings":"","what":"Time Column Conversions — convert_time_col","title":"Time Column Conversions — convert_time_col","text":"Internal function convert time column.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/convert_time_col.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Time Column Conversions — convert_time_col","text":"","code":"convert_time_col(x, time_format)"},{"path":"https://ropengov.github.io/eurostat/reference/convert_time_col.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Time Column Conversions — convert_time_col","text":"x time column (vector) time_format see tidy_eurostat()","code":""},{"path":"https://ropengov.github.io/eurostat/reference/convert_time_col2.html","id":null,"dir":"Reference","previous_headings":"","what":"Time Column Conversions for data from new dissemination API — convert_time_col2","title":"Time Column Conversions for data from new dissemination API — convert_time_col2","text":"Internal function convert time column.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/convert_time_col2.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Time Column Conversions for data from new dissemination API — convert_time_col2","text":"","code":"convert_time_col2(x, time_format)"},{"path":"https://ropengov.github.io/eurostat/reference/convert_time_col2.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Time Column Conversions for data from new dissemination API — convert_time_col2","text":"x time column (vector) downloaded dataset time_format one following: date, date_last, num. See tidy_eurostat() information.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/cut_to_classes.html","id":null,"dir":"Reference","previous_headings":"","what":"Cuts the Values Column into Classes and Polishes the Labels — cut_to_classes","title":"Cuts the Values Column into Classes and Polishes the Labels — cut_to_classes","text":"Categorises numeric vector automatic manually defined categories polishes labels ready used mapping ggplot2.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/cut_to_classes.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Cuts the Values Column into Classes and Polishes the Labels — cut_to_classes","text":"","code":"cut_to_classes( x, n = 5, style = \"equal\", manual = FALSE, manual_breaks = NULL, decimals = 0, nodata_label = \"No data\" )"},{"path":"https://ropengov.github.io/eurostat/reference/cut_to_classes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Cuts the Values Column into Classes and Polishes the Labels — cut_to_classes","text":"x numeric vector, eg. values variable data returned get_eurostat(). n numeric. number classes/categories style chosen style: one \"fixed\", \"sd\", \"equal\", \"pretty\", \"quantile\", \"kmeans\", \"hclust\", \"bclust\", \"fisher\", \"jenks\", \"dpih\", \"headtails\", \"maximum\" manual Logical. manual breaks used manual_breaks Numeric vector manual threshold values decimals Number decimals include labels nodata_label String. Text label NA category.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/cut_to_classes.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Cuts the Values Column into Classes and Polishes the Labels — cut_to_classes","text":"factor.","code":""},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/cut_to_classes.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Cuts the Values Column into Classes and Polishes the Labels — cut_to_classes","text":"Markus Kainu markuskainu@gmail.com","code":""},{"path":"https://ropengov.github.io/eurostat/reference/cut_to_classes.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Cuts the Values Column into Classes and Polishes the Labels — cut_to_classes","text":"","code":"# \\donttest{ # lp <- get_eurostat(\"nama_aux_lp\") lp <- get_eurostat(\"nama_10_lp_ulc\") lp$class <- cut_to_classes(lp$values, n = 5, style = \"equal\", decimals = 1) #> Warning: var has missing values, omitted in finding classes #> Warning: var has missing values, omitted in finding classes # }"},{"path":"https://ropengov.github.io/eurostat/reference/dic_order.html","id":null,"dir":"Reference","previous_headings":"","what":"Order of Variable Levels from Eurostat Dictionary. — dic_order","title":"Order of Variable Levels from Eurostat Dictionary. — dic_order","text":"Orders factor levels.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/dic_order.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Order of Variable Levels from Eurostat Dictionary. — dic_order","text":"","code":"dic_order(x, dic, type)"},{"path":"https://ropengov.github.io/eurostat/reference/dic_order.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Order of Variable Levels from Eurostat Dictionary. — dic_order","text":"x variable (code labelled) get order . dic name dictionary. Correspond variable name data_frame get_eurostat(). Can also data_frame get_eurostat_dic(). type type x. code label.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/dic_order.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Order of Variable Levels from Eurostat Dictionary. — dic_order","text":"numeric vector orders.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/dic_order.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Order of Variable Levels from Eurostat Dictionary. — dic_order","text":"variables, like classifications, logical conventional ordering. Eurostat data tables necessary ordered order. function dic_order() get ordering Eurostat classifications dictionaries. function label_eurostat() can also order factor levels labels argument eu_order = TRUE.","code":""},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/dic_order.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Order of Variable Levels from Eurostat Dictionary. — dic_order","text":"Przemyslaw Biecek, Leo Lahti, Janne Huovari Markus Kainu","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eu_countries.html","id":null,"dir":"Reference","previous_headings":"","what":"Countries and Country Codes — eu_countries","title":"Countries and Country Codes — eu_countries","text":"Countries country codes EU, Euro area, EFTA EU candidate countries.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eu_countries.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Countries and Country Codes — eu_countries","text":"","code":"eu_countries ea_countries efta_countries eu_candidate_countries"},{"path":"https://ropengov.github.io/eurostat/reference/eu_countries.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Countries and Country Codes — eu_countries","text":"data_frame: code: Country code Eurostat database. name: Country name English. label: Country name Eurostat database. object class tbl_df (inherits tbl, data.frame) 19 rows 3 columns. object class tbl_df (inherits tbl, data.frame) 4 rows 3 columns. object class tbl_df (inherits tbl, data.frame) 7 rows 3 columns.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eu_countries.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Countries and Country Codes — eu_countries","text":"https://ec.europa.eu/eurostat/statistics-explained/index.php/Tutorial:Country_codes_and_protocol_order, https://ec.europa.eu/eurostat/statistics-explained/index.php/Glossary:Euro_area","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurostat-package.html","id":null,"dir":"Reference","previous_headings":"","what":"R Tools for Eurostat open data — eurostat-package","title":"R Tools for Eurostat open data — eurostat-package","text":"Brief summary eurostat package","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurostat-package.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"R Tools for Eurostat open data — eurostat-package","text":"R Tools Eurostat Open Data","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurostat-package.html","id":"regions-functions","dir":"Reference","previous_headings":"","what":"regions functions","title":"R Tools for Eurostat open data — eurostat-package","text":"working sub-national statistics basic functions regions package imported https://regions.dataobservatory.eu/.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurostat-package.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"R Tools for Eurostat open data — eurostat-package","text":"See citation(\"eurostat\"):","code":"# # Kindly cite the eurostat R package as follows: # # (C) Leo Lahti, Janne Huovari, Markus Kainu, Przemyslaw Biecek. # Retrieval and analysis of Eurostat open data with the eurostat # package. R Journal 9(1):385-392, 2017. doi: 10.32614/RJ-2017-019 # Package URL: http://ropengov.github.io/eurostat Article URL: # https://journal.r-project.org/archive/2017/RJ-2017-019/index.html # # A BibTeX entry for LaTeX users is # # @Article{, # title = {Retrieval and Analysis of Eurostat Open Data with the eurostat Package}, # author = {Leo Lahti and Janne Huovari and Markus Kainu and Przemyslaw Biecek}, # journal = {The R Journal}, # volume = {9}, # number = {1}, # pages = {385--392}, # year = {2017}, # doi = {10.32614/RJ-2017-019}, # url = {https://doi.org/10.32614/RJ-2017-019}, # }"},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/eurostat-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"R Tools for Eurostat open data — eurostat-package","text":"Leo Lahti, Janne Huovari, Markus Kainu, Przemyslaw Biecek","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurostat-package.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"R Tools for Eurostat open data — eurostat-package","text":"","code":"library(eurostat)"},{"path":"https://ropengov.github.io/eurostat/reference/eurostat_geodata_60_2016.html","id":null,"dir":"Reference","previous_headings":"","what":"Geospatial data of Europe from GISCO in 1:60 million scale from\nyear 2016 — eurostat_geodata_60_2016","title":"Geospatial data of Europe from GISCO in 1:60 million scale from\nyear 2016 — eurostat_geodata_60_2016","text":"Geospatial data Europe GISCO 1:60 million scale year 2016","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurostat_geodata_60_2016.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Geospatial data of Europe from GISCO in 1:60 million scale from\nyear 2016 — eurostat_geodata_60_2016","text":"","code":"eurostat_geodata_60_2016"},{"path":"https://ropengov.github.io/eurostat/reference/eurostat_geodata_60_2016.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Geospatial data of Europe from GISCO in 1:60 million scale from\nyear 2016 — eurostat_geodata_60_2016","text":"sf object","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurostat_geodata_60_2016.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Geospatial data of Europe from GISCO in 1:60 million scale from\nyear 2016 — eurostat_geodata_60_2016","text":"Data source: Eurostat © EuroGeographics administrative boundaries Data downloaded : https://ec.europa.eu/eurostat/web/gisco/geodata/reference-data/administrative-units-statistical-units","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurostat_geodata_60_2016.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Geospatial data of Europe from GISCO in 1:60 million scale from\nyear 2016 — eurostat_geodata_60_2016","text":"dataset contains 2016 observations (rows) 12 variables (columns). object contains following columns: id: JSON id code, NUTS_ID. See NUTS_ID clarification. LEVL_CODE: NUTS level code: 0 (national level), 1 (major socio-economic regions), 2 (basic regions application regional policies) 3 (small regions). NUTS_ID: NUTS ID code, consisting country code numbers (1 NUTS 1, 2 NUTS 2 3 NUTS 3) CNTR_CODE: Country code: two-letter ISO code (ISO 3166 alpha-2), except case Greece (EL). NAME_LATN: NUTS name local language, transliterated Latin script NUTS_NAME: NUTS name local language, local script. MOUNT_TYPE: Mountain typology NUTS 3 regions. 1: \"50 % surface covered topographic mountain areas\" 2: \"50 % regional population lives topographic mountain areas\" 3: \"50 % surface covered topographic mountain areas 50 % regional population lives mountain areas\" 4: non-mountain region / region 0: classification provided (e.g. case NUTS 1 NUTS 2 non-EU countries) URBN_TYPE: Urban-rural typology NUTS 3 regions. 1: predominantly urban region 2: intermediate region 3: predominantly rural region 0: classification provided (e.g. case NUTS 1 NUTS 2 regions) COAST_TYPE: Coastal typology NUTS 3 regions. 1: coastal (coast) 2: coastal (>= 50% population living within 50km coastline) 3: non-coastal region 0: classification provided (e.g. case NUTS 1 NUTS 2 regions) FID: NUTS_ID. geometry: geospatial information. geo: NUTS_ID, added easier joins dplyr. However, recommended use identical fields purpose. Dataset updated: 2022-06-28. recent version, please use get_eurostat_geospatial() function.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurostat_geodata_60_2016.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Geospatial data of Europe from GISCO in 1:60 million scale from\nyear 2016 — eurostat_geodata_60_2016","text":"following copyright notice provided end user convenience. Please check --date copyright information eurostat website: GISCO: Geographical information maps - Administrative units/statistical units \"addition general copyright licence policy applicable whole Eurostat website, following specific provisions apply datasets downloading. download usage data subject acceptance following clauses: Commission agrees grant non-exclusive transferable right use process Eurostat/GISCO geographical data downloaded page (\"data\"). permission use data granted condition : data used commercial purposes; source acknowledged. copyright notice, specified , visible printed electronic publication using data downloaded page.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurostat_geodata_60_2016.html","id":"copyright-notice","dir":"Reference","previous_headings":"","what":"Copyright notice","title":"Geospatial data of Europe from GISCO in 1:60 million scale from\nyear 2016 — eurostat_geodata_60_2016","text":"data downloaded page used printed electronic publication, addition provisions applicable whole Eurostat website, data source acknowledged legend map introductory page publication following copyright notice: EN: © EuroGeographics administrative boundaries FR: © EuroGeographics pour les limites administratives DE: © EuroGeographics bezüglich der Verwaltungsgrenzen publications languages English, French German, translation copyright notice language publication shall used. intend use data commercially, please contact EuroGeographics information regarding licence agreements.\"","code":""},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/eurotime2date.html","id":null,"dir":"Reference","previous_headings":"","what":"Date Conversion from Eurostat Time Format — eurotime2date","title":"Date Conversion from Eurostat Time Format — eurotime2date","text":"Date conversion Eurostat time format. function convert Eurostat time values objects class Date() representing calendar dates.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurotime2date.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Date Conversion from Eurostat Time Format — eurotime2date","text":"","code":"eurotime2date(x, last = FALSE)"},{"path":"https://ropengov.github.io/eurostat/reference/eurotime2date.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Date Conversion from Eurostat Time Format — eurotime2date","text":"x charter string time information Eurostat time format. last logical. FALSE (default) date first date period (month, quarter year). TRUE date last date period.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurotime2date.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Date Conversion from Eurostat Time Format — eurotime2date","text":"object class Date().","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurotime2date.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Date Conversion from Eurostat Time Format — eurotime2date","text":"See citation(\"eurostat\"):","code":"# # Kindly cite the eurostat R package as follows: # # (C) Leo Lahti, Janne Huovari, Markus Kainu, Przemyslaw Biecek. # Retrieval and analysis of Eurostat open data with the eurostat # package. R Journal 9(1):385-392, 2017. doi: 10.32614/RJ-2017-019 # Package URL: http://ropengov.github.io/eurostat Article URL: # https://journal.r-project.org/archive/2017/RJ-2017-019/index.html # # A BibTeX entry for LaTeX users is # # @Article{, # title = {Retrieval and Analysis of Eurostat Open Data with the eurostat Package}, # author = {Leo Lahti and Janne Huovari and Markus Kainu and Przemyslaw Biecek}, # journal = {The R Journal}, # volume = {9}, # number = {1}, # pages = {385--392}, # year = {2017}, # doi = {10.32614/RJ-2017-019}, # url = {https://doi.org/10.32614/RJ-2017-019}, # }"},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/eurotime2date.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Date Conversion from Eurostat Time Format — eurotime2date","text":"Janne Huovari janne.huovari@ptt.fi","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurotime2date.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Date Conversion from Eurostat Time Format — eurotime2date","text":"","code":"# \\donttest{ na_q <- get_eurostat(\"namq_10_pc\", time_format = \"raw\") na_q$time <- eurotime2date(x = na_q$time) unique(na_q$time) #> [1] \"2023-04-01\" \"2023-01-01\" \"2022-10-01\" \"2022-07-01\" \"2022-04-01\" #> [6] \"2022-01-01\" \"2021-10-01\" \"2021-07-01\" \"2021-04-01\" \"2021-01-01\" #> [11] \"2020-10-01\" \"2020-07-01\" \"2020-04-01\" \"2020-01-01\" \"2019-10-01\" #> [16] \"2019-07-01\" \"2019-04-01\" \"2019-01-01\" \"2018-10-01\" \"2018-07-01\" #> [21] \"2018-04-01\" \"2018-01-01\" \"2017-10-01\" \"2017-07-01\" \"2017-04-01\" #> [26] \"2017-01-01\" \"2016-10-01\" \"2016-07-01\" \"2016-04-01\" \"2016-01-01\" #> [31] \"2015-10-01\" \"2015-07-01\" \"2015-04-01\" \"2015-01-01\" \"2014-10-01\" #> [36] \"2014-07-01\" \"2014-04-01\" \"2014-01-01\" \"2013-10-01\" \"2013-07-01\" #> [41] \"2013-04-01\" \"2013-01-01\" \"2012-10-01\" \"2012-07-01\" \"2012-04-01\" #> [46] \"2012-01-01\" \"2011-10-01\" \"2011-07-01\" \"2011-04-01\" \"2011-01-01\" #> [51] \"2010-10-01\" \"2010-07-01\" \"2010-04-01\" \"2010-01-01\" \"2009-10-01\" #> [56] \"2009-07-01\" \"2009-04-01\" \"2009-01-01\" \"2008-10-01\" \"2008-07-01\" #> [61] \"2008-04-01\" \"2008-01-01\" \"2007-10-01\" \"2007-07-01\" \"2007-04-01\" #> [66] \"2007-01-01\" \"2006-10-01\" \"2006-07-01\" \"2006-04-01\" \"2006-01-01\" #> [71] \"2005-10-01\" \"2005-07-01\" \"2005-04-01\" \"2005-01-01\" \"2004-10-01\" #> [76] \"2004-07-01\" \"2004-04-01\" \"2004-01-01\" \"2003-10-01\" \"2003-07-01\" #> [81] \"2003-04-01\" \"2003-01-01\" \"2002-10-01\" \"2002-07-01\" \"2002-04-01\" #> [86] \"2002-01-01\" \"2001-10-01\" \"2001-07-01\" \"2001-04-01\" \"2001-01-01\" #> [91] \"2000-10-01\" \"2000-07-01\" \"2000-04-01\" \"2000-01-01\" \"1999-10-01\" #> [96] \"1999-07-01\" \"1999-04-01\" \"1999-01-01\" \"1998-10-01\" \"1998-07-01\" #> [101] \"1998-04-01\" \"1998-01-01\" \"1997-10-01\" \"1997-07-01\" \"1997-04-01\" #> [106] \"1997-01-01\" \"1996-10-01\" \"1996-07-01\" \"1996-04-01\" \"1996-01-01\" #> [111] \"1995-10-01\" \"1995-07-01\" \"1995-04-01\" \"1995-01-01\" \"1994-10-01\" #> [116] \"1994-07-01\" \"1994-04-01\" \"1994-01-01\" \"1993-10-01\" \"1993-07-01\" #> [121] \"1993-04-01\" \"1993-01-01\" \"1992-10-01\" \"1992-07-01\" \"1992-04-01\" #> [126] \"1992-01-01\" \"1991-10-01\" \"1991-07-01\" \"1991-04-01\" \"1991-01-01\" #> [131] \"1990-10-01\" \"1990-07-01\" \"1990-04-01\" \"1990-01-01\" \"1989-10-01\" #> [136] \"1989-07-01\" \"1989-04-01\" \"1989-01-01\" \"1988-10-01\" \"1988-07-01\" #> [141] \"1988-04-01\" \"1988-01-01\" \"1987-10-01\" \"1987-07-01\" \"1987-04-01\" #> [146] \"1987-01-01\" \"1986-10-01\" \"1986-07-01\" \"1986-04-01\" \"1986-01-01\" #> [151] \"1985-10-01\" \"1985-07-01\" \"1985-04-01\" \"1985-01-01\" \"1984-10-01\" #> [156] \"1984-07-01\" \"1984-04-01\" \"1984-01-01\" \"1983-10-01\" \"1983-07-01\" #> [161] \"1983-04-01\" \"1983-01-01\" \"1982-10-01\" \"1982-07-01\" \"1982-04-01\" #> [166] \"1982-01-01\" \"1981-10-01\" \"1981-07-01\" \"1981-04-01\" \"1981-01-01\" #> [171] \"1980-10-01\" \"1980-07-01\" \"1980-04-01\" \"1980-01-01\" # }"},{"path":"https://ropengov.github.io/eurostat/reference/eurotime2date2.html","id":null,"dir":"Reference","previous_headings":"","what":"Date Conversion from New Eurostat Time Format — eurotime2date2","title":"Date Conversion from New Eurostat Time Format — eurotime2date2","text":"Date conversion Eurostat time format. function convert Eurostat time values objects class Date() representing calendar dates.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurotime2date2.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Date Conversion from New Eurostat Time Format — eurotime2date2","text":"","code":"eurotime2date2(x, last = FALSE)"},{"path":"https://ropengov.github.io/eurostat/reference/eurotime2date2.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Date Conversion from New Eurostat Time Format — eurotime2date2","text":"x charter string time information Eurostat time format. last logical. FALSE (default) date first date period (month, quarter year). TRUE date last date period.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurotime2date2.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Date Conversion from New Eurostat Time Format — eurotime2date2","text":"object class Date().","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurotime2date2.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Date Conversion from New Eurostat Time Format — eurotime2date2","text":"Available patterns YYYY (year), YYYY-SN (semester), YYYY-QN (quarter), YYYY-MM (month), YYYY-WNN (week) YYYY-MM-DD (day).","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurotime2date2.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Date Conversion from New Eurostat Time Format — eurotime2date2","text":"See citation(\"eurostat\"):","code":"# # Kindly cite the eurostat R package as follows: # # (C) Leo Lahti, Janne Huovari, Markus Kainu, Przemyslaw Biecek. # Retrieval and analysis of Eurostat open data with the eurostat # package. R Journal 9(1):385-392, 2017. doi: 10.32614/RJ-2017-019 # Package URL: http://ropengov.github.io/eurostat Article URL: # https://journal.r-project.org/archive/2017/RJ-2017-019/index.html # # A BibTeX entry for LaTeX users is # # @Article{, # title = {Retrieval and Analysis of Eurostat Open Data with the eurostat Package}, # author = {Leo Lahti and Janne Huovari and Markus Kainu and Przemyslaw Biecek}, # journal = {The R Journal}, # volume = {9}, # number = {1}, # pages = {385--392}, # year = {2017}, # doi = {10.32614/RJ-2017-019}, # url = {https://doi.org/10.32614/RJ-2017-019}, # }"},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/eurotime2date2.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Date Conversion from New Eurostat Time Format — eurotime2date2","text":"Janne Huovari janne.huovari@ptt.fi","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurotime2date2.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Date Conversion from New Eurostat Time Format — eurotime2date2","text":"","code":"# \\donttest{ na_q <- get_eurostat(\"namq_10_pc\", time_format = \"raw\") na_q$time <- eurotime2date(x = na_q$time) unique(na_q$time) #> [1] \"2023-04-01\" \"2023-01-01\" \"2022-10-01\" \"2022-07-01\" \"2022-04-01\" #> [6] \"2022-01-01\" \"2021-10-01\" \"2021-07-01\" \"2021-04-01\" \"2021-01-01\" #> [11] \"2020-10-01\" \"2020-07-01\" \"2020-04-01\" \"2020-01-01\" \"2019-10-01\" #> [16] \"2019-07-01\" \"2019-04-01\" \"2019-01-01\" \"2018-10-01\" \"2018-07-01\" #> [21] \"2018-04-01\" \"2018-01-01\" \"2017-10-01\" \"2017-07-01\" \"2017-04-01\" #> [26] \"2017-01-01\" \"2016-10-01\" \"2016-07-01\" \"2016-04-01\" \"2016-01-01\" #> [31] \"2015-10-01\" \"2015-07-01\" \"2015-04-01\" \"2015-01-01\" \"2014-10-01\" #> [36] \"2014-07-01\" \"2014-04-01\" \"2014-01-01\" \"2013-10-01\" \"2013-07-01\" #> [41] \"2013-04-01\" \"2013-01-01\" \"2012-10-01\" \"2012-07-01\" \"2012-04-01\" #> [46] \"2012-01-01\" \"2011-10-01\" \"2011-07-01\" \"2011-04-01\" \"2011-01-01\" #> [51] \"2010-10-01\" \"2010-07-01\" \"2010-04-01\" \"2010-01-01\" \"2009-10-01\" #> [56] \"2009-07-01\" \"2009-04-01\" \"2009-01-01\" \"2008-10-01\" \"2008-07-01\" #> [61] \"2008-04-01\" \"2008-01-01\" \"2007-10-01\" \"2007-07-01\" \"2007-04-01\" #> [66] \"2007-01-01\" \"2006-10-01\" \"2006-07-01\" \"2006-04-01\" \"2006-01-01\" #> [71] \"2005-10-01\" \"2005-07-01\" \"2005-04-01\" \"2005-01-01\" \"2004-10-01\" #> [76] \"2004-07-01\" \"2004-04-01\" \"2004-01-01\" \"2003-10-01\" \"2003-07-01\" #> [81] \"2003-04-01\" \"2003-01-01\" \"2002-10-01\" \"2002-07-01\" \"2002-04-01\" #> [86] \"2002-01-01\" \"2001-10-01\" \"2001-07-01\" \"2001-04-01\" \"2001-01-01\" #> [91] \"2000-10-01\" \"2000-07-01\" \"2000-04-01\" \"2000-01-01\" \"1999-10-01\" #> [96] \"1999-07-01\" \"1999-04-01\" \"1999-01-01\" \"1998-10-01\" \"1998-07-01\" #> [101] \"1998-04-01\" \"1998-01-01\" \"1997-10-01\" \"1997-07-01\" \"1997-04-01\" #> [106] \"1997-01-01\" \"1996-10-01\" \"1996-07-01\" \"1996-04-01\" \"1996-01-01\" #> [111] \"1995-10-01\" \"1995-07-01\" \"1995-04-01\" \"1995-01-01\" \"1994-10-01\" #> [116] \"1994-07-01\" \"1994-04-01\" \"1994-01-01\" \"1993-10-01\" \"1993-07-01\" #> [121] \"1993-04-01\" \"1993-01-01\" \"1992-10-01\" \"1992-07-01\" \"1992-04-01\" #> [126] \"1992-01-01\" \"1991-10-01\" \"1991-07-01\" \"1991-04-01\" \"1991-01-01\" #> [131] \"1990-10-01\" \"1990-07-01\" \"1990-04-01\" \"1990-01-01\" \"1989-10-01\" #> [136] \"1989-07-01\" \"1989-04-01\" \"1989-01-01\" \"1988-10-01\" \"1988-07-01\" #> [141] \"1988-04-01\" \"1988-01-01\" \"1987-10-01\" \"1987-07-01\" \"1987-04-01\" #> [146] \"1987-01-01\" \"1986-10-01\" \"1986-07-01\" \"1986-04-01\" \"1986-01-01\" #> [151] \"1985-10-01\" \"1985-07-01\" \"1985-04-01\" \"1985-01-01\" \"1984-10-01\" #> [156] \"1984-07-01\" \"1984-04-01\" \"1984-01-01\" \"1983-10-01\" \"1983-07-01\" #> [161] \"1983-04-01\" \"1983-01-01\" \"1982-10-01\" \"1982-07-01\" \"1982-04-01\" #> [166] \"1982-01-01\" \"1981-10-01\" \"1981-07-01\" \"1981-04-01\" \"1981-01-01\" #> [171] \"1980-10-01\" \"1980-07-01\" \"1980-04-01\" \"1980-01-01\" # } if (FALSE) { # Test for weekly data get_eurostat( id = \"lfsi_abs_w\", select_time = c(\"W\"), time_format = \"date\", legacy_bulk_download = FALSE ) }"},{"path":"https://ropengov.github.io/eurostat/reference/eurotime2num.html","id":null,"dir":"Reference","previous_headings":"","what":"Conversion of Eurostat Time Format to Numeric — eurotime2num","title":"Conversion of Eurostat Time Format to Numeric — eurotime2num","text":"conversion Eurostat time format numeric.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurotime2num.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Conversion of Eurostat Time Format to Numeric — eurotime2num","text":"","code":"eurotime2num(x)"},{"path":"https://ropengov.github.io/eurostat/reference/eurotime2num.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Conversion of Eurostat Time Format to Numeric — eurotime2num","text":"x charter string time information Eurostat time format.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurotime2num.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Conversion of Eurostat Time Format to Numeric — eurotime2num","text":"see .numeric().","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurotime2num.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Conversion of Eurostat Time Format to Numeric — eurotime2num","text":"Bi-annual, quarterly monthly data presented fraction year beginning period. Conversion daily data supported.","code":""},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/eurotime2num.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Conversion of Eurostat Time Format to Numeric — eurotime2num","text":"Janne Huovari janne.huovari@ptt.fi","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurotime2num.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Conversion of Eurostat Time Format to Numeric — eurotime2num","text":"","code":"# \\donttest{ na_q <- get_eurostat(\"namq_10_pc\", time_format = \"raw\") na_q$time <- eurotime2num(x = na_q$time) unique(na_q$time) #> [1] 2023.25 2023.00 2022.75 2022.50 2022.25 2022.00 2021.75 2021.50 2021.25 #> [10] 2021.00 2020.75 2020.50 2020.25 2020.00 2019.75 2019.50 2019.25 2019.00 #> [19] 2018.75 2018.50 2018.25 2018.00 2017.75 2017.50 2017.25 2017.00 2016.75 #> [28] 2016.50 2016.25 2016.00 2015.75 2015.50 2015.25 2015.00 2014.75 2014.50 #> [37] 2014.25 2014.00 2013.75 2013.50 2013.25 2013.00 2012.75 2012.50 2012.25 #> [46] 2012.00 2011.75 2011.50 2011.25 2011.00 2010.75 2010.50 2010.25 2010.00 #> [55] 2009.75 2009.50 2009.25 2009.00 2008.75 2008.50 2008.25 2008.00 2007.75 #> [64] 2007.50 2007.25 2007.00 2006.75 2006.50 2006.25 2006.00 2005.75 2005.50 #> [73] 2005.25 2005.00 2004.75 2004.50 2004.25 2004.00 2003.75 2003.50 2003.25 #> [82] 2003.00 2002.75 2002.50 2002.25 2002.00 2001.75 2001.50 2001.25 2001.00 #> [91] 2000.75 2000.50 2000.25 2000.00 1999.75 1999.50 1999.25 1999.00 1998.75 #> [100] 1998.50 1998.25 1998.00 1997.75 1997.50 1997.25 1997.00 1996.75 1996.50 #> [109] 1996.25 1996.00 1995.75 1995.50 1995.25 1995.00 1994.75 1994.50 1994.25 #> [118] 1994.00 1993.75 1993.50 1993.25 1993.00 1992.75 1992.50 1992.25 1992.00 #> [127] 1991.75 1991.50 1991.25 1991.00 1990.75 1990.50 1990.25 1990.00 1989.75 #> [136] 1989.50 1989.25 1989.00 1988.75 1988.50 1988.25 1988.00 1987.75 1987.50 #> [145] 1987.25 1987.00 1986.75 1986.50 1986.25 1986.00 1985.75 1985.50 1985.25 #> [154] 1985.00 1984.75 1984.50 1984.25 1984.00 1983.75 1983.50 1983.25 1983.00 #> [163] 1982.75 1982.50 1982.25 1982.00 1981.75 1981.50 1981.25 1981.00 1980.75 #> [172] 1980.50 1980.25 1980.00 # }"},{"path":"https://ropengov.github.io/eurostat/reference/eurotime2num2.html","id":null,"dir":"Reference","previous_headings":"","what":"Conversion of Eurostat Time Format to Numeric — eurotime2num2","title":"Conversion of Eurostat Time Format to Numeric — eurotime2num2","text":"conversion Eurostat time format numeric.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurotime2num2.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Conversion of Eurostat Time Format to Numeric — eurotime2num2","text":"","code":"eurotime2num2(x)"},{"path":"https://ropengov.github.io/eurostat/reference/eurotime2num2.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Conversion of Eurostat Time Format to Numeric — eurotime2num2","text":"x charter string time information Eurostat time format.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurotime2num2.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Conversion of Eurostat Time Format to Numeric — eurotime2num2","text":"see .numeric().","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurotime2num2.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Conversion of Eurostat Time Format to Numeric — eurotime2num2","text":"Bi-annual (semester), quarterly, monthly weekly data can presented fraction year beginning period. Conversion daily data supported.","code":""},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/eurotime2num2.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Conversion of Eurostat Time Format to Numeric — eurotime2num2","text":"Janne Huovari janne.huovari@ptt.fi, Pyry Kantanen","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurotime2num2.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Conversion of Eurostat Time Format to Numeric — eurotime2num2","text":"","code":"# \\donttest{ na_q <- get_eurostat(\"namq_10_pc\", time_format = \"raw\") na_q$time <- eurotime2num(x = na_q$time) unique(na_q$time) #> [1] 2023.25 2023.00 2022.75 2022.50 2022.25 2022.00 2021.75 2021.50 2021.25 #> [10] 2021.00 2020.75 2020.50 2020.25 2020.00 2019.75 2019.50 2019.25 2019.00 #> [19] 2018.75 2018.50 2018.25 2018.00 2017.75 2017.50 2017.25 2017.00 2016.75 #> [28] 2016.50 2016.25 2016.00 2015.75 2015.50 2015.25 2015.00 2014.75 2014.50 #> [37] 2014.25 2014.00 2013.75 2013.50 2013.25 2013.00 2012.75 2012.50 2012.25 #> [46] 2012.00 2011.75 2011.50 2011.25 2011.00 2010.75 2010.50 2010.25 2010.00 #> [55] 2009.75 2009.50 2009.25 2009.00 2008.75 2008.50 2008.25 2008.00 2007.75 #> [64] 2007.50 2007.25 2007.00 2006.75 2006.50 2006.25 2006.00 2005.75 2005.50 #> [73] 2005.25 2005.00 2004.75 2004.50 2004.25 2004.00 2003.75 2003.50 2003.25 #> [82] 2003.00 2002.75 2002.50 2002.25 2002.00 2001.75 2001.50 2001.25 2001.00 #> [91] 2000.75 2000.50 2000.25 2000.00 1999.75 1999.50 1999.25 1999.00 1998.75 #> [100] 1998.50 1998.25 1998.00 1997.75 1997.50 1997.25 1997.00 1996.75 1996.50 #> [109] 1996.25 1996.00 1995.75 1995.50 1995.25 1995.00 1994.75 1994.50 1994.25 #> [118] 1994.00 1993.75 1993.50 1993.25 1993.00 1992.75 1992.50 1992.25 1992.00 #> [127] 1991.75 1991.50 1991.25 1991.00 1990.75 1990.50 1990.25 1990.00 1989.75 #> [136] 1989.50 1989.25 1989.00 1988.75 1988.50 1988.25 1988.00 1987.75 1987.50 #> [145] 1987.25 1987.00 1986.75 1986.50 1986.25 1986.00 1985.75 1985.50 1985.25 #> [154] 1985.00 1984.75 1984.50 1984.25 1984.00 1983.75 1983.50 1983.25 1983.00 #> [163] 1982.75 1982.50 1982.25 1982.00 1981.75 1981.50 1981.25 1981.00 1980.75 #> [172] 1980.50 1980.25 1980.00 # }"},{"path":"https://ropengov.github.io/eurostat/reference/get_bibentry.html","id":null,"dir":"Reference","previous_headings":"","what":"Create A Data Bibliography — get_bibentry","title":"Create A Data Bibliography — get_bibentry","text":"Creates bibliography selected Eurostat data files, including last Eurostat update, URL access data, optional keywords set user.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_bibentry.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create A Data Bibliography — get_bibentry","text":"","code":"get_bibentry(code, keywords = NULL, format = \"Biblatex\")"},{"path":"https://ropengov.github.io/eurostat/reference/get_bibentry.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create A Data Bibliography — get_bibentry","text":"code Eurostat data code vector Eurostat data codes character factor. keywords list keywords added entries. Defaults NULL. format Default 'Biblatex', alternatives 'bibentry' 'Bibtex' (case sensitive.)","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_bibentry.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create A Data Bibliography — get_bibentry","text":"bibentry, Bibtex Biblatex object.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_bibentry.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create A Data Bibliography — get_bibentry","text":"Daniel Antal, Przemyslaw Biecek","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_bibentry.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create A Data Bibliography — get_bibentry","text":"","code":"if (FALSE) { my_bibliography <- get_bibentry( code = c(\"tran_hv_frtra\", \"t2020_rk310\", \"tec00001\"), keywords = list( c(\"railways\", \"freight\", \"transport\"), c(\"railways\", \"passengers\", \"modal split\") ), format = \"Biblatex\" ) my_bibliography }"},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat.html","id":null,"dir":"Reference","previous_headings":"","what":"Read Eurostat Data — get_eurostat","title":"Read Eurostat Data — get_eurostat","text":"Download data sets Eurostat https://ec.europa.eu/eurostat","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read Eurostat Data — get_eurostat","text":"","code":"get_eurostat( id, time_format = \"date\", filters = \"none\", type = \"code\", select_time = NULL, cache = TRUE, update_cache = FALSE, cache_dir = NULL, compress_file = TRUE, stringsAsFactors = FALSE, keepFlags = FALSE, legacy_bulk_download = TRUE, ... )"},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read Eurostat Data — get_eurostat","text":"id code name dataset interest. See search_eurostat() details get code. time_format string giving type conversion time column eurostat format. \"date\" (default) converts Date() first date period. \"date_last\" converts Date() last date period. \"num\" converts numeric \"raw\" conversion. See eurotime2date() eurotime2num(). filters \"none\" (default) get whole dataset named list filters get just part table. Names list objects Eurostat variable codes values vectors observation codes. NULL whole dataset returned via API. details. See filters limitations per query via API get_eurostat_json(). type type variables, \"code\" (default) \"label\". select_time character symbol time frequency NULL, used default datasets just one time frequency. datasets multiple time frequencies, select one desired frequencies : \"Y\" (\"\") = annual, \"S\" = semi-annual / semester, \"Q\" = quarterly, \"M\" = monthly, \"W\" = weekly. frequencies data frame time_format = \"raw\" used. cache logical whether caching. Default TRUE. Affects queries bulk download facility. update_cache logical whether update cache. Can set also options(eurostat_update = TRUE) cache_dir path cache directory. directory must exist. NULL (default) uses creates 'eurostat' directory temporary directory tempdir(). directory can also set set_eurostat_cache_dir(). compress_file logical whether compress RDS-file caching. Default TRUE. stringsAsFactors FALSE (default) variables returned characters. TRUE variables converted factors original Eurostat order. keepFlags logical whether flags (e.g. \"confidential\", \"provisional\") kept separate column can removed. Default FALSE. flag values see: https://ec.europa.eu/eurostat/data/database/information. Also possible non-real zero \"0n\" indicated flags column. Flags available eurostat API, keepFlags can used filters. legacy_bulk_download logical, whether use new dissemination API download TSV files instead old Bulk Download facilities. Default TRUE. temporary parameter deleted old Bulk Download facilities decommissioned. Please use caution intend build automated scripts use parameter. ... Arguments passed get_eurostat_json lang language used metadata. Default EN, options FR DE.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read Eurostat Data — get_eurostat","text":"tibble. One column dimension data, time column time dimension values column numerical values. Eurostat data include missing values treatment missing values depend source. bulk download facility missing values dropped dimensions missing particular time. JSON API missing values dropped dimensions missing times. data bulk download facility can completed example tidyr::complete().","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Read Eurostat Data — get_eurostat","text":"Data sets downloaded Eurostat bulk download facility Eurostat Web Services JSON API. table id given, whole table downloaded bulk download facility. also filters defined JSON API used. bulk download facility fastest method download whole datasets. also often way JSON API limitation maximum 50 sub-indicators time whole datasets usually exceeds . Also, seems multi frequency datasets can retrieved via bulk download facility select_time available JSON API method. connection thru proxy, probably set proxy parameters use JSON API, see get_eurostat_json(). default datasets bulk download facility cached often rather large. Caching (currently) possible datasets JSON API. Cache files stored temporary directory default named directory (See set_eurostat_cache_dir()). cache can emptied clean_eurostat_cache(). id, code, dataset can searched search_eurostat() Eurostat database https://ec.europa.eu/eurostat/data/database. Eurostat database gives codes Data Navigation Tree every dataset parenthesis.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Read Eurostat Data — get_eurostat","text":"See citation(\"eurostat\"): citing data, please indicate data source Eurostat. re-use data involves modification data text, state clearly. detailed information exceptions regarding commercial use, see Eurostat policy copyright free re-use data.","code":"# # Kindly cite the eurostat R package as follows: # # (C) Leo Lahti, Janne Huovari, Markus Kainu, Przemyslaw Biecek. # Retrieval and analysis of Eurostat open data with the eurostat # package. R Journal 9(1):385-392, 2017. doi: 10.32614/RJ-2017-019 # Package URL: http://ropengov.github.io/eurostat Article URL: # https://journal.r-project.org/archive/2017/RJ-2017-019/index.html # # A BibTeX entry for LaTeX users is # # @Article{, # title = {Retrieval and Analysis of Eurostat Open Data with the eurostat Package}, # author = {Leo Lahti and Janne Huovari and Markus Kainu and Przemyslaw Biecek}, # journal = {The R Journal}, # volume = {9}, # number = {1}, # pages = {385--392}, # year = {2017}, # doi = {10.32614/RJ-2017-019}, # url = {https://doi.org/10.32614/RJ-2017-019}, # }"},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Read Eurostat Data — get_eurostat","text":"Przemyslaw Biecek, Leo Lahti, Janne Huovari Markus Kainu","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Read Eurostat Data — get_eurostat","text":"","code":"if (FALSE) { k <- get_eurostat(\"nama_10_lp_ulc\") k <- get_eurostat(\"nama_10_lp_ulc\", time_format = \"num\") k <- get_eurostat(\"nama_10_lp_ulc\", update_cache = TRUE) k <- get_eurostat(\"nama_10_lp_ulc\", cache_dir = file.path(tempdir(), \"r_cache\") ) options(eurostat_update = TRUE) k <- get_eurostat(\"nama_10_lp_ulc\") options(eurostat_update = FALSE) set_eurostat_cache_dir(file.path(tempdir(), \"r_cache2\")) k <- get_eurostat(\"nama_10_lp_ulc\") k <- get_eurostat(\"nama_10_lp_ulc\", cache = FALSE) k <- get_eurostat(\"avia_gonc\", select_time = \"Y\", cache = FALSE) dd <- get_eurostat(\"nama_10_gdp\", filters = list( geo = \"FI\", na_item = \"B1GQ\", unit = \"CLV_I10\" ) ) # A dataset with multiple time series in one dd2 <- get_eurostat(\"AVIA_GOR_ME\", select_time = c(\"A\", \"M\", \"Q\"), time_format = \"date_last\", legacy_bulk_download = FALSE ) }"},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_dic.html","id":null,"dir":"Reference","previous_headings":"","what":"Download Eurostat Dictionary — get_eurostat_dic","title":"Download Eurostat Dictionary — get_eurostat_dic","text":"Download Eurostat dictionary.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_dic.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Download Eurostat Dictionary — get_eurostat_dic","text":"","code":"get_eurostat_dic(dictname, lang = \"en\")"},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_dic.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Download Eurostat Dictionary — get_eurostat_dic","text":"dictname character, dictionary variable downloaded. lang character, language code. Options: \"en\" (default), \"fr\", \"de\".","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_dic.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Download Eurostat Dictionary — get_eurostat_dic","text":"tibble two columns: code names full names.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_dic.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Download Eurostat Dictionary — get_eurostat_dic","text":"given coded variable Eurostat https://ec.europa.eu/eurostat/. dictionaries link codes human-readable labels. translate codes labels, use label_eurostat().","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_dic.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Download Eurostat Dictionary — get_eurostat_dic","text":"See citation(\"eurostat\"):","code":"# # Kindly cite the eurostat R package as follows: # # (C) Leo Lahti, Janne Huovari, Markus Kainu, Przemyslaw Biecek. # Retrieval and analysis of Eurostat open data with the eurostat # package. R Journal 9(1):385-392, 2017. doi: 10.32614/RJ-2017-019 # Package URL: http://ropengov.github.io/eurostat Article URL: # https://journal.r-project.org/archive/2017/RJ-2017-019/index.html # # A BibTeX entry for LaTeX users is # # @Article{, # title = {Retrieval and Analysis of Eurostat Open Data with the eurostat Package}, # author = {Leo Lahti and Janne Huovari and Markus Kainu and Przemyslaw Biecek}, # journal = {The R Journal}, # volume = {9}, # number = {1}, # pages = {385--392}, # year = {2017}, # doi = {10.32614/RJ-2017-019}, # url = {https://doi.org/10.32614/RJ-2017-019}, # }"},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_dic.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Download Eurostat Dictionary — get_eurostat_dic","text":"Przemyslaw Biecek Leo Lahti leo.lahti@iki.fi. Thanks Wietse Dol contributions.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_dic.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Download Eurostat Dictionary — get_eurostat_dic","text":"","code":"# \\donttest{ get_eurostat_dic(\"crop_pro\") #> # A tibble: 224 × 2 #> code_name full_name #> #> 1 C1040 Cereals for the production of grain (including rice and seed) #> 2 C1050 Cereals (excluding rice) #> 3 C1100 Wheat (including spelt) #> 4 C1120 Common wheat and spelt #> 5 C1123 Common winter wheat #> 6 C1124 Common spring wheat #> 7 C1130 Durum wheat #> 8 C1133 Winter durum wheat #> 9 C1134 Spring durum wheat #> 10 C1140 Rye and maslin #> # ℹ 214 more rows # Try another language get_eurostat_dic(\"crop_pro\", lang = \"fr\") #> # A tibble: 224 × 2 #> code_name full_name #> #> 1 C1040 Céréales pour la production de grains (riz et semence compris) #> 2 C1050 Céréales (à l'exception du riz) #> 3 C1100 Blé (épeautre compris) #> 4 C1120 Blé tendre et épeautre #> 5 C1123 Blé tendre d'hiver #> 6 C1124 Blé tendre de printemps #> 7 C1130 Blé dur #> 8 C1133 Blé dur d'hiver #> 9 C1134 Blé dur de printemps #> 10 C1140 Seigle et méteil #> # ℹ 214 more rows # }"},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_geospatial.html","id":null,"dir":"Reference","previous_headings":"","what":"Download Geospatial Data from GISCO — get_eurostat_geospatial","title":"Download Geospatial Data from GISCO — get_eurostat_geospatial","text":"Downloads either simple features (sf), SpatialPolygonDataFrame data_frame preprocessed using broom::tidy().","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_geospatial.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Download Geospatial Data from GISCO — get_eurostat_geospatial","text":"","code":"get_eurostat_geospatial( output_class = \"sf\", resolution = \"60\", nuts_level = \"all\", year = \"2016\", cache = TRUE, update_cache = FALSE, cache_dir = NULL, crs = \"4326\", make_valid = FALSE )"},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_geospatial.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Download Geospatial Data from GISCO — get_eurostat_geospatial","text":"Data source: Eurostat © EuroGeographics administrative boundaries Data downloaded : https://ec.europa.eu/eurostat/web/gisco/geodata/reference-data/administrative-units-statistical-units","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_geospatial.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Download Geospatial Data from GISCO — get_eurostat_geospatial","text":"output_class string. Class object returned, either sf simple features, df (data_frame) spdf (SpatialPolygonDataFrame) resolution Resolution geospatial data. One \"60\" (1:60million), \"20\" (1:20million) \"10\" (1:10million) \"03\" (1:3million) \"01\" (1:1million). nuts_level Level NUTS classification geospatial data. One \"0\", \"1\", \"2\", \"3\" \"\" (mimics original behaviour) year NUTS release year. One \"2003\", \"2006\", \"2010\", \"2013\", \"2016\" \"2021\" cache logical whether caching. Default TRUE. Affects queries bulk download facility. update_cache logical whether update cache. Can set also options(eurostat_update = TRUE) cache_dir path cache directory. directory exist. NULL (default) uses creates 'eurostat' directory temporary directory tempdir(). Directory can also set option eurostat_cache_dir. crs projection map: 4-digit EPSG code. One : \"4326\" - WGS84 \"3035\" - ETRS89 / ETRS-LAEA \"3857\" - Pseudo-Mercator make_valid logical; ensure valid (multi-)polygon features returned output_class=\"sf\", see Details. Current default FALSE, changed future.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_geospatial.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Download Geospatial Data from GISCO — get_eurostat_geospatial","text":"sf, data_frame SpatialPolygonDataFrame.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_geospatial.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Download Geospatial Data from GISCO — get_eurostat_geospatial","text":"data source URL https://ec.europa.eu/eurostat/web/gisco/geodata/reference-data/administrative-units-statistical-units. source provides feature collections line strings (GeoJSON format), (multi-)polygons , cases, yields invalid self-intersecting (multi-)polygon geometries (years/resolutions). can cause problems, e.g., using geometries input argument sf::st_interpolate_aw(). make_valid = TRUE makes sure valid (multi-)polygons returned, example included . objects downloaded GISCO contain following variable columns: id: JSON id code, NUTS_ID. See NUTS_ID clarification. LEVL_CODE: NUTS level code: 0 (national level), 1 (major socio-economic regions), 2 (basic regions application regional policies) 3 (small regions). NUTS_ID: NUTS ID code, consisting country code numbers (1 NUTS 1, 2 NUTS 2 3 NUTS 3) CNTR_CODE: Country code: two-letter ISO code (ISO 3166 alpha-2), except case Greece (EL). NAME_LATN: NUTS name local language, transliterated Latin script NUTS_NAME: NUTS name local language, local script. MOUNT_TYPE: Mountain typology NUTS 3 regions. 1: \"50 % surface covered topographic mountain areas\" 2: \"50 % regional population lives topographic mountain areas\" 3: \"50 % surface covered topographic mountain areas 50 % regional population lives mountain areas\" 4: non-mountain region / region 0: classification provided (e.g. case NUTS 1 NUTS 2 non-EU countries) URBN_TYPE: Urban-rural typology NUTS 3 regions. 1: predominantly urban region 2: intermediate region 3: predominantly rural region 0: classification provided (e.g. case NUTS 1 NUTS 2 regions) COAST_TYPE: Coastal typology NUTS 3 regions. 1: coastal (coast) 2: coastal (>= 50% population living within 50km coastline) 3: non-coastal region 0: classification provided (e.g. case NUTS 1 NUTS 2 regions) FID: NUTS_ID. geometry: geospatial information. geo: NUTS_ID, added easier joins dplyr. However, recommended use identical fields purpose.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_geospatial.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Download Geospatial Data from GISCO — get_eurostat_geospatial","text":"following copyright notice provided end user convenience. Please check --date copyright information eurostat website: GISCO: Geographical information maps - Administrative units/statistical units \"addition general copyright licence policy applicable whole Eurostat website, following specific provisions apply datasets downloading. download usage data subject acceptance following clauses: Commission agrees grant non-exclusive transferable right use process Eurostat/GISCO geographical data downloaded page (\"data\"). permission use data granted condition : data used commercial purposes; source acknowledged. copyright notice, specified , visible printed electronic publication using data downloaded page.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_geospatial.html","id":"copyright-notice","dir":"Reference","previous_headings":"","what":"Copyright notice","title":"Download Geospatial Data from GISCO — get_eurostat_geospatial","text":"data downloaded page used printed electronic publication, addition provisions applicable whole Eurostat website, data source acknowledged legend map introductory page publication following copyright notice: EN: © EuroGeographics administrative boundaries FR: © EuroGeographics pour les limites administratives DE: © EuroGeographics bezüglich der Verwaltungsgrenzen publications languages English, French German, translation copyright notice language publication shall used. intend use data commercially, please contact EuroGeographics information regarding licence agreements.\"","code":""},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_geospatial.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Download Geospatial Data from GISCO — get_eurostat_geospatial","text":"Markus Kainu markuskainu@gmail.com","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_geospatial.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Download Geospatial Data from GISCO — get_eurostat_geospatial","text":"","code":"# \\donttest{ sf <- get_eurostat_geospatial( output_class = \"sf\", resolution = \"60\", nuts_level = \"all\" ) #> Loading required namespace: sf #> sf at resolution 1:60 read from local file #> Warning: Default of 'make_valid' for 'output_class=\"sf\"' will be changed in the future (see function details). df <- get_eurostat_geospatial( output_class = \"df\", resolution = \"20\", nuts_level = \"0\" ) #> Object cached at /tmp/Rtmp6OM9cZ/eurostat/df20020164326.RData #> The legacy packages maptools, rgdal, and rgeos, underpinning the sp package, #> which was just loaded, will retire in October 2023. #> Please refer to R-spatial evolution reports for details, especially #> https://r-spatial.org/r/2023/05/15/evolution4.html. #> It may be desirable to make the sf package available; #> package maintainers should consider adding sf to Suggests:. #> The sp package is now running under evolution status 2 #> (status 2 uses the sf package in place of rgdal) #> Warning: `tidy.SpatialPolygonsDataFrame()` was deprecated in broom 1.0.4. #> ℹ Please use functions from the sf package, namely `sf::st_as_sf()`, in favor #> of sp tidiers. #> ℹ The deprecated feature was likely used in the eurostat package. #> Please report the issue at . #> Regions defined for each Polygons #> Joining with `by = join_by(id)` #> data_frame at resolution 1: 20 cached at: /tmp/Rtmp6OM9cZ/eurostat/df20020164326.RData #> Warning: Default of 'make_valid' for 'output_class=\"sf\"' will be changed in the future (see function details). # } if (FALSE) { spdf <- get_eurostat_geospatial( output_class = \"spdf\", resolution = \"10\", nuts_level = \"3\" ) } if (FALSE) { # ------------------------------------------------------------------- # Minimal example to demonstrate reason/effect of 'make_valid = TRUE' # Spatial data set; rectangle spanning the entire globe with a constant value of 1L. # Requires the R package sf. library(\"sf\") d <- c(-180, -90, -180, 90, 180, 90, 180, -90, -180, -90) poly <- st_polygon(list(matrix(d, ncol = 2, byrow = TRUE))) data <- st_sf(data.frame(geom = st_sfc(poly), data = 1L), crs = st_crs(4326) ) # Causing an error: Self-intersection of some points of the geometry NUTS2_A <- get_eurostat_geospatial(\"sf\", 60, nuts_level = 2, year = 2013, crs = 4326, make_valid = FALSE ) res <- tryCatch(st_interpolate_aw(data, NUTS2_A, extensive = FALSE), error = function(e) e ) print(res) # Resolving the problem using # make_valid = TRUE. 'extensive = FALSE' returns # average over each area, thus resulting in a # constant value of 1 for each geometry in NUTS2_B. NUTS2_B <- get_eurostat_geospatial(\"sf\", 60, nuts_level = 2, year = 2013, crs = 4326, make_valid = TRUE ) res <- st_interpolate_aw(data, NUTS2_B, extensive = FALSE) print(head(res)) }"},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_json.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Data from Eurostat API in JSON — get_eurostat_json","title":"Get Data from Eurostat API in JSON — get_eurostat_json","text":"Retrieve data Eurostat API JSON format.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_json.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Data from Eurostat API in JSON — get_eurostat_json","text":"","code":"get_eurostat_json( id, filters = NULL, type = \"code\", lang = \"EN\", stringsAsFactors = FALSE, ... )"},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_json.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Data from Eurostat API in JSON — get_eurostat_json","text":"id code name dataset interested. See table contents eurostat datasets details. filters named list filters. Names list objects Eurostat variable codes values vectors observation codes. NULL (default) whole dataset returned. See details filters limitations per query. type type variables, \"code\" (default), \"label\" \"\". parameter \"\" return data_frame named vectors, labels values codes names. lang language used metadata. Default EN, options FR DE. stringsAsFactors FALSE (default) variables returned characters. TRUE variables converted factors original Eurostat order. ... Arguments passed httr::GET url url page retrieve config Additional configuration settings http authentication (authenticate()), additional headers (add_headers()), cookies (set_cookies()) etc. See config() full details list helpers. handle handle use request. supplied, retrieved reused handle_pool() based scheme, hostname port url. default httr requests scheme/host/port combo. substantially reduces connection time, ensures cookies maintained multiple requests host. See handle_pool() details.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_json.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get Data from Eurostat API in JSON — get_eurostat_json","text":"dataset object data.frame class.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_json.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get Data from Eurostat API in JSON — get_eurostat_json","text":"Data retrieve Eurostat Web Services can specified filters. Normally, better use JSON query get_eurostat(), use get_eurostat_json() directly. Queries limited 50 sub-indicators time. time can filtered fixed \"time\" filter \"sinceTimePeriod\" \"lastTimePeriod\" filters. sinceTimePeriod = 2000 returns observations 2000 last available. lastTimePeriod = 10 returns 10 last observations. use proxy connect, httr::use_proxy() can passed httr::GET(). example get_eurostat_json(id, filters, config = httr::use_proxy(url, port, username, password)).","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_json.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Get Data from Eurostat API in JSON — get_eurostat_json","text":"See citation(\"eurostat\"):","code":"# # Kindly cite the eurostat R package as follows: # # (C) Leo Lahti, Janne Huovari, Markus Kainu, Przemyslaw Biecek. # Retrieval and analysis of Eurostat open data with the eurostat # package. R Journal 9(1):385-392, 2017. doi: 10.32614/RJ-2017-019 # Package URL: http://ropengov.github.io/eurostat Article URL: # https://journal.r-project.org/archive/2017/RJ-2017-019/index.html # # A BibTeX entry for LaTeX users is # # @Article{, # title = {Retrieval and Analysis of Eurostat Open Data with the eurostat Package}, # author = {Leo Lahti and Janne Huovari and Markus Kainu and Przemyslaw Biecek}, # journal = {The R Journal}, # volume = {9}, # number = {1}, # pages = {385--392}, # year = {2017}, # doi = {10.32614/RJ-2017-019}, # url = {https://doi.org/10.32614/RJ-2017-019}, # }"},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_json.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Get Data from Eurostat API in JSON — get_eurostat_json","text":"Przemyslaw Biecek, Leo Lahti, Janne Huovari Markus Kainu Pyry Kantanen","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_json.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get Data from Eurostat API in JSON — get_eurostat_json","text":"","code":"if (FALSE) { # Generally speaking these queries would be done through get_eurostat tmp <- get_eurostat_json(\"nama_10_gdp\") yy <- get_eurostat_json(\"nama_10_gdp\", filters = list( geo = c(\"FI\", \"SE\", \"EU28\"), time = c(2015:2023), lang = \"FR\", na_item = \"B1GQ\", unit = \"CLV_I10\" )) # TIME_PERIOD filter works also with the new JSON API yy2 <- get_eurostat_json(\"nama_10_gdp\", filters = list( geo = c(\"FI\", \"SE\", \"EU28\"), TIME_PERIOD = c(2015:2023), lang = \"FR\", na_item = \"B1GQ\", unit = \"CLV_I10\" )) # An example from get_eurostat dd <- get_eurostat(\"nama_10_gdp\", filters = list( geo = \"FI\", na_item = \"B1GQ\", unit = \"CLV_I10\" )) }"},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_raw.html","id":null,"dir":"Reference","previous_headings":"","what":"Download Data from Eurostat Database — get_eurostat_raw","title":"Download Data from Eurostat Database — get_eurostat_raw","text":"Download data eurostat database.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_raw.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Download Data from Eurostat Database — get_eurostat_raw","text":"","code":"get_eurostat_raw(id)"},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_raw.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Download Data from Eurostat Database — get_eurostat_raw","text":"id code name dataset interested. See table contents eurostat datasets details.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_raw.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Download Data from Eurostat Database — get_eurostat_raw","text":"dataset tibble format. First column contains comma separated codes cases. columns usually corresponds years column names years preceding X. Data character format contains values together eurostat flags data.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_raw.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Download Data from Eurostat Database — get_eurostat_raw","text":"Data downloaded https://ec.europa.eu/eurostat/estat-navtree-portlet-prod/BulkDownloadListing transformed tabular format.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_raw.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Download Data from Eurostat Database — get_eurostat_raw","text":"See citation(\"eurostat\"):","code":"# # Kindly cite the eurostat R package as follows: # # (C) Leo Lahti, Janne Huovari, Markus Kainu, Przemyslaw Biecek. # Retrieval and analysis of Eurostat open data with the eurostat # package. R Journal 9(1):385-392, 2017. doi: 10.32614/RJ-2017-019 # Package URL: http://ropengov.github.io/eurostat Article URL: # https://journal.r-project.org/archive/2017/RJ-2017-019/index.html # # A BibTeX entry for LaTeX users is # # @Article{, # title = {Retrieval and Analysis of Eurostat Open Data with the eurostat Package}, # author = {Leo Lahti and Janne Huovari and Markus Kainu and Przemyslaw Biecek}, # journal = {The R Journal}, # volume = {9}, # number = {1}, # pages = {385--392}, # year = {2017}, # doi = {10.32614/RJ-2017-019}, # url = {https://doi.org/10.32614/RJ-2017-019}, # }"},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_raw.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Download Data from Eurostat Database — get_eurostat_raw","text":"Przemyslaw Biecek, Leo Lahti Janne Huovari","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_raw.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Download Data from Eurostat Database — get_eurostat_raw","text":"","code":"# \\donttest{ eurostat:::get_eurostat_raw(\"educ_iste\") #> # A tibble: 213 × 16 #> `indic_ed,geo\\\\time` `2012` `2011` `2010` `2009` `2008` `2007` `2006` `2005` #> #> 1 ST1_1,AL NA NA NA NA NA NA NA NA #> 2 ST1_1,AT 10.1 10.2 10.4 10.6 11.0 11.5 11.7 11.8 #> 3 ST1_1,BE 10.5 d 10.5 d 10.5 d 10.5 d 10.8 d 10.8 d 10.9 d 10.8 d #> 4 ST1_1,BE_FRA NA 10.1 10.2 10.3 NA 10.4 10.4 NA #> 5 ST1_1,BE_VLA NA 10.8 10.7 10.7 11.0 11.1 11.2 NA #> 6 ST1_1,BG 13.9 13.8 13.6 13.5 12.8 12.8 12.9 13.2 #> 7 ST1_1,CY 11.5 11.4 11.5 11.8 12.3 13.0 14.0 14.1 #> 8 ST1_1,CZ 13.2 13.3 14.2 d 14.2 d 14.2 d 14.5 d 13.4 14.4 #> 9 ST1_1,DE 15.4 15.7 16.1 16.6 16.7 16.9 17.2 17.2 #> 10 ST1_1,DK : u : u : u : u : u : u : u : u #> # ℹ 203 more rows #> # ℹ 7 more variables: `2004` , `2003` , `2002` , `2001` , #> # `2000` , `1999` , `1998` # }"},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_raw2.html","id":null,"dir":"Reference","previous_headings":"","what":"Download Data from Eurostat Dissemination API — get_eurostat_raw2","title":"Download Data from Eurostat Dissemination API — get_eurostat_raw2","text":"Download data eurostat database new dissemination API.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_raw2.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Download Data from Eurostat Dissemination API — get_eurostat_raw2","text":"","code":"get_eurostat_raw2(id)"},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_raw2.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Download Data from Eurostat Dissemination API — get_eurostat_raw2","text":"id code name dataset interested. See table contents eurostat datasets details.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_raw2.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Download Data from Eurostat Dissemination API — get_eurostat_raw2","text":"dataset tibble format. First column contains comma separated codes cases. columns usually corresponds years column names years preceding X. Data character format contains values together eurostat flags data.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_raw2.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Download Data from Eurostat Dissemination API — get_eurostat_raw2","text":"Data downloaded https://ec.europa.eu/eurostat/estat-navtree-portlet-prod/BulkDownloadListing transformed tabular format.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_raw2.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Download Data from Eurostat Dissemination API — get_eurostat_raw2","text":"See citation(\"eurostat\"):","code":"# # Kindly cite the eurostat R package as follows: # # (C) Leo Lahti, Janne Huovari, Markus Kainu, Przemyslaw Biecek. # Retrieval and analysis of Eurostat open data with the eurostat # package. R Journal 9(1):385-392, 2017. doi: 10.32614/RJ-2017-019 # Package URL: http://ropengov.github.io/eurostat Article URL: # https://journal.r-project.org/archive/2017/RJ-2017-019/index.html # # A BibTeX entry for LaTeX users is # # @Article{, # title = {Retrieval and Analysis of Eurostat Open Data with the eurostat Package}, # author = {Leo Lahti and Janne Huovari and Markus Kainu and Przemyslaw Biecek}, # journal = {The R Journal}, # volume = {9}, # number = {1}, # pages = {385--392}, # year = {2017}, # doi = {10.32614/RJ-2017-019}, # url = {https://doi.org/10.32614/RJ-2017-019}, # }"},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_raw2.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Download Data from Eurostat Dissemination API — get_eurostat_raw2","text":"Przemyslaw Biecek, Leo Lahti, Janne Huovari Pyry Kantanen","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_raw2.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Download Data from Eurostat Dissemination API — get_eurostat_raw2","text":"","code":"# \\donttest{ eurostat:::get_eurostat_raw(\"educ_iste\") #> # A tibble: 213 × 16 #> `indic_ed,geo\\\\time` `2012` `2011` `2010` `2009` `2008` `2007` `2006` `2005` #> #> 1 ST1_1,AL NA NA NA NA NA NA NA NA #> 2 ST1_1,AT 10.1 10.2 10.4 10.6 11.0 11.5 11.7 11.8 #> 3 ST1_1,BE 10.5 d 10.5 d 10.5 d 10.5 d 10.8 d 10.8 d 10.9 d 10.8 d #> 4 ST1_1,BE_FRA NA 10.1 10.2 10.3 NA 10.4 10.4 NA #> 5 ST1_1,BE_VLA NA 10.8 10.7 10.7 11.0 11.1 11.2 NA #> 6 ST1_1,BG 13.9 13.8 13.6 13.5 12.8 12.8 12.9 13.2 #> 7 ST1_1,CY 11.5 11.4 11.5 11.8 12.3 13.0 14.0 14.1 #> 8 ST1_1,CZ 13.2 13.3 14.2 d 14.2 d 14.2 d 14.5 d 13.4 14.4 #> 9 ST1_1,DE 15.4 15.7 16.1 16.6 16.7 16.9 17.2 17.2 #> 10 ST1_1,DK : u : u : u : u : u : u : u : u #> # ℹ 203 more rows #> # ℹ 7 more variables: `2004` , `2003` , `2002` , `2001` , #> # `2000` , `1999` , `1998` # }"},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_toc.html","id":null,"dir":"Reference","previous_headings":"","what":"Download Table of Contents of Eurostat Data Sets — get_eurostat_toc","title":"Download Table of Contents of Eurostat Data Sets — get_eurostat_toc","text":"Download table contents (TOC) eurostat datasets.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_toc.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Download Table of Contents of Eurostat Data Sets — get_eurostat_toc","text":"","code":"get_eurostat_toc()"},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_toc.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Download Table of Contents of Eurostat Data Sets — get_eurostat_toc","text":"tibble eight columns: title: name dataset theme. code: codename dataset theme, used get_eurostat() get_eurostat_raw() functions. type: dataset, folder table. last.update..data, last.table.structure.change, data.start, data.end: Dates.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_toc.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Download Table of Contents of Eurostat Data Sets — get_eurostat_toc","text":"TOC downloaded https://ec.europa.eu/eurostat/estat-navtree-portlet-prod/BulkDownloadListing?sort=1&file=table_of_contents_en.txt. values column 'code' used download selected dataset.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_toc.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Download Table of Contents of Eurostat Data Sets — get_eurostat_toc","text":"See citation(\"eurostat\"):","code":"# # Kindly cite the eurostat R package as follows: # # (C) Leo Lahti, Janne Huovari, Markus Kainu, Przemyslaw Biecek. # Retrieval and analysis of Eurostat open data with the eurostat # package. R Journal 9(1):385-392, 2017. doi: 10.32614/RJ-2017-019 # Package URL: http://ropengov.github.io/eurostat Article URL: # https://journal.r-project.org/archive/2017/RJ-2017-019/index.html # # A BibTeX entry for LaTeX users is # # @Article{, # title = {Retrieval and Analysis of Eurostat Open Data with the eurostat Package}, # author = {Leo Lahti and Janne Huovari and Markus Kainu and Przemyslaw Biecek}, # journal = {The R Journal}, # volume = {9}, # number = {1}, # pages = {385--392}, # year = {2017}, # doi = {10.32614/RJ-2017-019}, # url = {https://doi.org/10.32614/RJ-2017-019}, # }"},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_toc.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Download Table of Contents of Eurostat Data Sets — get_eurostat_toc","text":"Przemyslaw Biecek Leo Lahti ropengov-forum@googlegroups.com","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_toc.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Download Table of Contents of Eurostat Data Sets — get_eurostat_toc","text":"","code":"# \\donttest{ tmp <- get_eurostat_toc() head(tmp) #> # A tibble: 6 × 8 #> title code type `last update of data` last table structure…¹ `data start` #> #> 1 Databas… data fold… NA NA NA #> 2 General… gene… fold… NA NA NA #> 3 Europea… euro… fold… NA NA NA #> 4 Balance… ei_bp fold… NA NA NA #> 5 Current… ei_b… data… 22.08.2023 22.08.2023 1992Q1 #> 6 Financi… ei_b… data… 22.08.2023 22.08.2023 1992Q1 #> # ℹ abbreviated name: ¹​`last table structure change` #> # ℹ 2 more variables: `data end` , values # }"},{"path":"https://ropengov.github.io/eurostat/reference/harmonize_country_code.html","id":null,"dir":"Reference","previous_headings":"","what":"Harmonize Country Code — harmonize_country_code","title":"Harmonize Country Code — harmonize_country_code","text":"European Commission Eurostat generally uses ISO 3166-1 alpha-2 codes two exceptions: EL (GR) used represent Greece, UK (GB) used represent United Kingdom. function turns country codes ISO 3166-1 alpha-2.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/harmonize_country_code.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Harmonize Country Code — harmonize_country_code","text":"","code":"harmonize_country_code(x)"},{"path":"https://ropengov.github.io/eurostat/reference/harmonize_country_code.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Harmonize Country Code — harmonize_country_code","text":"x character factor vector eurostat countycodes.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/harmonize_country_code.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Harmonize Country Code — harmonize_country_code","text":"vector.","code":""},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/harmonize_country_code.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Harmonize Country Code — harmonize_country_code","text":"Janne Huovari janne.huovari@ptt.fi","code":""},{"path":"https://ropengov.github.io/eurostat/reference/harmonize_country_code.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Harmonize Country Code — harmonize_country_code","text":"","code":"# \\donttest{ lp <- get_eurostat(\"nama_10_lp_ulc\") lp$geo <- harmonize_country_code(lp$geo) # }"},{"path":"https://ropengov.github.io/eurostat/reference/harmonize_geo_code.html","id":null,"dir":"Reference","previous_headings":"","what":"Harmonize NUTS region codes that changed with the NUTS2016\ndefinition — harmonize_geo_code","title":"Harmonize NUTS region codes that changed with the NUTS2016\ndefinition — harmonize_geo_code","text":"Eurostat mixes NUTS2013 NUTS2016 geographic label codes 'geo' column, creates time-wise comparativity issues. deprecated function checked data affected problem gives information . function deprecated, general function moved regions::validate_nuts_regions().","code":""},{"path":"https://ropengov.github.io/eurostat/reference/harmonize_geo_code.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Harmonize NUTS region codes that changed with the NUTS2016\ndefinition — harmonize_geo_code","text":"","code":"harmonize_geo_code(dat)"},{"path":"https://ropengov.github.io/eurostat/reference/harmonize_geo_code.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Harmonize NUTS region codes that changed with the NUTS2016\ndefinition — harmonize_geo_code","text":"dat Eurostat data frame downloaded get_eurostat()","code":""},{"path":"https://ropengov.github.io/eurostat/reference/harmonize_geo_code.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Harmonize NUTS region codes that changed with the NUTS2016\ndefinition — harmonize_geo_code","text":"augmented data frame explains potential problems possible solutions.","code":""},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/harmonize_geo_code.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Harmonize NUTS region codes that changed with the NUTS2016\ndefinition — harmonize_geo_code","text":"Daniel Antal","code":""},{"path":"https://ropengov.github.io/eurostat/reference/harmonize_geo_code.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Harmonize NUTS region codes that changed with the NUTS2016\ndefinition — harmonize_geo_code","text":"","code":"dat <- eurostat::tgs00026 regions::validate_nuts_regions(dat) #> # A tibble: 2,723 × 8 #> unit direct na_item geo time values typology valid_2016 #> #> 1 PPS_EU27_2020_HAB BAL B6N AT11 2009 18900 nuts_level_2 TRUE #> 2 PPS_EU27_2020_HAB BAL B6N AT12 2009 19900 nuts_level_2 TRUE #> 3 PPS_EU27_2020_HAB BAL B6N AT13 2009 19800 nuts_level_2 TRUE #> 4 PPS_EU27_2020_HAB BAL B6N AT21 2009 18500 nuts_level_2 TRUE #> 5 PPS_EU27_2020_HAB BAL B6N AT22 2009 18700 nuts_level_2 TRUE #> 6 PPS_EU27_2020_HAB BAL B6N AT31 2009 19300 nuts_level_2 TRUE #> 7 PPS_EU27_2020_HAB BAL B6N AT32 2009 19600 nuts_level_2 TRUE #> 8 PPS_EU27_2020_HAB BAL B6N AT33 2009 18700 nuts_level_2 TRUE #> 9 PPS_EU27_2020_HAB BAL B6N AT34 2009 19700 nuts_level_2 TRUE #> 10 PPS_EU27_2020_HAB BAL B6N BE10 2009 15400 nuts_level_2 TRUE #> # ℹ 2,713 more rows"},{"path":"https://ropengov.github.io/eurostat/reference/label_eurostat.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Eurostat Codes — label_eurostat","title":"Get Eurostat Codes — label_eurostat","text":"Get definitions Eurostat codes Eurostat dictionaries.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/label_eurostat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Eurostat Codes — label_eurostat","text":"","code":"label_eurostat( x, dic = NULL, code = NULL, eu_order = FALSE, lang = \"en\", countrycode = NULL, countrycode_nomatch = NULL, custom_dic = NULL, fix_duplicated = FALSE ) label_eurostat_vars(x, lang = \"en\") label_eurostat_tables(x, lang = \"en\") label_eurostat_vars(x, lang = \"en\") label_eurostat_tables(x, lang = \"en\")"},{"path":"https://ropengov.github.io/eurostat/reference/label_eurostat.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Eurostat Codes — label_eurostat","text":"x character factor vector data_frame. dic string (vector) naming eurostat dictionary dictionaries. NULL (default) dictionary names taken column names data_frame. code data_frames names column also code columns retained. suffix \"_code\" added code column names. eu_order Logical. Eurostat ordering used label levels. Affects factors. lang character, code language. Available \"en\" (default), \"fr\" \"de\". countrycode NULL name coding scheme countrycode::countrycode() label \"geo\" variable countrycode-package. can used convert short long country names many different languages. NULL (default) eurostat dictionary used instead. countrycode_nomatch using countrycode label \"geo\" countrycode fails find match, example country codes like EU28. original code used NULL (default), eurostat dictionary label used \"eurostat\", NA used NA. custom_dic named vector named list named vectors give dictionary (part ) codes. Names vector codes values labels. List can used specify dictionaries list names dictionary codes. fix_duplicated logical. TRUE, code added duplicated label values. FALSE (default) error given labeling produce duplicates.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/label_eurostat.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get Eurostat Codes — label_eurostat","text":"vector data_frame.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/label_eurostat.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get Eurostat Codes — label_eurostat","text":"character factor vector codes returns corresponding vector definitions. label_eurostat() labels also data_frames get_eurostat(). vectors dictionary name supplied. data_frames dictionary names taken column names. \"time\" \"values\" columns returned , can supply data_frame get_eurostat() get data_frame definitions instead codes. Eurostat dictionaries includes duplicated labels. default duplicated labels cause error, can fixed automatically fix_duplicated = TRUE.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/label_eurostat.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"Get Eurostat Codes — label_eurostat","text":"label_eurostat_vars(): Get definitions variable (column) names. objects characters factors definitions get names. label_eurostat_tables(): Get definitions table names label_eurostat_vars(): Get definitions variable (column) names. objects characters factors definitions get names. label_eurostat_tables(): Get definitions table names","code":""},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/label_eurostat.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Get Eurostat Codes — label_eurostat","text":"Janne Huovari janne.huovari@ptt.fi","code":""},{"path":"https://ropengov.github.io/eurostat/reference/label_eurostat.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get Eurostat Codes — label_eurostat","text":"","code":"if (FALSE) { lp <- get_eurostat(\"nama_10_lp_ulc\") lpl <- label_eurostat(lp) str(lpl) lpl_order <- label_eurostat(lp, eu_order = TRUE) lpl_code <- label_eurostat(lp, code = \"unit\") label_eurostat_vars(names(lp)) label_eurostat_tables(\"nama_10_lp_ulc\") label_eurostat(c(\"FI\", \"DE\", \"EU28\"), dic = \"geo\") label_eurostat(c(\"FI\", \"DE\", \"EU28\"), dic = \"geo\", custom_dic = c(DE = \"Germany\")) label_eurostat(c(\"FI\", \"DE\", \"EU28\"), dic = \"geo\", countrycode = \"country.name\", custom_dic = c(EU28 = \"EU\") ) label_eurostat(c(\"FI\", \"DE\", \"EU28\"), dic = \"geo\", countrycode = \"country.name\") # In Finnish label_eurostat(c(\"FI\", \"DE\", \"EU28\"), dic = \"geo\", countrycode = \"cldr.short.fi\") }"},{"path":"https://ropengov.github.io/eurostat/reference/label_eurostat2.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Eurostat Codes for data downloaded from new dissemination API — label_eurostat2","title":"Get Eurostat Codes for data downloaded from new dissemination API — label_eurostat2","text":"Get definitions Eurostat codes Eurostat dictionaries.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/label_eurostat2.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Eurostat Codes for data downloaded from new dissemination API — label_eurostat2","text":"","code":"label_eurostat2( x, dic = NULL, code = NULL, eu_order = FALSE, lang = \"en\", countrycode = NULL, countrycode_nomatch = NULL, custom_dic = NULL, fix_duplicated = FALSE )"},{"path":"https://ropengov.github.io/eurostat/reference/label_eurostat2.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Eurostat Codes for data downloaded from new dissemination API — label_eurostat2","text":"x character factor vector data_frame. dic string (vector) naming eurostat dictionary dictionaries. NULL (default) dictionary names taken column names data_frame. code data_frames names column also code columns retained. suffix \"_code\" added code column names. eu_order Logical. Eurostat ordering used label levels. Affects factors. lang character, code language. Available \"en\" (default), \"fr\" \"de\". countrycode NULL name coding scheme countrycode::countrycode() label \"geo\" variable countrycode-package. can used convert short long country names many different languages. NULL (default) eurostat dictionary used instead. countrycode_nomatch using countrycode label \"geo\" countrycode fails find match, example country codes like EU28. original code used NULL (default), eurostat dictionary label used \"eurostat\", NA used NA. custom_dic named vector named list named vectors give dictionary (part ) codes. Names vector codes values labels. List can used specify dictionaries list names dictionary codes. fix_duplicated logical. TRUE, code added duplicated label values. FALSE (default) error given labeling produce duplicates.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/label_eurostat2.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get Eurostat Codes for data downloaded from new dissemination API — label_eurostat2","text":"vector data_frame.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/label_eurostat2.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get Eurostat Codes for data downloaded from new dissemination API — label_eurostat2","text":"character factor vector codes returns corresponding vector definitions. label_eurostat() labels also data_frames get_eurostat(). vectors dictionary name supplied. data_frames dictionary names taken column names. \"time\" \"values\" columns returned , can supply data_frame get_eurostat() get data_frame definitions instead codes. Eurostat dictionaries includes duplicated labels. default duplicated labels cause error, can fixed automatically fix_duplicated = TRUE.","code":""},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/label_eurostat2.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Get Eurostat Codes for data downloaded from new dissemination API — label_eurostat2","text":"Janne Huovari janne.huovari@ptt.fi","code":""},{"path":"https://ropengov.github.io/eurostat/reference/label_eurostat2.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get Eurostat Codes for data downloaded from new dissemination API — label_eurostat2","text":"","code":"if (FALSE) { lp <- get_eurostat(\"nama_10_lp_ulc\") lpl <- label_eurostat(lp) str(lpl) lpl_order <- label_eurostat(lp, eu_order = TRUE) lpl_code <- label_eurostat(lp, code = \"unit\") label_eurostat_vars(names(lp)) label_eurostat_tables(\"nama_10_lp_ulc\") label_eurostat(c(\"FI\", \"DE\", \"EU28\"), dic = \"geo\") label_eurostat(c(\"FI\", \"DE\", \"EU28\"), dic = \"geo\", custom_dic = c(DE = \"Germany\")) label_eurostat(c(\"FI\", \"DE\", \"EU28\"), dic = \"geo\", countrycode = \"country.name\", custom_dic = c(EU28 = \"EU\") ) label_eurostat(c(\"FI\", \"DE\", \"EU28\"), dic = \"geo\", countrycode = \"country.name\") # In Finnish label_eurostat(c(\"FI\", \"DE\", \"EU28\"), dic = \"geo\", countrycode = \"cldr.short.fi\") }"},{"path":"https://ropengov.github.io/eurostat/reference/recode_to_nuts_2013.html","id":null,"dir":"Reference","previous_headings":"","what":"Recode geo labels and rename regions from NUTS2016 to NUTS2013 — recode_to_nuts_2013","title":"Recode geo labels and rename regions from NUTS2016 to NUTS2013 — recode_to_nuts_2013","text":"Eurostat mixes NUTS2013 NUTS2016 geographic label codes 'geo' column, creates time-wise comparativity issues. function deprecated, general function moved [regions::recode_nuts()].","code":""},{"path":"https://ropengov.github.io/eurostat/reference/recode_to_nuts_2013.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Recode geo labels and rename regions from NUTS2016 to NUTS2013 — recode_to_nuts_2013","text":"","code":"recode_to_nuts_2013(dat)"},{"path":"https://ropengov.github.io/eurostat/reference/recode_to_nuts_2013.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Recode geo labels and rename regions from NUTS2016 to NUTS2013 — recode_to_nuts_2013","text":"dat Eurostat data frame downloaded get_eurostat().","code":""},{"path":"https://ropengov.github.io/eurostat/reference/recode_to_nuts_2013.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Recode geo labels and rename regions from NUTS2016 to NUTS2013 — recode_to_nuts_2013","text":"augmented potentially relabelled data frame contains formerly 'NUTS2013' definition geo labels 'NUTS2016' vocabulary code changed, boundary . also contains information geo labels brought current 'NUTS2013' definition. Furthermore, official name region changed, use new name (otherwise region boundary change.) called , function use helper function harmonize_geo_code()","code":""},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/recode_to_nuts_2013.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Recode geo labels and rename regions from NUTS2016 to NUTS2013 — recode_to_nuts_2013","text":"Daniel Antal","code":""},{"path":"https://ropengov.github.io/eurostat/reference/recode_to_nuts_2013.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Recode geo labels and rename regions from NUTS2016 to NUTS2013 — recode_to_nuts_2013","text":"","code":"test_regional_codes <- data.frame( geo = c(\"FRB\", \"FRE\", \"UKN02\", \"IE022\", \"FR243\", \"FRB03\"), time = c(rep(as.Date(\"2014-01-01\"), 5), as.Date(\"2015-01-01\")), values = c(1:6), control = c( \"Changed from NUTS2 to NUTS1\", \"New region NUTS2016 only\", \"Discontinued region NUTS2013\", \"Boundary shift NUTS2013\", \"Recoded in NUTS2013\", \"Recoded in NUTS2016\" ) ) recode_to_nuts_2013(test_regional_codes) #> Warning: The 'recode_to_nuts_2013' function is deprecated. Use instead regions::recode_nuts(dat, nuts_year = 2013) #> geo time values control typology #> 1 UKN02 2014-01-01 3 Discontinued region NUTS2013 nuts_level_3 #> 2 IE022 2014-01-01 4 Boundary shift NUTS2013 nuts_level_3 #> 3 FR243 2014-01-01 5 Recoded in NUTS2013 nuts_level_3 #> 4 FRB03 2015-01-01 6 Recoded in NUTS2016 nuts_level_3 #> 5 FRB 2014-01-01 1 Changed from NUTS2 to NUTS1 nuts_level_1 #> 6 FRE 2014-01-01 2 New region NUTS2016 only nuts_level_1 #> typology_change code_2013 #> 1 unchanged UKN02 #> 2 unchanged IE022 #> 3 unchanged FR243 #> 4 Recoded from FRB03 [used in NUTS 2016-2021] FR243 #> 5 Used in NUTS 2016-2021 #> 6 Used in NUTS 2016-2021 "},{"path":"https://ropengov.github.io/eurostat/reference/recode_to_nuts_2016.html","id":null,"dir":"Reference","previous_headings":"","what":"Recode geo labels and rename regions from NUTS2013 to NUTS2016 — recode_to_nuts_2016","title":"Recode geo labels and rename regions from NUTS2013 to NUTS2016 — recode_to_nuts_2016","text":"Eurostat mixes NUTS2013 NUTS2016 geographic label codes 'geo' column, creates time-wise comparativity issues. function deprecated, general function moved [regions::recode_nuts()].","code":""},{"path":"https://ropengov.github.io/eurostat/reference/recode_to_nuts_2016.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Recode geo labels and rename regions from NUTS2013 to NUTS2016 — recode_to_nuts_2016","text":"","code":"recode_to_nuts_2016(dat)"},{"path":"https://ropengov.github.io/eurostat/reference/recode_to_nuts_2016.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Recode geo labels and rename regions from NUTS2013 to NUTS2016 — recode_to_nuts_2016","text":"dat Eurostat data frame downloaded get_eurostat().","code":""},{"path":"https://ropengov.github.io/eurostat/reference/recode_to_nuts_2016.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Recode geo labels and rename regions from NUTS2013 to NUTS2016 — recode_to_nuts_2016","text":"augmented potentially relabelled data frame contains formerly 'NUTS2013' definition geo labels 'NUTS2016' vocabulary code changed, boundary . also contains information geo labels brought current 'NUTS2016' definition. Furthermore, official name region changed, use new name (otherwise region boundary change.) called , function use helper function harmonize_geo_code()","code":""},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/recode_to_nuts_2016.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Recode geo labels and rename regions from NUTS2013 to NUTS2016 — recode_to_nuts_2016","text":"Daniel Antal","code":""},{"path":"https://ropengov.github.io/eurostat/reference/recode_to_nuts_2016.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Recode geo labels and rename regions from NUTS2013 to NUTS2016 — recode_to_nuts_2016","text":"","code":"test_regional_codes <- data.frame( geo = c(\"FRB\", \"FRE\", \"UKN02\", \"IE022\", \"FR243\", \"FRB03\"), time = c(rep(as.Date(\"2014-01-01\"), 5), as.Date(\"2015-01-01\")), values = c(1:6), control = c( \"Changed from NUTS2 to NUTS1\", \"New region NUTS2016 only\", \"Discontinued region NUTS2013\", \"Boundary shift NUTS2013\", \"Recoded in NUTS2013\", \"Recoded in NUTS2016\" ) ) recode_to_nuts_2016(test_regional_codes) #> Warning: The 'recode_to_nuts_2013' function is deprecated. Use instead regions::recode_nuts(dat, nuts_year = 2016) #> geo time values control typology #> 1 FRB 2014-01-01 1 Changed from NUTS2 to NUTS1 nuts_level_1 #> 2 FRE 2014-01-01 2 New region NUTS2016 only nuts_level_1 #> 3 FRB03 2015-01-01 6 Recoded in NUTS2016 nuts_level_3 #> 4 IE022 2014-01-01 4 Boundary shift NUTS2013 nuts_level_3 #> 5 FR243 2014-01-01 5 Recoded in NUTS2013 nuts_level_3 #> 6 UKN02 2014-01-01 3 Discontinued region NUTS2013 nuts_level_3 #> typology_change code_2016 #> 1 unchanged FRB #> 2 unchanged FRE #> 3 unchanged FRB03 #> 4 Recoded from IE022 [used in NUTS 2013-2013] IE062 #> 5 Recoded from FR243 [used in NUTS 1999-2013] FRB03 #> 6 Used in NUTS 1999-2013 "},{"path":"https://ropengov.github.io/eurostat/reference/reexports.html","id":null,"dir":"Reference","previous_headings":"","what":"Recode Region Codes From Source To Target NUTS Typology — reexports","title":"Recode Region Codes From Source To Target NUTS Typology — reexports","text":"objects imported packages. Follow links see documentation. regions recode_nuts, validate_geo_code, validate_nuts_regions","code":""},{"path":"https://ropengov.github.io/eurostat/reference/reexports.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Recode Region Codes From Source To Target NUTS Typology — reexports","text":"dat data frame 3-5 character geo_var variable validated. geo_var Defaults \"geo\". variable contains 3-5 character geo codes validated. geo vector geographical code validate. nuts_year valid NUTS edition year.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/reexports.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Recode Region Codes From Source To Target NUTS Typology — reexports","text":"original data frame 'geo_var' column extended 'typology' column states typology 'geo_var' valid code. invalid codes, looks potential reasons invalidity adds 'typology_change' column, last adds column character vector containing desired codes target typology, example, NUTS2013 typology. Returns original dat data frame column specifies comformity NUTS definition year nuts_year. character list valid typology, 'invalid' cases geo coding valid.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/reexports.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Recode Region Codes From Source To Target NUTS Typology — reexports","text":"country codes technically part NUTS typologies, Eurostat de facto uses NUTS0 typology identify countries. de facto typology three exception handled validate_nuts_countries function. NUTS typologies different versions, therefore conformity validated one specific versions, can : 1999, 2003, 2006, 2010, 2013, currently used 2016 already announced defined 2021. NUTS typology codified NUTS2003, pre-1999 NUTS typologies may confuse programmatic data processing, given NUTS1 regions identified country codes smaller countries NUTS1 divisions. Currently 2016 used Eurostat, many datasets still contain 2013 sometimes earlier metadata.","code":""},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/reexports.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Recode Region Codes From Source To Target NUTS Typology — reexports","text":"","code":"{ foo <- data.frame ( geo = c(\"FR\", \"DEE32\", \"UKI3\" , \"HU12\", \"DED\", \"FRK\"), values = runif(6, 0, 100 ), stringsAsFactors = FALSE ) recode_nuts(foo, nuts_year = 2013) } #> geo values typology typology_change #> 1 FR 19.12970 country unchanged #> 2 UKI3 23.82247 nuts_level_2 unchanged #> 3 DED 62.56592 nuts_level_1 unchanged #> 4 FRK 55.17743 nuts_level_1 Recoded from FRK [used in NUTS 2016-2021] #> 5 HU12 41.61043 nuts_level_2 Used in NUTS 2016-2021 #> 6 DEE32 53.37879 nuts_level_3 Used in NUTS 1999-2003 #> code_2013 #> 1 FR #> 2 UKI3 #> 3 DED #> 4 FR7 #> 5 #> 6 # \\donttest{ my_reg_data <- data.frame( geo = c( \"BE1\", \"HU102\", \"FR1\", \"DED\", \"FR7\", \"TR\", \"DED2\", \"EL\", \"XK\", \"GB\" ), values = runif(10) ) validate_nuts_regions(my_reg_data) #> geo values typology valid_2016 #> 1 BE1 0.8416855 nuts_level_1 TRUE #> 2 HU102 0.1154436 FALSE #> 3 FR1 0.4801797 nuts_level_1 TRUE #> 4 DED 0.7098627 nuts_level_1 TRUE #> 5 FR7 0.8548628 iso-3166-alpha-3 FALSE #> 6 TR 0.2696520 country TRUE #> 7 DED2 0.9082836 nuts_level_2 TRUE #> 8 EL 0.1844783 country TRUE #> 9 XK 0.5022647 country TRUE #> 10 GB 0.1019123 country TRUE validate_nuts_regions(my_reg_data, nuts_year = 2013) #> geo values typology valid_2013 #> 1 BE1 0.8416855 nuts_level_1 TRUE #> 2 HU102 0.1154436 nuts_level_3 TRUE #> 3 FR1 0.4801797 nuts_level_1 TRUE #> 4 DED 0.7098627 nuts_level_1 TRUE #> 5 FR7 0.8548628 nuts_level_1 TRUE #> 6 TR 0.2696520 country TRUE #> 7 DED2 0.9082836 nuts_level_2 TRUE #> 8 EL 0.1844783 country TRUE #> 9 XK 0.5022647 country TRUE #> 10 GB 0.1019123 country TRUE validate_nuts_regions(my_reg_data, nuts_year = 2003) #> geo values typology valid_2003 #> 1 BE1 0.8416855 nuts_level_1 TRUE #> 2 HU102 0.1154436 FALSE #> 3 FR1 0.4801797 nuts_level_1 TRUE #> 4 DED 0.7098627 nuts_level_1 TRUE #> 5 FR7 0.8548628 nuts_level_1 TRUE #> 6 TR 0.2696520 country TRUE #> 7 DED2 0.9082836 nuts_level_2 TRUE #> 8 EL 0.1844783 country TRUE #> 9 XK 0.5022647 country TRUE #> 10 GB 0.1019123 country TRUE # } # \\donttest{ my_reg_data <- data.frame( geo = c( \"BE1\", \"HU102\", \"FR1\", \"DED\", \"FR7\", \"TR\", \"DED2\", \"EL\", \"XK\", \"GB\" ), values = runif(10) ) validate_geo_code(my_reg_data$geo) #> [1] \"nuts_level_1\" \"invalid\" \"nuts_level_1\" \"nuts_level_1\" #> [5] \"invalid\" \"non_eu_country\" \"nuts_level_2\" \"country\" #> [9] \"non_eu_country\" \"iso_country\" # }"},{"path":"https://ropengov.github.io/eurostat/reference/search_eurostat.html","id":null,"dir":"Reference","previous_headings":"","what":"Grep Datasets Titles from Eurostat — search_eurostat","title":"Grep Datasets Titles from Eurostat — search_eurostat","text":"Lists names dataset eurostat particular pattern description.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/search_eurostat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Grep Datasets Titles from Eurostat — search_eurostat","text":"","code":"search_eurostat(pattern, type = \"dataset\", fixed = TRUE) grepEurostatTOC(pattern, type = \"dataset\")"},{"path":"https://ropengov.github.io/eurostat/reference/search_eurostat.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Grep Datasets Titles from Eurostat — search_eurostat","text":"pattern Character, datasets, folder tables pattern description returned (depending 'type' argument) type Grep Eurostat table contents either 'dataset' (default), 'folder', 'table' \"\" (types). fixed logical. TRUE, pattern string matched . Change FALSE complex regex matching needed.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/search_eurostat.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Grep Datasets Titles from Eurostat — search_eurostat","text":"tibble eight columns title: name dataset theme code: codename dataset theme, used get_eurostat() get_eurostat_raw() functions. type: dataset, folder table. last.update..data, last.table.structure.change, data.start, data.end: Dates.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/search_eurostat.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Grep Datasets Titles from Eurostat — search_eurostat","text":"Downloads list datasets available eurostat return list names datasets contains particular pattern dataset description. E.g. datasets related education teaching.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/search_eurostat.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"Grep Datasets Titles from Eurostat — search_eurostat","text":"grepEurostatTOC(): Old deprecated version","code":""},{"path":"https://ropengov.github.io/eurostat/reference/search_eurostat.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Grep Datasets Titles from Eurostat — search_eurostat","text":"See citation(\"eurostat\"):","code":"# # Kindly cite the eurostat R package as follows: # # (C) Leo Lahti, Janne Huovari, Markus Kainu, Przemyslaw Biecek. # Retrieval and analysis of Eurostat open data with the eurostat # package. R Journal 9(1):385-392, 2017. doi: 10.32614/RJ-2017-019 # Package URL: http://ropengov.github.io/eurostat Article URL: # https://journal.r-project.org/archive/2017/RJ-2017-019/index.html # # A BibTeX entry for LaTeX users is # # @Article{, # title = {Retrieval and Analysis of Eurostat Open Data with the eurostat Package}, # author = {Leo Lahti and Janne Huovari and Markus Kainu and Przemyslaw Biecek}, # journal = {The R Journal}, # volume = {9}, # number = {1}, # pages = {385--392}, # year = {2017}, # doi = {10.32614/RJ-2017-019}, # url = {https://doi.org/10.32614/RJ-2017-019}, # }"},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/search_eurostat.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Grep Datasets Titles from Eurostat — search_eurostat","text":"Przemyslaw Biecek Leo Lahti ropengov-forum@googlegroups.com","code":""},{"path":"https://ropengov.github.io/eurostat/reference/search_eurostat.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Grep Datasets Titles from Eurostat — search_eurostat","text":"","code":"# \\donttest{ tmp <- search_eurostat(\"education\") head(tmp) #> # A tibble: 6 × 8 #> title code type `last update of data` last table structure…¹ `data start` #> #> 1 Populat… cens… data… 01.04.2019 08.02.2021 2011 #> 2 Populat… cens… data… 26.08.2015 08.02.2021 2011 #> 3 Employe… cens… data… 26.03.2009 08.02.2021 2001 #> 4 Populat… cens… data… 26.03.2009 08.02.2021 2001 #> 5 Pupils … educ… data… 07.07.2023 07.07.2023 2013 #> 6 Pupils … educ… data… 07.07.2023 07.07.2023 2013 #> # ℹ abbreviated name: ¹​`last table structure change` #> # ℹ 2 more variables: `data end` , values # Use \"fixed = TRUE\" when pattern has characters that would need escaping. # Here, parentheses would normally need to be escaped in regex tmp <- search_eurostat(\"Live births (total) by NUTS 3 region\", fixed = TRUE) # }"},{"path":"https://ropengov.github.io/eurostat/reference/set_eurostat_cache_dir.html","id":null,"dir":"Reference","previous_headings":"","what":"Set Eurostat Cache — set_eurostat_cache_dir","title":"Set Eurostat Cache — set_eurostat_cache_dir","text":"function store cache_dir path local machine load future sessions. Type Sys.getenv(\"EUROSTAT_CACHE_DIR\") find cached path. Alternatively, can store cache_dir manually following options: Run Sys.setenv(EUROSTAT_CACHE_DIR = \"cache_dir\"). need run command session (Similar install = FALSE). Set options(eurostat_cache_dir = \"cache_dir\"). Similar previous option. provided backwards compatibility purposes. Write line .Renviron file: EUROSTAT_CACHE_DIR = \"value_for_cache_dir\" (behavior install = TRUE). store cache_dir permanently.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/set_eurostat_cache_dir.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set Eurostat Cache — set_eurostat_cache_dir","text":"","code":"set_eurostat_cache_dir( cache_dir, overwrite = FALSE, install = FALSE, verbose = TRUE )"},{"path":"https://ropengov.github.io/eurostat/reference/set_eurostat_cache_dir.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set Eurostat Cache — set_eurostat_cache_dir","text":"cache_dir path cache directory. missing value function store cached files temporary dir (See base::tempdir()). overwrite set TRUE, overwrite existing EUROSTAT_CACHE_DIR already local machine. install TRUE, install key local machine use future sessions. Defaults FALSE. cache_dir FALSE parameter set FALSE automatically. verbose Logical, displays information. Useful debugging, default FALSE.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/set_eurostat_cache_dir.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set Eurostat Cache — set_eurostat_cache_dir","text":"(invisible) character path cache_dir.","code":""},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/set_eurostat_cache_dir.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Set Eurostat Cache — set_eurostat_cache_dir","text":"Diego Hernangómez","code":""},{"path":"https://ropengov.github.io/eurostat/reference/set_eurostat_cache_dir.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Set Eurostat Cache — set_eurostat_cache_dir","text":"","code":"# Don't run this! It would modify your current state if (FALSE) { set_eurostat_cache_dir(verbose = TRUE) } Sys.getenv(\"EUROSTAT_CACHE_DIR\") #> [1] \"/tmp/Rtmp6OM9cZ/eurostat\""},{"path":"https://ropengov.github.io/eurostat/reference/set_eurostat_toc.html","id":null,"dir":"Reference","previous_headings":"","what":"Set Eurostat TOC — set_eurostat_toc","title":"Set Eurostat TOC — set_eurostat_toc","text":"Internal function.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/set_eurostat_toc.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set Eurostat TOC — set_eurostat_toc","text":"","code":"set_eurostat_toc(...)"},{"path":"https://ropengov.github.io/eurostat/reference/set_eurostat_toc.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set Eurostat TOC — set_eurostat_toc","text":"... Arguments passed","code":""},{"path":"https://ropengov.github.io/eurostat/reference/set_eurostat_toc.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set Eurostat TOC — set_eurostat_toc","text":"Empty element","code":""},{"path":"https://ropengov.github.io/eurostat/reference/set_eurostat_toc.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Set Eurostat TOC — set_eurostat_toc","text":"see citation(\"eurostat\")","code":""},{"path":"https://ropengov.github.io/eurostat/reference/set_eurostat_toc.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Set Eurostat TOC — set_eurostat_toc","text":"Przemyslaw Biecek Leo Lahti ropengov-forum@googlegroups.com","code":""},{"path":"https://ropengov.github.io/eurostat/reference/tgs00026.html","id":null,"dir":"Reference","previous_headings":"","what":"Auxiliary Data — tgs00026","title":"Auxiliary Data — tgs00026","text":"Auxiliary Data Sets","code":""},{"path":"https://ropengov.github.io/eurostat/reference/tgs00026.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Auxiliary Data — tgs00026","text":"","code":"tgs00026"},{"path":"https://ropengov.github.io/eurostat/reference/tgs00026.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Auxiliary Data — tgs00026","text":"data_frame","code":""},{"path":"https://ropengov.github.io/eurostat/reference/tgs00026.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Auxiliary Data — tgs00026","text":"Disposable income private households NUTS 2 regions Retrieved : tgs00026 <- get_eurostat(\"tgs00026\", time_format = \"raw\") Data retrieval date: 2022-06-27","code":""},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/tidy_eurostat.html","id":null,"dir":"Reference","previous_headings":"","what":"Transform Data into Row-Column-Value Format — tidy_eurostat","title":"Transform Data into Row-Column-Value Format — tidy_eurostat","text":"Transform raw Eurostat data table row-column-value format (RCV).","code":""},{"path":"https://ropengov.github.io/eurostat/reference/tidy_eurostat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Transform Data into Row-Column-Value Format — tidy_eurostat","text":"","code":"tidy_eurostat( dat, time_format = \"date\", select_time = NULL, stringsAsFactors = FALSE, keepFlags = FALSE )"},{"path":"https://ropengov.github.io/eurostat/reference/tidy_eurostat.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Transform Data into Row-Column-Value Format — tidy_eurostat","text":"dat data_frame get_eurostat_raw(). time_format string giving type conversion time column eurostat format. \"date\" (default) converts Date() first date period. \"date_last\" converts Date() last date period. \"num\" converts numeric \"raw\" conversion. See eurotime2date() eurotime2num(). select_time character symbol time frequency NULL (default). stringsAsFactors TRUE (default) variables converted factors original Eurostat order. FALSE returned strings. keepFlags logical whether flags (e.g. \"confidential\", \"provisional\") kept separate column can removed. Default FALSE","code":""},{"path":"https://ropengov.github.io/eurostat/reference/tidy_eurostat.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Transform Data into Row-Column-Value Format — tidy_eurostat","text":"tibble molten format last column 'values'.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/tidy_eurostat.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Transform Data into Row-Column-Value Format — tidy_eurostat","text":"See citation(\"eurostat\").","code":""},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/tidy_eurostat.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Transform Data into Row-Column-Value Format — tidy_eurostat","text":"Przemyslaw Biecek, Leo Lahti Janne Huovari","code":""},{"path":"https://ropengov.github.io/eurostat/reference/tidy_eurostat2.html","id":null,"dir":"Reference","previous_headings":"","what":"Transform Data from the New Dissemination API into Row-Column-Value Format — tidy_eurostat2","title":"Transform Data from the New Dissemination API into Row-Column-Value Format — tidy_eurostat2","text":"Transform raw Eurostat data table downloaded new dissemination API row-column-value format (RCV).","code":""},{"path":"https://ropengov.github.io/eurostat/reference/tidy_eurostat2.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Transform Data from the New Dissemination API into Row-Column-Value Format — tidy_eurostat2","text":"","code":"tidy_eurostat2( dat, time_format = \"date\", select_time = NULL, stringsAsFactors = FALSE, keepFlags = FALSE )"},{"path":"https://ropengov.github.io/eurostat/reference/tidy_eurostat2.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Transform Data from the New Dissemination API into Row-Column-Value Format — tidy_eurostat2","text":"dat data_frame get_eurostat_raw(). time_format string giving type conversion time column eurostat format. \"date\" (default) converts Date() first date period. \"date_last\" converts Date() last date period. \"num\" converts numeric \"raw\" conversion. See eurotime2date() eurotime2num(). select_time single character symbol time frequency, vector containing multiple time frequencies, NULL (default). Available options \"\" (annual), \"Q\" (quarterly), \"S\" (semester, 1st 2nd half year), \"M\" (monthly) \"D\" (daily). downloading data New Dissemination API, now possible select multiple time frequencies return data.frame object. stringsAsFactors TRUE (default) variables converted factors original Eurostat order. FALSE returned strings. keepFlags logical whether flags (e.g. \"confidential\", \"provisional\") kept separate column can removed. Default FALSE","code":""},{"path":"https://ropengov.github.io/eurostat/reference/tidy_eurostat2.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Transform Data from the New Dissemination API into Row-Column-Value Format — tidy_eurostat2","text":"tibble molten format last column 'values'.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/tidy_eurostat2.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Transform Data from the New Dissemination API into Row-Column-Value Format — tidy_eurostat2","text":"See citation(\"eurostat\").","code":""},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/tidy_eurostat2.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Transform Data from the New Dissemination API into Row-Column-Value Format — tidy_eurostat2","text":"Przemyslaw Biecek, Leo Lahti, Janne Huovari Pyry Kantanen","code":""},{"path":"https://ropengov.github.io/eurostat/reference/tidy_eurostat2.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Transform Data from the New Dissemination API into Row-Column-Value Format — tidy_eurostat2","text":"","code":"if (FALSE) { # Example of a dataset with multiple time series get_eurostat(\"AVIA_GOR_ME\", time_format = \"date_last\", cache = F, bulk_new_style = TRUE) }"},{"path":[]},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"bug-fixes-3-8-3","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"eurostat 3.8.3 (2023-03-07)","text":"Fix date handling bug get_eurostat_json() eurotime2date() functions (issue #251, reported @lz1nwm). get_eurostat_json() function uses temporary eurotime2date() function date handling old bulk download API deprecated.","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-382-2023-03-06","dir":"Changelog","previous_headings":"","what":"eurostat 3.8.2 (2023-03-06)","title":"eurostat 3.8.2 (2023-03-06)","text":"CRAN release: 2023-03-06","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"minor-updates-3-8-2","dir":"Changelog","previous_headings":"","what":"Minor updates","title":"eurostat 3.8.2 (2023-03-06)","text":"use curl::curl_download Windows platforms instead utils::download.file latter causes following error: “error reading connection […] invalid incomplete compressed data”. affects files downloaded new API.","code":""},{"path":[]},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"major-updates-3-7-14","dir":"Changelog","previous_headings":"","what":"Major updates","title":"eurostat 3.7.14 (2023-02-22)","text":"Updated get_eurostat() assorted functions download data new dissemination API (related issues #251, #243). See Eurostat web page Transition - Eurostat Bulk Download API list differences old new data sources: https://wikis.ec.europa.eu/display/EUROSTATHELP/Transition+-++Eurostat+Bulk+Download++API Added new temporary functions downloading handling data new dissemination API: get_eurostat_raw2, tidy_eurostat2, convert_time_col2, eurotime2date2, eurotime2num2 label_eurostat2. old bulk download facilities decommissioned, functions replace old functions old naming schemes (without 2s end). tidy_eurostat2 function now able handle multiple time frequencies one call: example, can download annual, quarterly, monthly data simply using vector c(“”, “Q”, “M”) select_time instead using singular frequencies separate calls. function also return multiple time series one dataset select_time NULL (default). dataset contains multiple time series explicitly downloaded / select_time parameter given, message printed. eurotime2num can now handle monthly weekly data well. Added new parameter get_eurostat() function: legacy_bulk_download (default = TRUE). setting parameter FALSE user can download data new dissemination API. want test new API becomes way download data (much encourage ), set parameter FALSE.","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"minor-updates-3-7-14","dir":"Changelog","previous_headings":"","what":"Minor updates","title":"eurostat 3.7.14 (2023-02-22)","text":"Removed render-rmarkdown.yaml workflow used rendering README.md file. README.md must generated locally now .","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-3713-2023-02-01","dir":"Changelog","previous_headings":"","what":"eurostat 3.7.13 (2023-02-01)","title":"eurostat 3.7.13 (2023-02-01)","text":"Updated get_eurostat_json() migrate JSON web service API Statistics (addressed issues #243, #251). Please note output JSON API now slightly different : datasets now contain freq column indicate frequency data collected, example annually “”, monthly “M” quarterly “Q”. See Eurostat - Data browser online help website information: https://wikis.ec.europa.eu/display/EUROSTATHELP/API+Statistics+-+migrating++JSON+web+service++API+Statistics Minor fixes get_bibentry() get_eurostat_geospatial()","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-3712-2022-06-28","dir":"Changelog","previous_headings":"","what":"eurostat 3.7.12 (2022-06-28)","title":"eurostat 3.7.12 (2022-06-28)","text":"Updated included dataset eurostat_geodata_60_2016 fix issue old-style crs object (#237) Added information different variables eurostat_geodata_60_2016 dataset understandable usable testing purposes. Added information get_eurostat_geospatial() documentation well. Added GISCO copyright disclaimer eurostat_geodata_60_2016 get_eurostat_geospatial() documentation. Get rid unnecessary “encoding supplied: defaulting UTF-8.” messages get_eurostat_geospatial() setting content encoding UTF-8 httr::content() function called dplyr tidyr namespaces longer imported completely, selected functions importFrom","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-3710-2022-02-09","dir":"Changelog","previous_headings":"","what":"eurostat 3.7.10 (2022-02-09)","title":"eurostat 3.7.10 (2022-02-09)","text":"CRAN release: 2022-02-09 Fixed URL issues tests examples","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-379-2020-10-01","dir":"Changelog","previous_headings":"","what":"eurostat 3.7.9 (2020-10-01)","title":"eurostat 3.7.9 (2020-10-01)","text":"Function documentation migrated old \\code{}, \\link{} syntax markdown (issue #230, PR #231 @dieghernan)","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-378-2020-09-30","dir":"Changelog","previous_headings":"","what":"eurostat 3.7.8 (2020-09-30)","title":"eurostat 3.7.8 (2020-09-30)","text":"Package cache management updated: options() command longer needed cache dir can modified persistently custom function (issue #223, PR #228 @dieghernan)","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-377-2020-06-24","dir":"Changelog","previous_headings":"","what":"eurostat 3.7.7 (2020-06-24)","title":"eurostat 3.7.7 (2020-06-24)","text":"Maps vignette fixed","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-376-2021-05-20","dir":"Changelog","previous_headings":"","what":"eurostat 3.7.6 (2021-05-20)","title":"eurostat 3.7.6 (2021-05-20)","text":"Deprecated add_nuts_level(), harmonize_geo_code(), recode_to_nuts_2016() recode_to_nuts_2013(); functions moved new package regions. problem sub-national geo codes explained new vignette “Mapping Regional Data, Mapping Metadata Problems”, replaces “Regional data examples eurostat R package” vignette. shared vignette, new regions package articles work sub-national data. (issues #218 #219, PR #220 @antaldaniel)","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-375-2020-05-12","dir":"Changelog","previous_headings":"","what":"eurostat 3.7.5 (2020-05-12)","title":"eurostat 3.7.5 (2020-05-12)","text":"CRAN release: 2021-05-14 Moved sf Imports Suggests made get_eurostat_geospatial() return message sf installed. increase compatibility eurostat-package systems trouble installing sf (issue #213) Wrapped problem causing examples \\dontrun{} quick CRAN release","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-373","dir":"Changelog","previous_headings":"","what":"eurostat 3.7.3","title":"eurostat 3.7.3","text":"Removed outdated dependencies (mapproj, plotrix, rsdmx)","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-372","dir":"Changelog","previous_headings":"","what":"eurostat 3.7.2","title":"eurostat 3.7.2","text":"Non-intersecting sf-geometries get_eurostat_geospatial (PR #202 @retostauffer)","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-364-2020-05-12","dir":"Changelog","previous_headings":"","what":"eurostat 3.6.4 (2020-05-12)","title":"eurostat 3.6.4 (2020-05-12)","text":"Fixed stringsAsFactors R-4.0.0 moved default FALSE","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-363-2020-04-21","dir":"Changelog","previous_headings":"","what":"eurostat 3.6.3 (2020-04-21)","title":"eurostat 3.6.3 (2020-04-21)","text":"Stabilized http requests (PR @annnvv)","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-353","dir":"Changelog","previous_headings":"","what":"eurostat 3.5.3","title":"eurostat 3.5.3","text":"get_eurostat switched v2.1","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-352","dir":"Changelog","previous_headings":"","what":"eurostat 3.5.2","title":"eurostat 3.5.2","text":"CRAN release: 2020-01-25 internet proxy setting fixes bibentry fix","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-341","dir":"Changelog","previous_headings":"","what":"eurostat 3.4.1","title":"eurostat 3.4.1","text":"Fixed vignette Added automated error messages URL download failures","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-333","dir":"Changelog","previous_headings":"","what":"eurostat 3.3.3","title":"eurostat 3.3.3","text":"Countries Country Codes data.frames get label column country names Eurostat database. Fixed vignette duplicate entry issue smaller issues Added get_bibentry","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-331","dir":"Changelog","previous_headings":"","what":"eurostat 3.3.1","title":"eurostat 3.3.1","text":"CRAN release: 2018-11-24 label_eurostat() new countrycode countrycode_nomatch arguments label countrycode package custom_dic argument add custom dictionary. Vignette updated","code":""},{"path":[]},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"minor-features-3-2-3","dir":"Changelog","previous_headings":"","what":"Minor features","title":"eurostat 3.2.3","text":"dplyr moved Dependencies Imports curl removed Imports solved geospatial map issues eurostat_url moved options","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-321","dir":"Changelog","previous_headings":"","what":"eurostat 3.2.1","title":"eurostat 3.2.1","text":"CRAN release: 2018-05-20","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"major-updates-3-2-1","dir":"Changelog","previous_headings":"","what":"Major updates","title":"eurostat 3.2.1","text":"Improved support sf map visualization","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"minor-features-3-2-1","dir":"Changelog","previous_headings":"","what":"Minor features","title":"eurostat 3.2.1","text":"./data/ generation script ./data-raw/ updated make data reproducible","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"bug-fixes-3-2-1","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"eurostat 3.2.1","text":"Typo corrected Cisco Gisco","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-315","dir":"Changelog","previous_headings":"","what":"eurostat 3.1.5","title":"eurostat 3.1.5","text":"CRAN release: 2017-08-09","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"minor-features-3-1-5","dir":"Changelog","previous_headings":"","what":"Minor features","title":"eurostat 3.1.5","text":"Added new example data set reduce repeated downloads eurostat service Now label_eurostat() gives always error default, labelling introduces duplicated labels. new fix_duplicated argument add fix duplicated labels automatically. (#79, #90) Shrinked package tarball size","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"bug-fixes-3-1-5","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"eurostat 3.1.5","text":"Modified tutorial accommodate CRAN error Fixed cut_to_classes generate unique breaks","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-311","dir":"Changelog","previous_headings":"","what":"eurostat 3.1.1","title":"eurostat 3.1.1","text":"CRAN release: 2017-03-16","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"r-journal-submission-3-1-1","dir":"Changelog","previous_headings":"","what":"R Journal submission","title":"eurostat 3.1.1","text":"Release version associated R Journal manuscript 2017 final version Git release added Zenodo DOI","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"minor-features-3-1-1","dir":"Changelog","previous_headings":"","what":"Minor features","title":"eurostat 3.1.1","text":"Changed maintainer email address louhos leo Added ./docs/ (automated package website generated pkgdown) Expanded unit tests Gitter badge added README Added ./revdep/ check possible reverse dependencies automatically Cheat sheet added","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"bug-fixes-3-1-1","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"eurostat 3.1.1","text":"search_eurostat() accepts new argument fixed: TRUE (default), pattern provided used ; FALSE, pattern interpreted true regex pattern. Augmented list Suggested packages DESCRIPTION file, including Cairo package (#70) Updated journal manuscript based reviewer feedback","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-2220001","dir":"Changelog","previous_headings":"","what":"eurostat 2.2.20001","title":"eurostat 2.2.20001","text":"Development version opened","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-221","dir":"Changelog","previous_headings":"","what":"eurostat 2.2.1","title":"eurostat 2.2.1","text":"CRAN release: 2016-09-14 Fixed canonical cran url README","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-211","dir":"Changelog","previous_headings":"","what":"eurostat 2.1.1","title":"eurostat 2.1.1","text":"complete package now using tibbles Rare encoding issues circumvented (#55) Improved functionality within firewall-protected systems (#63)","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-20","dir":"Changelog","previous_headings":"","what":"eurostat 2.0","title":"eurostat 2.0","text":"get_eurostat() returns tibbles (#52) get_eurostat_dic() get_eurostat_toc() return tibbles Now read_tsv() used instead read.csv() (#29)","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-1227","dir":"Changelog","previous_headings":"","what":"eurostat 1.2.27","title":"eurostat 1.2.27","text":"Calls extract_numeric replaced .numeric (#60) column ‘flags’ labelled even type = “label” (#61)","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-1222","dir":"Changelog","previous_headings":"","what":"eurostat 1.2.22","title":"eurostat 1.2.22","text":"European Commission Eurostat generally uses ISO 3166-1 alpha-2 codes two exceptions: EL (GR) used represent Greece, UK (GB) used represent United Kingdom. now can handled harmonize_country_code() converts raw data values EL GR UK GB. Harmonized roxygen documentation better follow CRAN conventions Changed Windows encoding UTF input files Improved memory usage","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-1221","dir":"Changelog","previous_headings":"","what":"eurostat 1.2.21","title":"eurostat 1.2.21","text":"CRAN release: 2016-03-11 get_eurostat() can now get data also Eurostat JSON API via get_eurostat_json(). also new argument type select labels variable values instead codes. Fix error update tidyr 0.4.0 (#47).","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-1213","dir":"Changelog","previous_headings":"","what":"eurostat 1.2.13","title":"eurostat 1.2.13","text":"CRAN release: 2016-01-19 New select_time argument get_eurostat() select time frequency case multi-frequency datasets. Now get_eurostat() also gives error try get multi-frequency time formats time_format = \"raw\". (#30) time column also now ascending order. get_eurostat() gets new argument compress_file control compression cache file. Also cache filenames includes now relevant arguments. (#28) search_eurostat() new type option type = \"\" search types. label_eurostat() new arguments. code retain also codes specified columns. eu_order order factor levels Eurostat order, uses new function dic_order(). Now label_eurostat_vars(x) gives labels names, x character factor label_eurostat_tables(x) accept character factor. get_eurostat() new argument stringsAsFactors control factor conversion variables. eurotime2date (get_eurostat) convers now also daily data.","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-1016","dir":"Changelog","previous_headings":"","what":"eurostat 1.0.16","title":"eurostat 1.0.16","text":"CRAN release: 2015-03-27 Fixed vignette error","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-1014-2015-03-19","dir":"Changelog","previous_headings":"","what":"eurostat 1.0.14 (2015-03-19)","title":"eurostat 1.0.14 (2015-03-19)","text":"Package largely rewritten Vignette added Changed value column values get_eurostat output","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-091-2014-04-24","dir":"Changelog","previous_headings":"","what":"eurostat 0.9.1 (2014-04-24)","title":"eurostat 0.9.1 (2014-04-24)","text":"Package collected statfi smarterpoland","code":""}] +[{"path":"https://ropengov.github.io/eurostat/articles/dimlst_vs_allconceptschemes.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Differences between dimlst.dic and ALL_CONCEPTSCHEMES.xml","text":"Eurostat process getting rid Bulk Download facilities, inevitably changes affect eurostat package well. One removal old .dic objects used translating Eurostat variable codes cleartext labels English, French German. things must pass. removed old label_eurostat_vars() function simply downloaded dimlst.dic, sort ‘master file’ available codes cleartext labels, used label Eurostat datasets. Now labeling done downloading Concept Scheme file individual dataset using information give labels dataset desired language.","code":""},{"path":"https://ropengov.github.io/eurostat/articles/dimlst_vs_allconceptschemes.html","id":"comparison-of-old-and-new","dir":"Articles","previous_headings":"","what":"Comparison of old and new","title":"Differences between dimlst.dic and ALL_CONCEPTSCHEMES.xml","text":"example old English version dimlst.dic file (downloaded 2023-12-18 ), 10 first rows: example new Concept Scheme file dataset NAMA_10_GDP (see instructions downloading ): apparent benefit XML presentation language versions can found file. makes files bit larger old .tsv files individual datasets size still manageable. Concept id’s Ref id’s (“unit”, “UNIT”) can used look classifications Codelists. old .dic metaphor definition files “dictionaries” dimlst.dic special case, dictionary dictionaries, whereas new metaphor hierarchy definitions. example case units available English labels can downloaded JSON-stat TSV formats: https://ec.europa.eu/eurostat/api/dissemination/sdmx/2.1/codelist/ESTAT/UNIT?format=TSV&lang=en https://ec.europa.eu/eurostat/api/dissemination/sdmx/2.1/codelist/ESTAT/UNIT?format=JSON&lang=en However, new TSV files old .dic files virtually identical:","code":"ACCIDENT Accident ACCOMMOD Mode of accommodation ACCOMSIZE Size of accommodation by number of bedplaces ACCOMUNIT Accommodation unit ACL00 Classification of activities for time use ACTIVITY Type of activity ADMINISTR Administration indicator AFFORD Affordability AGE Age class AGECHILD Age of the child AGEDEF Age definition Time frequency <\/c:Name> Zeitliche Frequenz <\/c:Name> Fréquence (relative au temps) <\/c:Name> <\/s:Enumeration> <\/s:CoreRepresentation> <\/s:Concept> Unit of measure <\/c:Name> Maßeinheit <\/c:Name> Unité de mesure <\/c:Name> <\/s:Enumeration> <\/s:CoreRepresentation> <\/s:Concept> # unit.dic TOTAL Total NR Number NR_HAB Number per inhabitant THS Thousand MIO Million BN Billion CT Euro cent EUR Euro THS_EUR Thousand euro MIO_EUR Million euro BN_EUR Billion euro [...] [711 lines] # ESTAT_UNIT_22.0_EN.tsv TOTAL Total NR Number NR_HAB Number per inhabitant THS Thousand MIO Million BN Billion CT Euro cent EUR Euro THS_EUR Thousand euro MIO_EUR Million euro BN_EUR Billion euro [...] [711 lines]"},{"path":"https://ropengov.github.io/eurostat/articles/dimlst_vs_allconceptschemes.html","id":"replicating-old-style-dimlst-dic-with-new-xml-files","dir":"Articles","previous_headings":"","what":"Replicating old style dimlst.dic with new xml files","title":"Differences between dimlst.dic and ALL_CONCEPTSCHEMES.xml","text":"cases may useful access labels datasets single file. theory possible Concept Schemes well, downlaoding concept schemes form “ALL_CONCEPTSCHEMES.xml” file, 29.7 Mb large. can parse xml file create list similar old dimlst.dic object see functional differences. can see unique codes labels labels used several different codes: make data.frame similar one get reading tab-separated .dic object: comparison dimlst.dic object: Clearly, two objects different types (former data.frame, latter tibble), doesn’t stop us noticing least 6 first rows similar . However, dimlst.dic 623 rows new_df object 593 rows (obs.). Let’s find differences : summarize, old dimlst.dic file 38 codes found ALL_CONCEPTSCHEMES.xml file. new ALL_CONCEPTSCHEMES.xml 8 codes found old dimlst.dic. information different fields, let’s print codes descriptions. Unique dimlst_dic object: Unique new_df new_df_sort: , “FIELDID / Agricultural product” seems almost like input error also “prod_apr / Agricultural product (old codes)” “agriprod / Agricultural products” list. case, correct course action course give feedback Eurostat.","code":"library(xml2) # file downloaded from https://ec.europa.eu/eurostat/api/dissemination/sdmx/2.1/conceptscheme/ESTAT/?compressed=true and unpacked xml_object <- xml2::read_xml(\"ALL_CONCEPTSCHEMES.xml\") number <- length(xml2::xml_find_all(xml_object, \".//s:Concept\")) dic_df <- data.frame( code_name = rep(NA, times = number), full_name = rep(NA, times = number) ) attributes <- xml2::xml_attrs(xml2::xml_find_all(xml_object, \".//s:Concept\")) contents <- xml2::xml_text(xml2::xml_find_all(xml_object, \".//s:Concept/c:Name[@xml:lang='en']\")) for (i in seq_len(number)) { dic_df$code_name[i] <- unname(attributes[[i]][\"id\"]) } # This is ok because the length of and is the same dic_df$full_name <- contents length(unique(dic_df$full_name)) # [1] 586 length(unique(dic_df$code_name)) # [1] 592 # Select unique rows library(dplyr) new_df <- dic_df %>% distinct() # codes toupper new_df$code_name <- toupper(new_df$code_name) new_df_sort <- new_df[order(new_df$code_name),] # Remove row numbers rownames(new_df_sort) <- NULL head(new_df_sort) # code_name full_name # 1 ACCIDENT Accident # 2 ACCOMMOD Mode of accommodation # 3 ACCOMSIZE Size of accommodation by number of bedplaces # 4 ACCOMUNIT Accommodation unit # 5 ACL00 Classification of activities for time use # 6 ACTIVITY Type of activity # downloaded from https://ec.europa.eu/eurostat/estat-navtree-portlet-prod/BulkDownloadListing?sort=1&dir=dic%2Fen dimlst_dic <- readr::read_tsv(\"dimlst.dic\", col_names = c(\"code_name\", \"full_name\"), col_types = readr::cols(.default = readr::col_character())) head(dimlst_dic) ## A tibble: 6 × 2 # code_name full_name # # 1 ACCIDENT Accident # 2 ACCOMMOD Mode of accommodation # 3 ACCOMSIZE Size of accommodation by number of bedplaces # 4 ACCOMUNIT Accommodation unit # 5 ACL00 Classification of activities for time use # 6 ACTIVITY Type of activity setdiff(dimlst_dic$code_name, new_df_sort$code_name) # [1] \"AGR_INP\" \"CALCMETH\" \"DIMLST\" \"ECOSYST\" \"ECOSYST_C\" \"FARMSIZE\" \"HLTH_HLE\" # [8] \"HOSPCARE\" \"HOUS_ANI\" \"INDIC_AGR\" \"IND_ACCT\" \"IND_IMPV\" \"ISSUER\" \"LEARNING\" # [15] \"LEV_INTRF\" \"MANSTO\" \"NRG_FLOW\" \"NRG_TECH\" \"OBS_STATUS\" \"OGA_FAM\" \"OGA_NRH\" # [22] \"OGA_RH\" \"OGA_TYPE\" \"PEDS\" \"PERS_INV\" \"PRD_ACCT\" \"PRD_AMO\" \"RAWMATPR\" # [29] \"RAWMATSEC\" \"REVDATE\" \"SIZE_TUR\" \"TABLE_DIC\" \"TIME\" \"VOT_CAT\" \"WEEK\" # [36] \"YN_CARE\" \"YN_DIF\" \"YN_DIS\" # length: 38 items length(setdiff(dimlst_dic$code_name, new_df_sort$code_name)) # [1] 38 setdiff(new_df_sort$code_name, dimlst_dic$code_name) # [1] \"FIELDID\" \"INDIC_EU\" \"OBS_FLAG\" \"OBS_VALUE\" \"SIZEN_R2\" \"TARGET\" \"TARGET_FLAG\" # [8] \"TIME_PERIOD\" length(setdiff(new_df_sort$code_name, dimlst_dic$code_name)) # [1] 8 print(dimlst_dic[which(dimlst_dic$code_name %in% setdiff(dimlst_dic$code_name, new_df_sort$code_name)),], n = 40) # A tibble: 38 × 2 # code_name full_name # # 1 AGR_INP Agricultural inputs # 2 CALCMETH Calculation method # 3 DIMLST null # 4 ECOSYST Ecosystem typology # 5 ECOSYST_C Ecosystem typology - converted # 6 FARMSIZE Size of farm # 7 HLTH_HLE Health and life expectancy # 8 HOSPCARE Hospital care # 9 HOUS_ANI Animal housing # 10 INDIC_AGR Agricultural indicators # 11 IND_ACCT Industries and accounting items # 12 IND_IMPV Industries, imports and valuations # 13 ISSUER Type of issuer # 14 LEARNING Learning form # 15 LEV_INTRF Level of interference # 16 MANSTO Manure storage # 17 NRG_FLOW Energy flows # 18 NRG_TECH Energy technologies # 19 OBS_STATUS Observation status (Flag) # 20 OGA_FAM Other gainful activity of the family members # 21 OGA_NRH Other gainful activity of the holder (not related to the agricultural holding) # 22 OGA_RH Other gainful activity of the holder (related to the agricultural holding) # 23 OGA_TYPE Types of other gainful activity (OGA) related to the agricultural holding # 24 PEDS Potential Environmentally Damaging Subsidies (ESA transfers) # 25 PERS_INV Persons involved in the accident # 26 PRD_ACCT Products and accounting items # 27 PRD_AMO Products, adjustments and market output # 28 RAWMATPR Primary raw materials # 29 RAWMATSEC Secondary raw materials # 30 REVDATE Revision date # 31 SIZE_TUR Size classes of turnover # 32 TABLE_DIC null # 33 TIME Period of time # 34 VOT_CAT Category of voters # 35 WEEK Calendar week # 36 YN_CARE Use of profesional care - Yes/No # 37 YN_DIF Difficulties - Yes/No # 38 YN_DIS Disability - Yes/No new_df_sort[which(new_df_sort$code_name %in% setdiff(new_df_sort$code_name, dimlst_dic$code_name)),] # code_name full_name # 152 FIELDID Agricultural product # 221 INDIC_EU Indicators for EU2020 project # 364 OBS_FLAG Observation status (Flag) # 365 OBS_VALUE Observation value # 464 SIZEN_R2 Enterprise size and Nace Rev. 2 # 502 TARGET TARGET Observation value # 503 TARGET_FLAG TARGET Observation status (Flag) # 510 TIME_PERIOD Time"},{"path":"https://ropengov.github.io/eurostat/articles/dimlst_vs_allconceptschemes.html","id":"types-of-duplicates","dir":"Articles","previous_headings":"","what":"Types of duplicates","title":"Differences between dimlst.dic and ALL_CONCEPTSCHEMES.xml","text":"also duplicates list created XML file. Duplicates exist code_name column full_name column. differences can due typos (probably ?): …due actual differences (?) fields, although also kind misunderstanding:","code":"new_df_sort[duplicated(new_df_sort$code_name),] # code_name full_name # 471 SO_EUR Standardoutput in Euros new_df_sort[duplicated(new_df_sort$full_name),] # code_name full_name # 35 ASYL_APP Applicant type # 179 HHTYPE Type of household # 227 INDIC_INN Innovation indicator # 233 INDIC_NRG Energy indicator # 237 INDIC_SBS Economical indicator for structural business statistics # 452 SECTPART Sector (ESA 2010) # 528 TY Type of expenditure new_df_sort[which(new_df_sort$code_name == \"SO_EUR\"),] # code_name full_name # 470 SO_EUR Standard output in Euros # 471 SO_EUR Standardoutput in Euros new_df_sort[which(new_df_sort$full_name == \"Type of household\"),] # code_name full_name # 178 HHTYP Type of household # 179 HHTYPE Type of household new_df_sort[which(new_df_sort$full_name == \"Innovation indicator\"),] # code_name full_name # 226 INDIC_IN Innovation indicator # 227 INDIC_INN Innovation indicator new_df_sort[which(new_df_sort$full_name == \"Economical indicator for structural business statistics\"),] # code_name full_name # 236 INDIC_SB Economical indicator for structural business statistics # 237 INDIC_SBS Economical indicator for structural business statistics # Different types of applicants new_df_sort[which(new_df_sort$full_name == \"Applicant type\"),] # code_name full_name # 24 APPLICANT Applicant type # 35 ASYL_APP Applicant type new_df_sort[which(new_df_sort$full_name == \"Energy indicator\"),] # code_name full_name # 218 INDIC_EN Energy indicator # 233 INDIC_NRG Energy indicator new_df_sort[which(new_df_sort$full_name == \"Sector (ESA 2010)\"),] # code_name full_name # 450 SECTOR10 Sector (ESA 2010) # 452 SECTPART Sector (ESA 2010) new_df_sort[which(new_df_sort$full_name == \"Type of expenditure\"),] # code_name full_name # 144 EXPEN Type of expenditure # 528 TY Type of expenditure"},{"path":"https://ropengov.github.io/eurostat/articles/dimlst_vs_allconceptschemes.html","id":"conclusion","dir":"Articles","previous_headings":"","what":"Conclusion","title":"Differences between dimlst.dic and ALL_CONCEPTSCHEMES.xml","text":"Changes methods delivering metadata affect, naturally, end users Eurostat data. eurostat package version 4.0.0 aimed retaining user-facing functionalities expected outputs. interesting world XML parsing kept hood concern users. document written mainly future reference might point wondering something possible possible anymore, users scripts relying functions like label_eurostat_vars(). Feel free open issue pull request Github suggestions corrections like make.","code":""},{"path":"https://ropengov.github.io/eurostat/articles/eurostat_tutorial.html","id":"r-tools-for-eurostat-open-data","dir":"Articles","previous_headings":"","what":"R Tools for Eurostat Open Data","title":"Tutorial for the eurostat R package","text":"rOpenGov R package provides tools access Eurostat database, can also browse -line data sets documentation. contact information source code, see package website.","code":""},{"path":"https://ropengov.github.io/eurostat/articles/eurostat_tutorial.html","id":"installation","dir":"Articles","previous_headings":"","what":"Installation","title":"Tutorial for the eurostat R package","text":"Release version (CRAN): Development version (Github): Alternatively, development versions (specifically: development versions master branch eurostat GitHub repository) can installed help R-universe: package loaded library function. Overall, eurostat package includes following user-facing functions:","code":"install.packages(\"eurostat\") library(remotes) remotes::install_github(\"ropengov/eurostat\") # Enable this universe options(repos = c( ropengov = \"https://ropengov.r-universe.dev\", CRAN = \"https://cloud.r-project.org\" )) install.packages(\"eurostat\") check_access_to_data Check access to ec.europe.eu clean_eurostat_cache Clean Eurostat Cache cut_to_classes Cuts the Values Column into Classes and Polishes the Labels dic_order Order of Variable Levels from Eurostat Dictionary. eu_countries Countries and Country Codes eurostat-defunct Defunct functions in eurostat eurostat-package R Tools for Eurostat open data eurostat_geodata_60_2016 Geospatial data of Europe from GISCO in 1:60 million scale from year 2016 eurotime2date Date Conversion from New Eurostat Time Format eurotime2num Conversion of Eurostat Time Format to Numeric get_bibentry Create A Data Bibliography get_eurostat Get Eurostat Data get_eurostat_dic Download Eurostat Dictionary get_eurostat_folder Get all datasets in a folder get_eurostat_geospatial Download Geospatial Data from GISCO get_eurostat_interactive Get Eurostat data interactive get_eurostat_json Get Data from Eurostat API in JSON get_eurostat_raw Download Data from Eurostat Dissemination API get_eurostat_toc Download Table of Contents of Eurostat Data Sets harmonize_country_code Harmonize Country Code label_eurostat Get Eurostat Codes for data downloaded from new dissemination API list_eurostat_cache_items Output cache information as data.frame search_eurostat Grep Datasets Titles from Eurostat set_eurostat_cache_dir Set Eurostat Cache tgs00026 Auxiliary Data evaluate <- curl::has_internet()"},{"path":"https://ropengov.github.io/eurostat/articles/eurostat_tutorial.html","id":"finding-data","dir":"Articles","previous_headings":"","what":"Finding data","title":"Tutorial for the eurostat R package","text":"First stop researchers browse Eurostat Data Browser website thematically arranged sections Eurostat website. However, eurostat R package offers ways search datasets without leaving R interface. Function get_eurostat_toc() downloads table contents (TOC) eurostat datasets. values column ‘code’ unique identifiers dataset used downloading specific datasets. get_eurostat() function dataset code put first argument function, id. eurostat version 4.0.0 onwards returned TOC object additional column, hierarchy. used determine dataset belongs folder. helpful example downloading datasets single folder . eurostat version 4.0.0 onwards possible download TOC objects French German well, addition English, remains default option. enables new functionalities eurostat functions used TOC object internally retains backwards-compatibility old code lang argument mandatory queries without continue deliver English version TOC object. search_eurostat() can search table contents particular patterns, e.g. datasets related passenger transport. type argument user can choose types datasets search return: datasets, tables, folders types (default). According Eurostat database basic terminology “tables (predefined tables) used provide easy access main statistical indicators. based general datasets derived . predefined, non-modifiable presented two three dimensional tables.” general purpose datasets , hand, described “multi-dimensional tables” “8 dimensions” used “store base data, appropriate use statistical experts via special applications”. eurostat version 4.0.0 onwards possible perform searches also dataset codes. done specifying search column setting column attribute \"code\". Searching codes can useful finding datasets belong folder part larger theme shares similar dataset code patterns, “migr” migration related statistics “tran” case (multimodal) transport statistics. Another new addition version 4.0.0 option perform searches French German language TOC versions well setting lang argument \"fr\" \"de\". Naturally, dataset codes shared language versions French German language searches conducted title column. mentioned beginning, codes different dataset can found also Eurostat database. Eurostat database gives codes Data Navigation Tree parenthesis full name dataset, folder, table.","code":"# Load the package library(eurostat) # Get Eurostat data listing toc <- get_eurostat_toc() # Check the first items library(knitr) kable(tail(toc)) kable(head(get_eurostat_toc(lang = \"fr\"))) # info about passengers kable(head(search_eurostat(\"passenger transport\"))) kable(head(search_eurostat(\"migr\", column = \"code\"))) kable(head(search_eurostat(\"flughafen\", column = \"title\", lang = \"de\")))"},{"path":"https://ropengov.github.io/eurostat/articles/eurostat_tutorial.html","id":"downloading-data","dir":"Articles","previous_headings":"","what":"Downloading data","title":"Tutorial for the eurostat R package","text":"package supports two Eurostats download methods: SDMX 2.1 REST API API Statistics (“JSON API”). bulk download facility fastest method download whole datasets. download small section dataset JSON API faster, allows make data selection downloading. end user usually bother original data downloaded, data sources accessed via main download function get_eurostat(). table id given, whole table downloaded SDMX 2.1 REST API. filters given JSON API used instead. However, get_eurostat_json() function used internally also user-facing function can used well. use dataset ‘Modal split air, sea inland passenger transport’ example dataset vignette. percentage share mode transport total inland transport, expressed passenger-kilometres (pkm) based transport passenger cars, buses coaches, trains, aircraft, seagoing vessels. data based movements national territory, regardless nationality vehicle. However, data collection harmonized EU level. detailed information dataset, see Reference Metadata. Pick print id data set download: [1] “tran_hv_ms_psmod” Get whole corresponding table. table annual data, convenient use numeric time variable use default date format, yearly data coerced first day year (e.g. 2000-01-01). structure downloaded data set can investigated using base R str() function: can get part dataset defining filters argument. named list, names corresponds variable names (lower case) values vectors codes corresponding desired series (upper case). time variable, addition time TIME_PERIOD , also sinceTimePeriod, untilTimePeriod lastTimePeriod can used. information filtering can found get_eurostat() get_eurostat_json() function documentation.","code":"# Perform search, the output is a table of search results search_results <- search_eurostat(\"Modal split of air, sea and inland passenger transport\", type = \"dataset\" ) # Since our search term was so detailed, we should have only 1 result / 1 row kable(head(search_results)) # Get the id from the table id <- search_results$code[1] # Check the id print(id) dat <- get_eurostat(id, time_format = \"num\", stringsAsFactors = TRUE) str(dat) ## tibble [2,100 × 6] (S3: tbl_df/tbl/data.frame) ## $ freq : Factor w/ 1 level \"A\": 1 1 1 1 1 1 1 1 1 1 ... ## $ vehicle : Factor w/ 5 levels \"AC\",\"BUS_TOT\",..: 1 1 1 1 1 1 1 1 1 1 ... ## $ unit : Factor w/ 1 level \"PC\": 1 1 1 1 1 1 1 1 1 1 ... ## $ geo : Factor w/ 30 levels \"AT\",\"BE\",\"BG\",..: 1 1 1 1 1 1 1 1 1 1 ... ## $ TIME_PERIOD: num [1:2100] 2008 2009 2010 2011 2012 ... ## $ values : num [1:2100] 15.6 15.3 16.1 16.9 18.2 18.5 18.9 19.2 19 20.1 ... kable(head(dat)) dat2 <- get_eurostat(id, filters = list(geo = c(\"EU27_2020\", \"FI\"), lastTimePeriod = 1), time_format = \"num\") kable(dat2)"},{"path":"https://ropengov.github.io/eurostat/articles/eurostat_tutorial.html","id":"replacing-codes-with-labels","dir":"Articles","previous_headings":"Downloading data","what":"Replacing codes with labels","title":"Tutorial for the eurostat R package","text":"default variables returned Eurostat codes, get human-readable labels instead, use type = \"label\" argument get_eurostat(). Eurostat codes downloaded data set can replaced human-readable labels Eurostat dictionaries label_eurostat() function. label_eurostat_vars() allows conversion variable names well. Vehicle information 5 levels. can check now :","code":"dat_labeled2 <- get_eurostat(id, filters = list( geo = c(\"EU27_2020\", \"FI\"), lastTimePeriod = 1 ), type = \"label\", time_format = \"num\" ) kable(head(dat_labeled2)) dat_labeled <- label_eurostat(dat) kable(head(dat_labeled)) print(label_eurostat_vars(id = \"tran_hv_ms_psmod\", names(dat_labeled))) ## [1] \"Time frequency\" \"Vehicles\" ## [3] \"Unit of measure\" \"Geopolitical entity (reporting)\" ## [5] \"Time\" levels(dat_labeled$vehicle) ## [1] \"Aircraft\" ## [2] \"Motor coaches, buses and trolley buses\" ## [3] \"Passenger cars\" ## [4] \"Seagoing vessels\" ## [5] \"Trains\""},{"path":"https://ropengov.github.io/eurostat/articles/eurostat_tutorial.html","id":"downloading-data-interactively","dir":"Articles","previous_headings":"Downloading data","what":"Downloading data interactively","title":"Tutorial for the eurostat R package","text":"New function eurostat package version 4.0.0 get_eurostat_interactive() function allows users search download datasets help interactive menus. user already knows dataset want download, get_eurostat_interactive() function can also take dataset code parameter, skipping search part interactive menu. demonstrate whole process search download printing citation dataset, utilizing several different eurostat package functions .","code":"> get_eurostat_interactive() Select language 1: English 2: French 3: German Selection: 1 Enter search term for data: aviation Which dataset would you like to download? 1: [tran_sf_aviagah] Air accident victims in general aviation, by country of occurrence and country of registration of aircraft - maximum take-off mass above 2250 kg (source: EASA) 2: [tran_sf_aviagal] Air accident victims in general aviation by country of occurrence and country of registration of aircraft - maximum take-off mass under 2250 kg (source: EASA) 3: [avia_ec_enterp] Number of aviation and airport enterprises 4: [avia_ec_emp_ent] Employment in aviation and airport enterprises by sex Selection: 4 Download the dataset? 1: Yes 2: No Selection: 1 Would you like to use default download arguments or set them manually? 1: Default 2: Manually selected Selection: 1 trying URL 'https://ec.europa.eu/eurostat/api/dissemination/sdmx/2.1/data/avia_ec_emp_ent?format=TSV&compressed=true' Content type 'text/tab-separated-values; charset=UTF-8' length 1354 bytes ================================================== downloaded 1354 bytes Table avia_ec_emp_ent cached at /var/folders/f4/h_r3y60n0nn0qm6qx5hnx1s00000gn/T//RtmpDJ1gUA/eurostat/60ee371bcdcc9b130a20514d1e0d574d.rds Print dataset citation? 1: Yes 2: No Selection: 1 Print code for downloading dataset? 1: Yes 2: No Selection: 1 Print dataset fixity checksum? 1: Yes 2: No Selection: 1 ##### DATASET CITATION: @Misc{avia-ec-emp-ent-2016-4-20, title = {Employment in aviation and airport enterprises by sex (avia\\_ec\\_emp\\_ent)}, url = {https://ec.europa.eu/eurostat/web/products-datasets/product?code=avia_ec_emp_ent}, language = {english}, year = {2016}, author = {{Eurostat}}, urldate = {2023-12-19}, type = {Dataset}, note = {Accessed 2023-12-19, dataset last updated 2016-04-20}, } ##### DOWNLOAD PARAMETERS: get_eurostat(id = 'avia_ec_emp_ent') ##### FIXITY CHECKSUM: Fixity checksum (md5) for dataset avia_ec_emp_ent: 36975282eaaea50a6e5f0e6cd64ef4d2 # A tibble: 450 × 6 freq enterpr sex geo TIME_PERIOD values 1 A AIRP F CY 2006-01-01 192 2 A AIRP F CY 2007-01-01 240 3 A AIRP F CY 2008-01-01 514 4 A AIRP F CY 2009-01-01 3278 5 A AIRP F CY 2010-01-01 2587 6 A AIRP F CY 2011-01-01 2255 7 A AIRP F CY 2012-01-01 2954 8 A AIRP F CZ 2001-01-01 0 9 A AIRP F CZ 2002-01-01 0 10 A AIRP F CZ 2003-01-01 0 # ℹ 440 more rows # ℹ Use `print(n = ...)` to see more rows"},{"path":[]},{"path":"https://ropengov.github.io/eurostat/articles/eurostat_tutorial.html","id":"efta-eurozone-eu-and-eu-candidate-countries","dir":"Articles","previous_headings":"Selecting and modifying data","what":"EFTA, Eurozone, EU and EU candidate countries","title":"Tutorial for the eurostat R package","text":"facilitate smooth visualization standard European geographic areas, package provides ready-made lists country codes used eurostat database EFTA (efta_countries), Euro area (ea_countries), EU (eu_countries) EU candidate countries (eu_candidate_countries). can used select specific groups countries closer investigation. conversions standard country coding systems, see countrycode R package. retrieve country code list EFTA, instance, use:","code":"data(efta_countries) kable(efta_countries)"},{"path":"https://ropengov.github.io/eurostat/articles/eurostat_tutorial.html","id":"eu-data-from-2012-in-all-vehicles","dir":"Articles","previous_headings":"Selecting and modifying data","what":"EU data from 2012 in all vehicles:","title":"Tutorial for the eurostat R package","text":"","code":"dat_eu12 <- subset(dat_labeled, geo == \"European Union - 27 countries (from 2020)\" & TIME_PERIOD == 2012) kable(dat_eu12, row.names = FALSE)"},{"path":"https://ropengov.github.io/eurostat/articles/eurostat_tutorial.html","id":"eu-data-from-2008---2020-with-vehicle-types-as-variables","dir":"Articles","previous_headings":"Selecting and modifying data","what":"EU data from 2008 - 2020 with vehicle types as variables:","title":"Tutorial for the eurostat R package","text":"Reshaping data best done spread() tidyr.","code":"library(\"tidyr\") dat_eu_0012 <- subset(dat, geo == \"EU27_2020\" & TIME_PERIOD %in% c(2008:2020)) dat_eu_0012_wide <- spread(dat_eu_0012, vehicle, values) kable(subset(dat_eu_0012_wide, select = -geo), row.names = FALSE)"},{"path":"https://ropengov.github.io/eurostat/articles/eurostat_tutorial.html","id":"train-passengers-for-selected-eu-countries-in-2008---2020","dir":"Articles","previous_headings":"Selecting and modifying data","what":"Train passengers for selected EU countries in 2008 - 2020","title":"Tutorial for the eurostat R package","text":"","code":"dat_trains <- subset(dat_labeled, geo %in% c(\"Austria\", \"Belgium\", \"Finland\", \"Sweden\") & TIME_PERIOD %in% c(2008:2020) & vehicle == \"Trains\") dat_trains_wide <- spread(dat_trains, geo, values) kable(subset(dat_trains_wide, select = -vehicle), row.names = FALSE)"},{"path":[]},{"path":"https://ropengov.github.io/eurostat/articles/eurostat_tutorial.html","id":"strongly-recommended","dir":"Articles","previous_headings":"Selecting and modifying data > Other packages","what":"Strongly recommended","title":"Tutorial for the eurostat R package","text":"giscoR (package homepage) package used suggested starting eurostat version 4.0.0 become dependency eurostat required using geospatial data functions. addition using get_eurostat_geospatial() eurostat package, highly recommended study giscoR package functions vignettes creating sophisticated visualisations support geospatial analyses.","code":""},{"path":"https://ropengov.github.io/eurostat/articles/eurostat_tutorial.html","id":"packages-with-similar-functionalities","dir":"Articles","previous_headings":"Selecting and modifying data > Other packages","what":"Packages with similar functionalities","title":"Tutorial for the eurostat R package","text":"restatapi R package similar functionalities familiar function names seasoned eurostat R package users. restatapi package focuses statistical data retrieving returning data non-tidy data format. rsdmx rjsdmx R packages provide generic method download data wide variety statistical data providers utilize Statistical Data Metadata eXchange (SDMX) standards.","code":""},{"path":"https://ropengov.github.io/eurostat/articles/eurostat_tutorial.html","id":"further-examples","dir":"Articles","previous_headings":"","what":"Further examples","title":"Tutorial for the eurostat R package","text":"examples, see articles package homepage.","code":""},{"path":[]},{"path":"https://ropengov.github.io/eurostat/articles/eurostat_tutorial.html","id":"citing-the-data-sources","dir":"Articles","previous_headings":"Citations and related work","what":"Citing the data sources","title":"Tutorial for the eurostat R package","text":"Eurostat data: cite Eurostat. Administrative boundaries: cite EuroGeographics","code":""},{"path":"https://ropengov.github.io/eurostat/articles/eurostat_tutorial.html","id":"citing-the-eurostat-r-package","dir":"Articles","previous_headings":"Citations and related work","what":"Citing the eurostat R package","title":"Tutorial for the eurostat R package","text":"main developers contributors, see package homepage. work can freely used, modified distributed BSD-2-clause (modified FreeBSD) license:","code":"citation(\"eurostat\") ## Kindly cite the eurostat R package as follows: ## ## Lahti L., Huovari J., Kainu M., and Biecek P. (2017). Retrieval and ## analysis of Eurostat open data with the eurostat package. The R ## Journal 9(1), pp. 385-392. doi: 10.32614/RJ-2017-019 ## ## A BibTeX entry for LaTeX users is ## ## @Article{10.32614/RJ-2017-019, ## title = {Retrieval and Analysis of Eurostat Open Data with the eurostat Package}, ## author = {Leo Lahti and Janne Huovari and Markus Kainu and Przemyslaw Biecek}, ## journal = {The R Journal}, ## volume = {9}, ## number = {1}, ## pages = {385--392}, ## year = {2017}, ## doi = {10.32614/RJ-2017-019}, ## url = {https://doi.org/10.32614/RJ-2017-019}, ## } ## ## Lahti, L., Huovari J., Kainu M., Biecek P., Hernangomez D., Antal D., ## and Kantanen P. (2023). eurostat: Tools for Eurostat Open Data ## [Computer software]. R package version 4.0.0. ## https://github.com/rOpenGov/eurostat ## ## A BibTeX entry for LaTeX users is ## ## @Misc{eurostat, ## title = {eurostat: Tools for Eurostat Open Data}, ## author = {Leo Lahti and Janne Huovari and Markus Kainu and Przemyslaw Biecek and Diego Hernangomez and Daniel Antal and Pyry Kantanen}, ## url = {https://github.com/rOpenGov/eurostat}, ## type = {Computer software}, ## year = {2023}, ## note = {R package version 4.0.0}, ## }"},{"path":"https://ropengov.github.io/eurostat/articles/eurostat_tutorial.html","id":"contact","dir":"Articles","previous_headings":"Citations and related work","what":"Contact","title":"Tutorial for the eurostat R package","text":"contact information, see package homepage.","code":""},{"path":"https://ropengov.github.io/eurostat/articles/eurostat_tutorial.html","id":"version-info","dir":"Articles","previous_headings":"","what":"Version info","title":"Tutorial for the eurostat R package","text":"tutorial created ","code":"sessioninfo::session_info() ## ─ Session info ─────────────────────────────────────────────────────────────── ## setting value ## version R version 4.3.2 (2023-10-31) ## os Ubuntu 22.04.3 LTS ## system x86_64, linux-gnu ## ui X11 ## language en ## collate C.UTF-8 ## ctype C.UTF-8 ## tz UTC ## date 2023-12-20 ## pandoc 2.19.2 @ /usr/bin/ (via rmarkdown) ## ## ─ Packages ─────────────────────────────────────────────────────────────────── ## package * version date (UTC) lib source ## assertthat 0.2.1 2019-03-21 [1] RSPM ## backports 1.4.1 2021-12-13 [1] RSPM ## bibtex 0.5.1 2023-01-26 [1] RSPM ## bit 4.0.5 2022-11-15 [1] RSPM ## bit64 4.0.5 2020-08-30 [1] RSPM ## bslib 0.6.1 2023-11-28 [1] RSPM ## cachem 1.0.8 2023-05-01 [1] RSPM ## cellranger 1.1.0 2016-07-27 [1] RSPM ## class 7.3-22 2023-05-03 [3] CRAN (R 4.3.2) ## classInt 0.4-10 2023-09-05 [1] RSPM ## cli 3.6.2 2023-12-11 [1] RSPM ## countrycode 1.5.0 2023-05-30 [1] RSPM ## crayon 1.5.2 2022-09-29 [1] RSPM ## curl 5.2.0 2023-12-08 [1] RSPM ## data.table 1.14.10 2023-12-08 [1] RSPM ## desc 1.4.3 2023-12-10 [1] RSPM ## digest 0.6.33 2023-07-07 [1] RSPM ## dplyr 1.1.4 2023-11-17 [1] RSPM ## e1071 1.7-14 2023-12-06 [1] RSPM ## eurostat * 4.0.0 2023-12-20 [1] local ## evaluate 0.23 2023-11-01 [1] RSPM ## fansi 1.0.6 2023-12-08 [1] RSPM ## fastmap 1.1.1 2023-02-24 [1] RSPM ## fs 1.6.3 2023-07-20 [1] RSPM ## generics 0.1.3 2022-07-05 [1] RSPM ## glue 1.6.2 2022-02-24 [1] RSPM ## here 1.0.1 2020-12-13 [1] RSPM ## hms 1.1.3 2023-03-21 [1] RSPM ## htmltools 0.5.7 2023-11-03 [1] RSPM ## httr 1.4.7 2023-08-15 [1] RSPM ## httr2 1.0.0 2023-11-14 [1] RSPM ## ISOweek 0.6-2 2011-09-07 [1] RSPM ## jquerylib 0.1.4 2021-04-26 [1] RSPM ## jsonlite 1.8.8 2023-12-04 [1] RSPM ## KernSmooth 2.23-22 2023-07-10 [3] CRAN (R 4.3.2) ## knitr * 1.45 2023-10-30 [1] RSPM ## lifecycle 1.0.4 2023-11-07 [1] RSPM ## lubridate 1.9.3 2023-09-27 [1] RSPM ## magrittr 2.0.3 2022-03-30 [1] RSPM ## memoise 2.0.1 2021-11-26 [1] RSPM ## pillar 1.9.0 2023-03-22 [1] RSPM ## pkgconfig 2.0.3 2019-09-22 [1] RSPM ## pkgdown 2.0.7 2022-12-14 [1] any (@2.0.7) ## plyr 1.8.9 2023-10-02 [1] RSPM ## proxy 0.4-27 2022-06-09 [1] RSPM ## purrr 1.0.2 2023-08-10 [1] RSPM ## R6 2.5.1 2021-08-19 [1] RSPM ## ragg 1.2.7 2023-12-11 [1] RSPM ## rappdirs 0.3.3 2021-01-31 [1] RSPM ## Rcpp 1.0.11 2023-07-06 [1] RSPM ## readr 2.1.4 2023-02-10 [1] RSPM ## readxl 1.4.3 2023-07-06 [1] RSPM ## RefManageR 1.4.0 2022-09-30 [1] RSPM ## regions 0.1.8 2021-06-21 [1] RSPM ## rlang 1.1.2 2023-11-04 [1] RSPM ## rmarkdown 2.25 2023-09-18 [1] RSPM ## rprojroot 2.0.4 2023-11-05 [1] RSPM ## sass 0.4.8 2023-12-06 [1] RSPM ## sessioninfo 1.2.2 2021-12-06 [1] any (@1.2.2) ## stringi 1.8.3 2023-12-11 [1] RSPM ## stringr 1.5.1 2023-11-14 [1] RSPM ## systemfonts 1.0.5 2023-10-09 [1] RSPM ## textshaping 0.3.7 2023-10-09 [1] RSPM ## tibble 3.2.1 2023-03-20 [1] RSPM ## tidyr * 1.3.0 2023-01-24 [1] RSPM ## tidyselect 1.2.0 2022-10-10 [1] RSPM ## timechange 0.2.0 2023-01-11 [1] RSPM ## tzdb 0.4.0 2023-05-12 [1] RSPM ## utf8 1.2.4 2023-10-22 [1] RSPM ## vctrs 0.6.5 2023-12-01 [1] RSPM ## vroom 1.6.5 2023-12-05 [1] RSPM ## withr 2.5.2 2023-10-30 [1] RSPM ## xfun 0.41 2023-11-01 [1] RSPM ## xml2 1.3.6 2023-12-04 [1] RSPM ## yaml 2.3.8 2023-12-11 [1] RSPM ## ## [1] /home/runner/work/_temp/Library ## [2] /opt/R/4.3.2/lib/R/site-library ## [3] /opt/R/4.3.2/lib/R/library ## ## ──────────────────────────────────────────────────────────────────────────────"},{"path":"https://ropengov.github.io/eurostat/articles/mapping.html","id":"choropleth-map","dir":"Articles","previous_headings":"","what":"Choropleth Map","title":"Mapping Regional Data, Mapping Metadata Problems","text":"Let us try place data ggplot2 map. Let us download map get_eurostat_geospatial(). use NUTS2016, .e., year = 2016, regional boundary definition set 2016 used period 2018-2020. used definition 2021. always join data geometric information regions starting left map: Huge parts Europe covered, missing values randomly missing. France went regional reform; Turkey Albania provide data earlier. Ireland regional statistics available.","code":"library(ggplot2) # Need to load sf for using dplyr methods with sf objects library(sf) #> Linking to GEOS 3.10.2, GDAL 3.4.1, PROJ 8.2.1; sf_use_s2() is TRUE map_nuts_2 <- get_eurostat_geospatial( resolution = \"60\", nuts_level = \"2\", year = 2016 ) #> Extracting data from eurostat::eurostat_geodata_60_2016 indicator_with_map <- map_nuts_2 %>% left_join(regional_rd_personnel, by = \"geo\") indicator_with_map %>% ggplot() + geom_sf(aes(fill = values), color = \"dim grey\", linewidth = .1 ) + scale_fill_gradient(low = \"#FAE000\", high = \"#00843A\") + facet_wrap(facets = \"time\") + labs( title = \"R&D Personnel & Researchers\", subtitle = \"In all sectors, both sexes by NUTS 2 regions\", caption = \"\\ua9 EuroGeographics for the administrative boundaries \\ua9 Tutorial and ready-to-use data on economy.dataobservatory.eu\", fill = NULL ) + theme_light() + theme(legend.position = \"none\") + coord_sf( xlim = c(2377294, 7453440), ylim = c(1313597, 5628510), crs = 3035 )"},{"path":"https://ropengov.github.io/eurostat/articles/mapping.html","id":"missing-values-and-seemingly-missing-values","dir":"Articles","previous_headings":"","what":"Missing Values and Seemingly Missing Values","title":"Mapping Regional Data, Mapping Metadata Problems","text":"problems real missing data problems, coding problem. words, data , conforming boundaries NUTS2016 map. First need validate geographical coding dataset. task regions::validate_nuts_regions(). validate dataset, see many interesting metadata observations. Even though dataset called R&D personnel researchers sector performance, sex NUTS 2 regions (rd_p_persreg), fact, contains data country NUTS1 levels. data non-EU countries 2009 part NUTS system. situation better 2018: dataset plagued data place NUTS2016 boundary definition, therefore NUTS2016 map! non-conforming bits? Plenty French units. France went regional administrative reform, data past, current boundaries coding. lesser extent, problem Poland UK. comparative data Asia country level, ended regional dataset. Norway, member EEA, 2021 officially part NUTS2021 system. nice provide data consistently past. aggregates like entire EU eurozone.","code":"validated_indicator <- regions::validate_nuts_regions(regional_rd_personnel) library(dplyr) validation_summary_2016 <- validated_indicator %>% group_by(time, typology) %>% summarize( observations = n(), values_missing = sum(is.na(values)), values_present = sum(!is.na(values)), valid_present = values_present / observations ) validation_summary_2016 %>% ungroup() %>% filter(time == \"2009\") #> # A tibble: 7 × 6 #> time typology observations values_missing values_present valid_present #> #> 1 2009 country 28 1 27 0.964 #> 2 2009 non_eu_country 7 2 5 0.714 #> 3 2009 non_eu_nuts_le… 7 4 3 0.429 #> 4 2009 non_eu_nuts_le… 10 5 5 0.5 #> 5 2009 nuts_level_1 105 14 91 0.867 #> 6 2009 nuts_level_2 265 49 216 0.815 #> 7 2009 NA 56 3 53 0.946 validation_summary_2016 %>% ungroup() %>% filter(time == \"2018\") #> # A tibble: 7 × 6 #> time typology observations values_missing values_present valid_present #> #> 1 2018 country 28 0 28 1 #> 2 2018 non_eu_country 7 1 6 0.857 #> 3 2018 non_eu_nuts_le… 7 1 6 0.857 #> 4 2018 non_eu_nuts_le… 10 0 10 1 #> 5 2018 nuts_level_1 105 45 60 0.571 #> 6 2018 nuts_level_2 265 113 152 0.574 #> 7 2018 NA 56 45 11 0.196 validated_indicator %>% filter(!valid_2016) %>% pull(geo) #> [1] \"BA\" \"BA\" \"CN_X_HK\" \"CN_X_HK\" \"EA19\" \"EA19\" #> [7] \"EU27_2020\" \"EU27_2020\" \"EU28\" \"EU28\" \"FR2\" \"FR2\" #> [13] \"FR21\" \"FR21\" \"FR22\" \"FR22\" \"FR23\" \"FR23\" #> [19] \"FR24\" \"FR24\" \"FR25\" \"FR25\" \"FR26\" \"FR26\" #> [25] \"FR3\" \"FR3\" \"FR30\" \"FR30\" \"FR4\" \"FR4\" #> [31] \"FR41\" \"FR41\" \"FR42\" \"FR42\" \"FR43\" \"FR43\" #> [37] \"FR5\" \"FR5\" \"FR51\" \"FR51\" \"FR52\" \"FR52\" #> [43] \"FR53\" \"FR53\" \"FR6\" \"FR6\" \"FR61\" \"FR61\" #> [49] \"FR62\" \"FR62\" \"FR63\" \"FR63\" \"FR7\" \"FR7\" #> [55] \"FR71\" \"FR71\" \"FR72\" \"FR72\" \"FR8\" \"FR8\" #> [61] \"FR81\" \"FR81\" \"FR82\" \"FR82\" \"FR83\" \"FR83\" #> [67] \"FRA\" \"FRA\" \"HR02\" \"HR02\" \"HU10\" \"HU10\" #> [73] \"IE01\" \"IE01\" \"IE02\" \"IE02\" \"JP\" \"JP\" #> [79] \"KR\" \"KR\" \"LT00\" \"LT00\" \"NO01\" \"NO01\" #> [85] \"NO03\" \"NO03\" \"NO04\" \"NO04\" \"NO05\" \"NO05\" #> [91] \"PL1\" \"PL1\" \"PL11\" \"PL11\" \"PL12\" \"PL12\" #> [97] \"PL3\" \"PL3\" \"PL31\" \"PL31\" \"PL32\" \"PL32\" #> [103] \"PL33\" \"PL33\" \"PL34\" \"PL34\" \"RU\" \"RU\" #> [109] \"UKM2\" \"UKM2\" \"UKM3\" \"UKM3\""},{"path":"https://ropengov.github.io/eurostat/articles/mapping.html","id":"recoding-and-renaming","dir":"Articles","previous_headings":"","what":"Recoding and Renaming","title":"Mapping Regional Data, Mapping Metadata Problems","text":"question , can save French data? boundaries regions changed, : somebody must reaggregate number researchers used work newly defined region back , reform. cases, regional boundaries change, name code region, task performed regions::recode_nuts(): Let us take look problems identified regions::recode_nuts(): able recode quite data points NUTS2016 definition time observation 2009 well 2018. Sometimes recoding rows missing values, help much: know data , missing anyway. particularly year 2009 can save plenty data recorded obsolete coding. identify problems. coding used various time periods, clear recoding possibility, regions boundaries changed. history data, need recalculate , say, adding R&D personnel settlement new regional boundary. following non-empty cases present dataset, just coding used 2018-2020 period (.e., NUTS2016 coding.) able save 27 observations just fixing regional codes! , let us trick: change geo variable code_2016, , whenever equivalent geo code NUTS2016 definition, data . original geo variable contains codes used, example, NUTS2010 NUTS2013 boundary definitions. Let us make work visible creating three observation type variables: missing present dataset; correctly coded recoding; became visible recoding. let’s place now map:","code":"recoded_indicator <- regional_rd_personnel %>% regions::recode_nuts( geo_var = \"geo\", # your geograhical ID variable name nuts_year = 2016 # change this for other definitions ) recoding_summary <- recoded_indicator %>% mutate(observations = nrow(.data)) %>% mutate(typology_change = ifelse(grepl(\"Recoded\", typology_change), yes = \"Recoded\", no = typology_change )) %>% group_by(typology_change, time) %>% summarize( values_missing = sum(is.na(values)), values_present = sum(!is.na(values)), pct = values_present / (values_present + values_missing) ) recoding_summary #> # A tibble: 12 × 5 #> # Groups: typology_change [6] #> typology_change time values_missing values_present pct #> #> 1 Not found in NUTS 2009 1 11 0.917 #> 2 Not found in NUTS 2018 1 11 0.917 #> 3 Recoded 2009 12 42 0.778 #> 4 Recoded 2018 32 22 0.407 #> 5 Used in NUTS 1999-2013 2009 1 7 0.875 #> 6 Used in NUTS 1999-2013 2018 8 0 0 #> 7 Used in NUTS 2006-2013 2009 0 5 1 #> 8 Used in NUTS 2006-2013 2018 5 0 0 #> 9 Used in NUTS 2021-2021 2009 0 1 1 #> 10 Used in NUTS 2021-2021 2018 1 0 0 #> 11 unchanged 2009 64 334 0.839 #> 12 unchanged 2018 158 240 0.603 recoded_indicator %>% filter(typology == \"nuts_level_2\") %>% filter(!is.na(typology_change)) %>% filter( # Keep only pairs where we actually save # non-missing observations !is.na(values) ) %>% distinct(geo, code_2016) %>% filter( # We filter out cases of countries who # joined the NUTS system later geo != code_2016 ) #> # A tibble: 27 × 2 #> geo code_2016 #> #> 1 FR21 FRF2 #> 2 FR22 FRE2 #> 3 FR23 FRD2 #> 4 FR24 FRB0 #> 5 FR25 FRD1 #> 6 FR26 FRC1 #> 7 FR3 FRE1 #> 8 FR30 FRE1 #> 9 FR41 FRF3 #> 10 FR42 FRF1 #> # ℹ 17 more rows recoded_with_map <- map_nuts_2 %>% left_join( recoded_indicator %>% mutate(geo = code_2016), by = \"geo\" ) regional_rd_personnel_recoded <- recoded_indicator %>% mutate(geo = code_2016) %>% rename(values_2016 = values) %>% select(-typology, -typology_change, -code_2016) %>% full_join( regional_rd_personnel, by = c(\"prof_pos\", \"sex\", \"sectperf\", \"unit\", \"geo\", \"time\") ) %>% mutate(type = case_when( is.na(values_2016) & is.na(values) ~ \"missing\", is.na(values) ~ \"after\", TRUE ~ \"before\" )) map_nuts_2 %>% left_join(regional_rd_personnel_recoded, by = \"geo\") %>% # remove completely missing cases filter(!is.na(time)) %>% ggplot() + geom_sf(aes(fill = type), color = \"dim grey\", linewidth = .1 ) + scale_fill_manual(values = c(\"#FAE000\", \"#007CBB\", \"grey70\")) + guides(fill = guide_legend(reverse = T, title = NULL)) + facet_wrap(facets = \"time\") + labs( title = \"R&D Personnel & Researchers\", subtitle = \"In all sectors, both sexes by NUTS 2 regions\", caption = \"\\ua9 EuroGeographics for the administrative boundaries \\ua9 Daniel Antal, rOpenGov\", fill = NULL ) + theme_light() + theme(legend.position = c(.93, .7)) + coord_sf( xlim = c(2377294, 7453440), ylim = c(1313597, 5628510), crs = 3035 )"},{"path":"https://ropengov.github.io/eurostat/articles/mapping.html","id":"conclusion","dir":"Articles","previous_headings":"","what":"Conclusion","title":"Mapping Regional Data, Mapping Metadata Problems","text":"improve dataset, improvement worked traditional imputation techniques well. example, replacing missing French data median value Europe created huge bias dataset. example simplification. many territorial typologies use Europe globally, main takeaway clear: sub-national boundaries changing fast, must make sure join datasets, data map boundary definitions.","code":""},{"path":[]},{"path":"https://ropengov.github.io/eurostat/articles/mapping.html","id":"citing-the-data-sources","dir":"Articles","previous_headings":"Citations and related work","what":"Citing the data sources","title":"Mapping Regional Data, Mapping Metadata Problems","text":"Eurostat data: cite Eurostat. Administrative boundaries: cite EuroGeographics.","code":""},{"path":"https://ropengov.github.io/eurostat/articles/mapping.html","id":"citing-the-eurostat-r-package","dir":"Articles","previous_headings":"Citations and related work","what":"Citing the eurostat R package","title":"Mapping Regional Data, Mapping Metadata Problems","text":"main developers contributors, see package homepage. work can freely used, modified distributed BSD-2-clause (modified FreeBSD) license:","code":"citation(\"eurostat\") #> Kindly cite the eurostat R package as follows: #> #> Lahti L., Huovari J., Kainu M., and Biecek P. (2017). Retrieval and #> analysis of Eurostat open data with the eurostat package. The R #> Journal 9(1), pp. 385-392. doi: 10.32614/RJ-2017-019 #> #> Lahti, L., Huovari J., Kainu M., Biecek P., Hernangomez D., Antal D., #> and Kantanen P. (2023). eurostat: Tools for Eurostat Open Data #> [Computer software]. R package version 4.0.0. #> https://github.com/rOpenGov/eurostat #> #> To see these entries in BibTeX format, use 'print(, #> bibtex=TRUE)', 'toBibtex(.)', or set #> 'options(citation.bibtex.max=999)'."},{"path":"https://ropengov.github.io/eurostat/articles/mapping.html","id":"citing-the-regions-r-package","dir":"Articles","previous_headings":"Citations and related work","what":"Citing the regions R package","title":"Mapping Regional Data, Mapping Metadata Problems","text":"main developer contributors, see package. work can freely used, modified distributed GPL-3 license:","code":"citation(\"regions\") #> To cite package 'regions' in publications use: #> #> Antal D (2021). _regions: Processing Regional Statistics_. R package #> version 0.1.8, . #> #> A BibTeX entry for LaTeX users is #> #> @Manual{, #> title = {regions: Processing Regional Statistics}, #> author = {Daniel Antal}, #> year = {2021}, #> note = {R package version 0.1.8}, #> url = {https://regions.dataobservatory.eu/}, #> }"},{"path":"https://ropengov.github.io/eurostat/articles/mapping.html","id":"contact","dir":"Articles","previous_headings":"Citations and related work","what":"Contact","title":"Mapping Regional Data, Mapping Metadata Problems","text":"contact information, see package homepage.","code":""},{"path":"https://ropengov.github.io/eurostat/articles/mapping.html","id":"version-info","dir":"Articles","previous_headings":"","what":"Version info","title":"Mapping Regional Data, Mapping Metadata Problems","text":"tutorial created ","code":"sessioninfo::session_info() #> ─ Session info ─────────────────────────────────────────────────────────────── #> setting value #> version R version 4.3.2 (2023-10-31) #> os Ubuntu 22.04.3 LTS #> system x86_64, linux-gnu #> ui X11 #> language en #> collate C.UTF-8 #> ctype C.UTF-8 #> tz UTC #> date 2023-12-20 #> pandoc 2.19.2 @ /usr/bin/ (via rmarkdown) #> #> ─ Packages ─────────────────────────────────────────────────────────────────── #> package * version date (UTC) lib source #> assertthat 0.2.1 2019-03-21 [1] RSPM #> backports 1.4.1 2021-12-13 [1] RSPM #> bibtex 0.5.1 2023-01-26 [1] RSPM #> bslib 0.6.1 2023-11-28 [1] RSPM #> cachem 1.0.8 2023-05-01 [1] RSPM #> cellranger 1.1.0 2016-07-27 [1] RSPM #> class 7.3-22 2023-05-03 [3] CRAN (R 4.3.2) #> classInt 0.4-10 2023-09-05 [1] RSPM #> cli 3.6.2 2023-12-11 [1] RSPM #> colorspace 2.1-0 2023-01-23 [1] RSPM #> countrycode 1.5.0 2023-05-30 [1] RSPM #> curl 5.2.0 2023-12-08 [1] RSPM #> data.table 1.14.10 2023-12-08 [1] RSPM #> DBI 1.1.3 2022-06-18 [1] RSPM #> desc 1.4.3 2023-12-10 [1] RSPM #> digest 0.6.33 2023-07-07 [1] RSPM #> dplyr * 1.1.4 2023-11-17 [1] RSPM #> e1071 1.7-14 2023-12-06 [1] RSPM #> eurostat * 4.0.0 2023-12-20 [1] local #> evaluate 0.23 2023-11-01 [1] RSPM #> fansi 1.0.6 2023-12-08 [1] RSPM #> farver 2.1.1 2022-07-06 [1] RSPM #> fastmap 1.1.1 2023-02-24 [1] RSPM #> fs 1.6.3 2023-07-20 [1] RSPM #> generics 0.1.3 2022-07-05 [1] RSPM #> ggplot2 * 3.4.4 2023-10-12 [1] RSPM #> glue 1.6.2 2022-02-24 [1] RSPM #> gtable 0.3.4 2023-08-21 [1] RSPM #> here 1.0.1 2020-12-13 [1] RSPM #> highr 0.10 2022-12-22 [1] RSPM #> hms 1.1.3 2023-03-21 [1] RSPM #> htmltools 0.5.7 2023-11-03 [1] RSPM #> httr 1.4.7 2023-08-15 [1] RSPM #> httr2 1.0.0 2023-11-14 [1] RSPM #> ISOweek 0.6-2 2011-09-07 [1] RSPM #> jquerylib 0.1.4 2021-04-26 [1] RSPM #> jsonlite 1.8.8 2023-12-04 [1] RSPM #> KernSmooth 2.23-22 2023-07-10 [3] CRAN (R 4.3.2) #> knitr 1.45 2023-10-30 [1] RSPM #> lifecycle 1.0.4 2023-11-07 [1] RSPM #> lubridate 1.9.3 2023-09-27 [1] RSPM #> magrittr 2.0.3 2022-03-30 [1] RSPM #> memoise 2.0.1 2021-11-26 [1] RSPM #> munsell 0.5.0 2018-06-12 [1] RSPM #> pillar 1.9.0 2023-03-22 [1] RSPM #> pkgconfig 2.0.3 2019-09-22 [1] RSPM #> pkgdown 2.0.7 2022-12-14 [1] any (@2.0.7) #> plyr 1.8.9 2023-10-02 [1] RSPM #> proxy 0.4-27 2022-06-09 [1] RSPM #> purrr 1.0.2 2023-08-10 [1] RSPM #> R.cache 0.16.0 2022-07-21 [1] RSPM #> R.methodsS3 1.8.2 2022-06-13 [1] RSPM #> R.oo 1.25.0 2022-06-12 [1] RSPM #> R.utils 2.12.3 2023-11-18 [1] RSPM #> R6 2.5.1 2021-08-19 [1] RSPM #> ragg 1.2.7 2023-12-11 [1] RSPM #> rappdirs 0.3.3 2021-01-31 [1] RSPM #> Rcpp 1.0.11 2023-07-06 [1] RSPM #> readr 2.1.4 2023-02-10 [1] RSPM #> readxl 1.4.3 2023-07-06 [1] RSPM #> RefManageR 1.4.0 2022-09-30 [1] RSPM #> regions * 0.1.8 2021-06-21 [1] RSPM #> rlang 1.1.2 2023-11-04 [1] RSPM #> rmarkdown 2.25 2023-09-18 [1] RSPM #> rprojroot 2.0.4 2023-11-05 [1] RSPM #> sass 0.4.8 2023-12-06 [1] RSPM #> scales 1.3.0 2023-11-28 [1] RSPM #> sessioninfo 1.2.2 2021-12-06 [1] any (@1.2.2) #> sf * 1.0-15 2023-12-18 [1] RSPM #> stringi 1.8.3 2023-12-11 [1] RSPM #> stringr 1.5.1 2023-11-14 [1] RSPM #> styler 1.10.2 2023-08-29 [1] RSPM #> systemfonts 1.0.5 2023-10-09 [1] RSPM #> textshaping 0.3.7 2023-10-09 [1] RSPM #> tibble 3.2.1 2023-03-20 [1] RSPM #> tidyr 1.3.0 2023-01-24 [1] RSPM #> tidyselect 1.2.0 2022-10-10 [1] RSPM #> timechange 0.2.0 2023-01-11 [1] RSPM #> tzdb 0.4.0 2023-05-12 [1] RSPM #> units 0.8-5 2023-11-28 [1] RSPM #> utf8 1.2.4 2023-10-22 [1] RSPM #> vctrs 0.6.5 2023-12-01 [1] RSPM #> withr 2.5.2 2023-10-30 [1] RSPM #> xfun 0.41 2023-11-01 [1] RSPM #> xml2 1.3.6 2023-12-04 [1] RSPM #> yaml 2.3.8 2023-12-11 [1] RSPM #> #> [1] /home/runner/work/_temp/Library #> [2] /opt/R/4.3.2/lib/R/site-library #> [3] /opt/R/4.3.2/lib/R/library #> #> ──────────────────────────────────────────────────────────────────────────────"},{"path":"https://ropengov.github.io/eurostat/articles/maps.html","id":"r-tools-for-eurostat-open-data-maps","dir":"Articles","previous_headings":"","what":"R Tools for Eurostat Open Data: maps","title":"Map examples for the eurostat R package","text":"rOpenGov R package provides tools access Eurostat database, can also browse -line data sets documentation. contact information source code, see package website. See vignette eurostat (vignette(package = \"eurostat\")) installation basic use.","code":""},{"path":"https://ropengov.github.io/eurostat/articles/maps.html","id":"maps","dir":"Articles","previous_headings":"R Tools for Eurostat Open Data: maps","what":"Maps","title":"Map examples for the eurostat R package","text":"NOTE: recommend check also giscoR package (https://dieghernan.github.io/giscoR/). another API package provides R tools Eurostat geographic data support geospatial analysis visualization.","code":""},{"path":"https://ropengov.github.io/eurostat/articles/maps.html","id":"disposable-income-of-private-households-by-nuts-2-regions-at-160mln-resolution-using-tmap","dir":"Articles","previous_headings":"R Tools for Eurostat Open Data: maps > Maps","what":"Disposable income of private households by NUTS 2 regions at 1:60mln resolution using tmap","title":"Map examples for the eurostat R package","text":"mapping examples use tmap package. Construct map Interactive maps can generated well","code":"library(dplyr) #> #> Attaching package: 'dplyr' #> The following objects are masked from 'package:stats': #> #> filter, lag #> The following objects are masked from 'package:base': #> #> intersect, setdiff, setequal, union library(eurostat) library(sf) #> Linking to GEOS 3.10.2, GDAL 3.4.1, PROJ 8.2.1; sf_use_s2() is TRUE library(tmap) #> Breaking News: tmap 3.x is retiring. Please test v4, e.g. with #> remotes::install_github('r-tmap/tmap') # Download attribute data from Eurostat sp_data <- eurostat::get_eurostat(\"tgs00026\", time_format = \"raw\") %>% # subset to have only a single row per geo filter(TIME_PERIOD == 2016, nchar(geo) == 4) %>% # categorise mutate(income = cut_to_classes(values, n = 5)) #> Table tgs00026 cached at /tmp/RtmpSVUIhm/eurostat/cf1f3951a122a0db999023526a09c80a.rds # Download geospatial data from GISCO geodata <- get_eurostat_geospatial(nuts_level = 2, year = 2016) #> Extracting data from eurostat::eurostat_geodata_60_2016 # merge with attribute data with geodata map_data <- inner_join(geodata, sp_data, by = \"geo\") # Create and plot the map map1 <- tm_shape(geodata, projection = \"EPSG:3035\", xlim = c(2400000, 7800000), ylim = c(1320000, 5650000) ) + tm_fill(\"lightgrey\") + tm_shape(map_data) + tm_polygons(\"income\", title = \"Disposable household\\nincomes in 2016\", palette = \"Oranges\" ) print(map1) # Interactive tmap_mode(\"view\") #> tmap mode set to interactive viewing map1 # Set the mode back to normal plotting tmap_mode(\"plot\") #> tmap mode set to plotting print(map1)"},{"path":"https://ropengov.github.io/eurostat/articles/maps.html","id":"disposable-income-of-private-households-by-nuts-2-regions-in-poland-with-labels-at-11mln-resolution-using-tmap","dir":"Articles","previous_headings":"R Tools for Eurostat Open Data: maps > Maps","what":"Disposable income of private households by NUTS 2 regions in Poland with labels at 1:1mln resolution using tmap","title":"Map examples for the eurostat R package","text":"","code":"library(eurostat) library(dplyr) library(sf) # Downloading and manipulating the tabular data print(\"Let us focus on year 2016 and NUTS-3 level\") #> [1] \"Let us focus on year 2016 and NUTS-3 level\" euro_sf2 <- get_eurostat(\"tgs00026\", time_format = \"raw\", filter = list(time = \"2016\") ) %>% # Subset to NUTS-3 level dplyr::filter(grepl(\"PL\", geo)) %>% # label the single geo column mutate( label = paste0(label_eurostat(.)[[\"geo\"]], \"\\n\", values, \"€\"), income = cut_to_classes(values) ) #> Table tgs00026 cached at /tmp/RtmpSVUIhm/eurostat/cd9efd9ffd843e166c8095e9db6fe8c8.rds print(\"Download geospatial data from GISCO\") #> [1] \"Download geospatial data from GISCO\" geodata <- get_eurostat_geospatial( resolution = \"01\", nuts_level = 2, year = 2016, country = \"PL\" ) #> Loading required namespace: giscoR #> Extracting data using giscoR package, please report issues on https://github.com/rOpenGov/giscoR/issues # Merge with attribute data with geodata map_data <- inner_join(geodata, euro_sf2, by = \"geo\") # plot map library(tmap) map2 <- tm_shape(geodata) + tm_fill(\"lightgrey\") + tm_shape(map_data, is.master = TRUE) + tm_polygons(\"income\", title = \"Disposable household incomes in 2014\", palette = \"Oranges\", border.col = \"white\" ) + tm_text(\"NUTS_NAME\", just = \"center\") + tm_scale_bar() + tm_layout(legend.outside = TRUE) map2"},{"path":"https://ropengov.github.io/eurostat/articles/maps.html","id":"disposable-income-of-private-households-by-nuts-2-regions-at-110mln-resolution-using-ggplot2","dir":"Articles","previous_headings":"R Tools for Eurostat Open Data: maps > Maps","what":"Disposable income of private households by NUTS 2 regions at 1:10mln resolution using ggplot2","title":"Map examples for the eurostat R package","text":"","code":"# Disposable income of private households by NUTS 2 regions at 1:1mln res library(eurostat) library(dplyr) library(ggplot2) data_eurostat <- get_eurostat(\"tgs00026\", time_format = \"raw\") %>% filter(TIME_PERIOD == 2018, nchar(geo) == 4) %>% # classifying the values the variable dplyr::mutate(cat = cut_to_classes(values)) #> Dataset query already saved in cache_list.json... #> Reading cache file /tmp/RtmpSVUIhm/eurostat/cf1f3951a122a0db999023526a09c80a.rds #> Table tgs00026 read from cache file: /tmp/RtmpSVUIhm/eurostat/cf1f3951a122a0db999023526a09c80a.rds # Download geospatial data from GISCO data_geo <- get_eurostat_geospatial( resolution = \"01\", nuts_level = \"2\", year = 2016 ) #> Extracting data using giscoR package, please report issues on https://github.com/rOpenGov/giscoR/issues # merge with attribute data with geodata data <- left_join(data_geo, data_eurostat, by = \"geo\") ggplot(data) + # Base layer geom_sf(fill = \"lightgrey\", color = \"lightgrey\") + # Choropleth layer geom_sf(aes(fill = cat), color = \"lightgrey\", linewidth = 0.1, na.rm = TRUE) + scale_fill_brewer(palette = \"Oranges\", na.translate = FALSE) + guides(fill = guide_legend(reverse = TRUE, title = \"euro\")) + labs( title = \"Disposable household income in 2018\", caption = \"© EuroGeographics for the administrative boundaries Map produced in R with data from Eurostat-package http://ropengov.github.io/eurostat\" ) + theme_light() + coord_sf( xlim = c(2377294, 7453440), ylim = c(1313597, 5628510), crs = 3035 )"},{"path":[]},{"path":"https://ropengov.github.io/eurostat/articles/maps.html","id":"citing-the-data-sources","dir":"Articles","previous_headings":"Citations and related work","what":"Citing the data sources","title":"Map examples for the eurostat R package","text":"Eurostat data: cite Eurostat. Administrative boundaries: cite EuroGeographics","code":""},{"path":"https://ropengov.github.io/eurostat/articles/maps.html","id":"citing-the-eurostat-r-package","dir":"Articles","previous_headings":"Citations and related work","what":"Citing the eurostat R package","title":"Map examples for the eurostat R package","text":"main developers contributors, see package homepage. work can freely used, modified distributed BSD-2-clause (modified FreeBSD) license:","code":"citation(\"eurostat\") #> Kindly cite the eurostat R package as follows: #> #> Lahti L., Huovari J., Kainu M., and Biecek P. (2017). Retrieval and #> analysis of Eurostat open data with the eurostat package. The R #> Journal 9(1), pp. 385-392. doi: 10.32614/RJ-2017-019 #> #> Lahti, L., Huovari J., Kainu M., Biecek P., Hernangomez D., Antal D., #> and Kantanen P. (2023). eurostat: Tools for Eurostat Open Data #> [Computer software]. R package version 4.0.0. #> https://github.com/rOpenGov/eurostat #> #> To see these entries in BibTeX format, use 'print(, #> bibtex=TRUE)', 'toBibtex(.)', or set #> 'options(citation.bibtex.max=999)'."},{"path":"https://ropengov.github.io/eurostat/articles/maps.html","id":"contact","dir":"Articles","previous_headings":"Citations and related work","what":"Contact","title":"Map examples for the eurostat R package","text":"contact information, see package homepage.","code":""},{"path":"https://ropengov.github.io/eurostat/articles/maps.html","id":"version-info","dir":"Articles","previous_headings":"","what":"Version info","title":"Map examples for the eurostat R package","text":"tutorial created ","code":"sessioninfo::session_info() #> ─ Session info ─────────────────────────────────────────────────────────────── #> setting value #> version R version 4.3.2 (2023-10-31) #> os Ubuntu 22.04.3 LTS #> system x86_64, linux-gnu #> ui X11 #> language en #> collate C.UTF-8 #> ctype C.UTF-8 #> tz UTC #> date 2023-12-20 #> pandoc 2.19.2 @ /usr/bin/ (via rmarkdown) #> #> ─ Packages ─────────────────────────────────────────────────────────────────── #> package * version date (UTC) lib source #> abind 1.4-5 2016-07-21 [1] RSPM #> assertthat 0.2.1 2019-03-21 [1] RSPM #> backports 1.4.1 2021-12-13 [1] RSPM #> base64enc 0.1-3 2015-07-28 [1] RSPM #> bibtex 0.5.1 2023-01-26 [1] RSPM #> bit 4.0.5 2022-11-15 [1] RSPM #> bit64 4.0.5 2020-08-30 [1] RSPM #> bslib 0.6.1 2023-11-28 [1] RSPM #> cachem 1.0.8 2023-05-01 [1] RSPM #> cellranger 1.1.0 2016-07-27 [1] RSPM #> class 7.3-22 2023-05-03 [3] CRAN (R 4.3.2) #> classInt 0.4-10 2023-09-05 [1] RSPM #> cli 3.6.2 2023-12-11 [1] RSPM #> codetools 0.2-19 2023-02-01 [3] CRAN (R 4.3.2) #> colorspace 2.1-0 2023-01-23 [1] RSPM #> countrycode 1.5.0 2023-05-30 [1] RSPM #> crayon 1.5.2 2022-09-29 [1] RSPM #> crosstalk 1.2.1 2023-11-23 [1] RSPM #> curl 5.2.0 2023-12-08 [1] RSPM #> data.table 1.14.10 2023-12-08 [1] RSPM #> DBI 1.1.3 2022-06-18 [1] RSPM #> desc 1.4.3 2023-12-10 [1] RSPM #> dichromat 2.0-0.1 2022-05-02 [1] RSPM #> digest 0.6.33 2023-07-07 [1] RSPM #> dplyr * 1.1.4 2023-11-17 [1] RSPM #> e1071 1.7-14 2023-12-06 [1] RSPM #> ellipsis 0.3.2 2021-04-29 [1] RSPM #> eurostat * 4.0.0 2023-12-20 [1] local #> evaluate 0.23 2023-11-01 [1] RSPM #> fansi 1.0.6 2023-12-08 [1] RSPM #> farver 2.1.1 2022-07-06 [1] RSPM #> fastmap 1.1.1 2023-02-24 [1] RSPM #> fs 1.6.3 2023-07-20 [1] RSPM #> generics 0.1.3 2022-07-05 [1] RSPM #> geojsonsf 2.0.3 2022-05-30 [1] RSPM #> ggplot2 * 3.4.4 2023-10-12 [1] RSPM #> giscoR 0.4.0 2023-10-30 [1] RSPM #> glue 1.6.2 2022-02-24 [1] RSPM #> gtable 0.3.4 2023-08-21 [1] RSPM #> here 1.0.1 2020-12-13 [1] RSPM #> highr 0.10 2022-12-22 [1] RSPM #> hms 1.1.3 2023-03-21 [1] RSPM #> htmltools 0.5.7 2023-11-03 [1] RSPM #> htmlwidgets 1.6.4 2023-12-06 [1] RSPM #> httr 1.4.7 2023-08-15 [1] RSPM #> httr2 1.0.0 2023-11-14 [1] RSPM #> ISOweek 0.6-2 2011-09-07 [1] RSPM #> jquerylib 0.1.4 2021-04-26 [1] RSPM #> jsonlite 1.8.8 2023-12-04 [1] RSPM #> KernSmooth 2.23-22 2023-07-10 [3] CRAN (R 4.3.2) #> knitr 1.45 2023-10-30 [1] RSPM #> lattice 0.21-9 2023-10-01 [3] CRAN (R 4.3.2) #> leafem 0.2.3 2023-09-17 [1] RSPM #> leaflet 2.2.1 2023-11-13 [1] RSPM #> leaflet.providers 2.0.0 2023-10-17 [1] RSPM #> leafsync 0.1.0 2019-03-05 [1] RSPM #> lifecycle 1.0.4 2023-11-07 [1] RSPM #> lubridate 1.9.3 2023-09-27 [1] RSPM #> lwgeom 0.2-13 2023-05-22 [1] RSPM #> magrittr 2.0.3 2022-03-30 [1] RSPM #> memoise 2.0.1 2021-11-26 [1] RSPM #> munsell 0.5.0 2018-06-12 [1] RSPM #> pillar 1.9.0 2023-03-22 [1] RSPM #> pkgconfig 2.0.3 2019-09-22 [1] RSPM #> pkgdown 2.0.7 2022-12-14 [1] any (@2.0.7) #> plyr 1.8.9 2023-10-02 [1] RSPM #> png 0.1-8 2022-11-29 [1] RSPM #> proxy 0.4-27 2022-06-09 [1] RSPM #> purrr 1.0.2 2023-08-10 [1] RSPM #> R.cache 0.16.0 2022-07-21 [1] RSPM #> R.methodsS3 1.8.2 2022-06-13 [1] RSPM #> R.oo 1.25.0 2022-06-12 [1] RSPM #> R.utils 2.12.3 2023-11-18 [1] RSPM #> R6 2.5.1 2021-08-19 [1] RSPM #> ragg 1.2.7 2023-12-11 [1] RSPM #> rappdirs 0.3.3 2021-01-31 [1] RSPM #> raster 3.6-26 2023-10-14 [1] RSPM #> RColorBrewer 1.1-3 2022-04-03 [1] RSPM #> Rcpp 1.0.11 2023-07-06 [1] RSPM #> readr 2.1.4 2023-02-10 [1] RSPM #> readxl 1.4.3 2023-07-06 [1] RSPM #> RefManageR 1.4.0 2022-09-30 [1] RSPM #> regions 0.1.8 2021-06-21 [1] RSPM #> rlang 1.1.2 2023-11-04 [1] RSPM #> rmarkdown 2.25 2023-09-18 [1] RSPM #> rprojroot 2.0.4 2023-11-05 [1] RSPM #> s2 1.1.5 2023-12-10 [1] RSPM #> sass 0.4.8 2023-12-06 [1] RSPM #> scales 1.3.0 2023-11-28 [1] RSPM #> sessioninfo 1.2.2 2021-12-06 [1] any (@1.2.2) #> sf * 1.0-15 2023-12-18 [1] RSPM #> sp 2.1-2 2023-11-26 [1] RSPM #> stars 0.6-4 2023-09-11 [1] RSPM #> stringi 1.8.3 2023-12-11 [1] RSPM #> stringr 1.5.1 2023-11-14 [1] RSPM #> styler 1.10.2 2023-08-29 [1] RSPM #> systemfonts 1.0.5 2023-10-09 [1] RSPM #> terra 1.7-65 2023-12-15 [1] RSPM #> textshaping 0.3.7 2023-10-09 [1] RSPM #> tibble 3.2.1 2023-03-20 [1] RSPM #> tidyr 1.3.0 2023-01-24 [1] RSPM #> tidyselect 1.2.0 2022-10-10 [1] RSPM #> timechange 0.2.0 2023-01-11 [1] RSPM #> tmap * 3.3-4 2023-09-12 [1] RSPM #> tmaptools 3.1-1 2021-01-19 [1] RSPM #> tzdb 0.4.0 2023-05-12 [1] RSPM #> units 0.8-5 2023-11-28 [1] RSPM #> utf8 1.2.4 2023-10-22 [1] RSPM #> vctrs 0.6.5 2023-12-01 [1] RSPM #> viridisLite 0.4.2 2023-05-02 [1] RSPM #> vroom 1.6.5 2023-12-05 [1] RSPM #> withr 2.5.2 2023-10-30 [1] RSPM #> wk 0.9.1 2023-11-29 [1] RSPM #> xfun 0.41 2023-11-01 [1] RSPM #> XML 3.99-0.16 2023-11-29 [1] RSPM #> xml2 1.3.6 2023-12-04 [1] RSPM #> yaml 2.3.8 2023-12-11 [1] RSPM #> #> [1] /home/runner/work/_temp/Library #> [2] /opt/R/4.3.2/lib/R/site-library #> [3] /opt/R/4.3.2/lib/R/library #> #> ──────────────────────────────────────────────────────────────────────────────"},{"path":"https://ropengov.github.io/eurostat/articles/vignette.html","id":"installation","dir":"Articles","previous_headings":"","what":"Installation","title":"Vignette for the eurostat R package","text":"Release version (CRAN): Development version (Github): Load package: detailed examples use package, see online tutorial.","code":"install.packages(\"eurostat\") library(remotes) remotes::install_github(\"ropengov/eurostat\")"},{"path":"https://ropengov.github.io/eurostat/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Leo Lahti. Author, maintainer. Janne Huovari. Author. Markus Kainu. Author. Przemyslaw Biecek. Author. Daniel Antal. Contributor. Diego Hernangomez. Contributor. Joona Lehtomaki. Contributor. Francois Briatte. Contributor. Reto Stauffer. Contributor. Paul Rougieux. Contributor. Anna Vasylytsya. Contributor. Oliver Reiter. Contributor. Pyry Kantanen. Contributor. Enrico Spinielli. Contributor.","code":""},{"path":"https://ropengov.github.io/eurostat/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Lahti L., Huovari J., Kainu M., Biecek P. (2017). Retrieval analysis Eurostat open data eurostat package. R Journal 9(1), pp. 385-392. doi: 10.32614/RJ-2017-019 Lahti, L., Huovari J., Kainu M., Biecek P., Hernangomez D., Antal D., Kantanen P. (2023). eurostat: Tools Eurostat Open Data [Computer software]. R package version 4.0.0. https://github.com/rOpenGov/eurostat","code":"@Article{10.32614/RJ-2017-019, title = {Retrieval and Analysis of Eurostat Open Data with the eurostat Package}, author = {Leo Lahti and Janne Huovari and Markus Kainu and Przemyslaw Biecek}, journal = {The R Journal}, volume = {9}, number = {1}, pages = {385--392}, year = {2017}, doi = {10.32614/RJ-2017-019}, url = {https://doi.org/10.32614/RJ-2017-019}, } @Misc{eurostat, title = {eurostat: Tools for Eurostat Open Data}, author = {Leo Lahti and Janne Huovari and Markus Kainu and Przemyslaw Biecek and Diego Hernangomez and Daniel Antal and Pyry Kantanen}, url = {https://github.com/rOpenGov/eurostat}, type = {Computer software}, year = {2023}, note = {R package version 4.0.0}, }"},{"path":"https://ropengov.github.io/eurostat/index.html","id":"eurostat-r-package-","dir":"","previous_headings":"","what":"Tools for Eurostat Open Data","title":"Tools for Eurostat Open Data","text":"R tools access open data Eurostat. Data search, download, manipulation visualization.","code":""},{"path":"https://ropengov.github.io/eurostat/index.html","id":"installation-and-use","dir":"","previous_headings":"","what":"Installation and use","title":"Tools for Eurostat Open Data","text":"Install stable version CRAN: Alternatively, install development version GitHub: Development version can also installed using r-universe: package provides several different ways get datasets Eurostat. Searching data one way, know look . See Tutorial resources package homepage information examples.","code":"install.packages(\"eurostat\") # Install from GitHub library(devtools) devtools::install_github(\"ropengov/eurostat\") # Enable this universe options(repos = c( ropengov = \"https://ropengov.r-universe.dev\", CRAN = \"https://cloud.r-project.org\" )) install.packages(\"eurostat\") # Load the package library(eurostat) # Perform a simple search and print a table passengers <- search_eurostat(\"passenger transport\") knitr::kable(head(passengers))"},{"path":"https://ropengov.github.io/eurostat/index.html","id":"recommended-packages","dir":"","previous_headings":"","what":"Recommended packages","title":"Tools for Eurostat Open Data","text":"recommended install giscoR package (https://dieghernan.github.io/giscoR/). another API package provides R tools Eurostat geographic data support geospatial analysis visualization.","code":""},{"path":"https://ropengov.github.io/eurostat/index.html","id":"contribute","dir":"","previous_headings":"","what":"Contribute","title":"Tools for Eurostat Open Data","text":"Contributions welcome: Use issue tracker feedback bug reports. Send pull requests Star us Github page Join discussion Gitter","code":""},{"path":"https://ropengov.github.io/eurostat/index.html","id":"acknowledgements","dir":"","previous_headings":"","what":"Acknowledgements","title":"Tools for Eurostat Open Data","text":"Kindly cite package citing following R Journal article: Lahti L., Huovari J., Kainu M., Biecek P. (2017). Retrieval analysis Eurostat open data eurostat package. R Journal 9(1), pp. 385-392. doi: 10.32614/RJ-2017-019. addition, please provide citation specific software version used: Lahti, L., Huovari J., Kainu M., Biecek P., Hernangomez D., Antal D., Kantanen P. (2023). eurostat: Tools Eurostat Open Data [Computer software]. R package version 4.0.0.9003. https://github.com/rOpenGov/eurostat grateful contributors, including Daniel Antal, Joona Lehtomäki, Francois Briatte, Oliver Reiter, Eurostat open data portal! project part rOpenGov.","code":""},{"path":"https://ropengov.github.io/eurostat/index.html","id":"disclaimer","dir":"","previous_headings":"","what":"Disclaimer","title":"Tools for Eurostat Open Data","text":"package way officially related endorsed Eurostat. using data retrieved Eurostat database work, please indicate data source Eurostat. re-use involves kind modification data text, please state clearly end user. See Eurostat policy copyright free re-use data detailed information certain exceptions.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/add_nuts_level.html","id":null,"dir":"Reference","previous_headings":"","what":"Add the statistical aggregation level to data frame — add_nuts_level","title":"Add the statistical aggregation level to data frame — add_nuts_level","text":"Eurostat regional statistics contain country, various regional level information. many cases, example, mapping, useful filter national level data NUTS2 level regional data, example. function deprecated. Use comprehensive [regions::validate_nuts_regions()] instead.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/add_nuts_level.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add the statistical aggregation level to data frame — add_nuts_level","text":"","code":"add_nuts_level(dat, geo_labels = \"geo\")"},{"path":"https://ropengov.github.io/eurostat/reference/add_nuts_level.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add the statistical aggregation level to data frame — add_nuts_level","text":"dat data frame tibble returned get_eurostat(). geo_labels geographical label, defaults geo.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/add_nuts_level.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add the statistical aggregation level to data frame — add_nuts_level","text":"new numeric variable nuts_level numeric value NUTS level 0 (country), 1 (greater region), 2 (region), 3 (small region).","code":""},{"path":"https://ropengov.github.io/eurostat/reference/add_nuts_level.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Add the statistical aggregation level to data frame — add_nuts_level","text":"DEPRECATED FUNCTIONS BACKWARD COMPATIBILITY FUNCTIONS GIVE WARNING CALL APPROPRIATE regions FUNCTIONS","code":""},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/add_nuts_level.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Add the statistical aggregation level to data frame — add_nuts_level","text":"Daniel Antal","code":""},{"path":"https://ropengov.github.io/eurostat/reference/add_nuts_level.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add the statistical aggregation level to data frame — add_nuts_level","text":"","code":"dat <- data.frame( geo = c(\"FR\", \"IE04\", \"DEB1C\"), values = c(1000, 23, 12) ) add_nuts_level(dat) #> This function will be deprecated. Use regions::validate_nuts_regions() instead. #> geo values typology valid_2016 nuts_level #> 1 FR 1000 country TRUE 0 #> 2 IE04 23 nuts_level_2 TRUE 2 #> 3 DEB1C 12 nuts_level_3 TRUE 3"},{"path":"https://ropengov.github.io/eurostat/reference/check_access_to_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Check access to ec.europe.eu — check_access_to_data","title":"Check access to ec.europe.eu — check_access_to_data","text":"Check R access resources http://ec.europa.eu","code":""},{"path":"https://ropengov.github.io/eurostat/reference/check_access_to_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check access to ec.europe.eu — check_access_to_data","text":"","code":"check_access_to_data()"},{"path":"https://ropengov.github.io/eurostat/reference/check_access_to_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check access to ec.europe.eu — check_access_to_data","text":"logical.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/check_access_to_data.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Check access to ec.europe.eu — check_access_to_data","text":"Markus Kainu markus.kainu@kapsi.fi","code":""},{"path":"https://ropengov.github.io/eurostat/reference/check_access_to_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check access to ec.europe.eu — check_access_to_data","text":"","code":"# \\donttest{ check_access_to_data() #> [1] TRUE # }"},{"path":"https://ropengov.github.io/eurostat/reference/clean_eurostat_cache.html","id":null,"dir":"Reference","previous_headings":"","what":"Clean Eurostat Cache — clean_eurostat_cache","title":"Clean Eurostat Cache — clean_eurostat_cache","text":"Delete .rds files eurostat cache directory. See get_eurostat() cache.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/clean_eurostat_cache.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Clean Eurostat Cache — clean_eurostat_cache","text":"","code":"clean_eurostat_cache(cache_dir = NULL, config = FALSE)"},{"path":"https://ropengov.github.io/eurostat/reference/clean_eurostat_cache.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Clean Eurostat Cache — clean_eurostat_cache","text":"cache_dir path cache directory. NULL (default) tries clean default temporary cache directory. config Logical TRUE/FALSE. cached path deleted?","code":""},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/clean_eurostat_cache.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Clean Eurostat Cache — clean_eurostat_cache","text":"Przemyslaw Biecek, Leo Lahti, Janne Huovari, Markus Kainu Diego Hernangómez","code":""},{"path":"https://ropengov.github.io/eurostat/reference/clean_eurostat_cache.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Clean Eurostat Cache — clean_eurostat_cache","text":"","code":"if (FALSE) { clean_eurostat_cache() }"},{"path":"https://ropengov.github.io/eurostat/reference/convert_time_col.html","id":null,"dir":"Reference","previous_headings":"","what":"Time Column Conversions for data from new dissemination API — convert_time_col","title":"Time Column Conversions for data from new dissemination API — convert_time_col","text":"Internal function convert time column.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/convert_time_col.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Time Column Conversions for data from new dissemination API — convert_time_col","text":"","code":"convert_time_col(x, time_format)"},{"path":"https://ropengov.github.io/eurostat/reference/convert_time_col.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Time Column Conversions for data from new dissemination API — convert_time_col","text":"x time column (vector) downloaded dataset time_format one following: date, date_last, num. See tidy_eurostat() information.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/cut_to_classes.html","id":null,"dir":"Reference","previous_headings":"","what":"Cuts the Values Column into Classes and Polishes the Labels — cut_to_classes","title":"Cuts the Values Column into Classes and Polishes the Labels — cut_to_classes","text":"Categorises numeric vector automatic manually defined categories polishes labels ready used mapping ggplot2.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/cut_to_classes.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Cuts the Values Column into Classes and Polishes the Labels — cut_to_classes","text":"","code":"cut_to_classes( x, n = 5, style = \"equal\", manual = FALSE, manual_breaks = NULL, decimals = 0, nodata_label = \"No data\" )"},{"path":"https://ropengov.github.io/eurostat/reference/cut_to_classes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Cuts the Values Column into Classes and Polishes the Labels — cut_to_classes","text":"x numeric vector, eg. values variable data returned get_eurostat(). n numeric. number classes/categories style chosen style: one \"fixed\", \"sd\", \"equal\", \"pretty\", \"quantile\", \"kmeans\", \"hclust\", \"bclust\", \"fisher\", \"jenks\", \"dpih\", \"headtails\", \"maximum\", \"box\" manual Logical. manual breaks used manual_breaks Numeric vector manual threshold values decimals Number decimals include labels nodata_label String. Text label NA category.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/cut_to_classes.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Cuts the Values Column into Classes and Polishes the Labels — cut_to_classes","text":"factor.","code":""},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/cut_to_classes.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Cuts the Values Column into Classes and Polishes the Labels — cut_to_classes","text":"Markus Kainu markuskainu@gmail.com","code":""},{"path":"https://ropengov.github.io/eurostat/reference/cut_to_classes.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Cuts the Values Column into Classes and Polishes the Labels — cut_to_classes","text":"","code":"# \\donttest{ # lp <- get_eurostat(\"nama_aux_lp\") lp <- get_eurostat(\"nama_10_lp_ulc\") #> Table nama_10_lp_ulc cached at /tmp/RtmpSVUIhm/eurostat/e76c74b5bcbe2ce2621e9832d1c0599d.rds lp$class <- cut_to_classes(lp$values, n = 5, style = \"equal\", decimals = 1) #> Warning: var has missing values, omitted in finding classes #> Warning: var has missing values, omitted in finding classes # }"},{"path":"https://ropengov.github.io/eurostat/reference/dic_order.html","id":null,"dir":"Reference","previous_headings":"","what":"Order of Variable Levels from Eurostat Dictionary. — dic_order","title":"Order of Variable Levels from Eurostat Dictionary. — dic_order","text":"Orders factor levels.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/dic_order.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Order of Variable Levels from Eurostat Dictionary. — dic_order","text":"","code":"dic_order(x, dic, type)"},{"path":"https://ropengov.github.io/eurostat/reference/dic_order.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Order of Variable Levels from Eurostat Dictionary. — dic_order","text":"x variable (code labelled) get order . dic name dictionary. Correspond variable name data_frame get_eurostat(). Can also data_frame get_eurostat_dic(). type type x. code label.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/dic_order.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Order of Variable Levels from Eurostat Dictionary. — dic_order","text":"numeric vector orders.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/dic_order.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Order of Variable Levels from Eurostat Dictionary. — dic_order","text":"variables, like classifications, logical conventional ordering. Eurostat data tables necessary ordered order. function dic_order() get ordering Eurostat classifications dictionaries. function label_eurostat() can also order factor levels labels argument eu_order = TRUE.","code":""},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/dic_order.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Order of Variable Levels from Eurostat Dictionary. — dic_order","text":"Przemyslaw Biecek, Leo Lahti, Janne Huovari Markus Kainu","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eu_countries.html","id":null,"dir":"Reference","previous_headings":"","what":"Countries and Country Codes — eu_countries","title":"Countries and Country Codes — eu_countries","text":"Countries country codes EU, Euro area, EFTA EU candidate countries.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eu_countries.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Countries and Country Codes — eu_countries","text":"","code":"eu_countries ea_countries efta_countries eu_candidate_countries"},{"path":"https://ropengov.github.io/eurostat/reference/eu_countries.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Countries and Country Codes — eu_countries","text":"data_frame: code: Country code Eurostat database. name: Country name English. label: Country name Eurostat database. object class tbl_df (inherits tbl, data.frame) 19 rows 3 columns. object class tbl_df (inherits tbl, data.frame) 4 rows 3 columns. object class tbl_df (inherits tbl, data.frame) 7 rows 3 columns.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eu_countries.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Countries and Country Codes — eu_countries","text":"https://ec.europa.eu/eurostat/statistics-explained/index.php/Tutorial:Country_codes_and_protocol_order, https://ec.europa.eu/eurostat/statistics-explained/index.php/Glossary:Euro_area","code":""},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/eurostat-defunct.html","id":null,"dir":"Reference","previous_headings":"","what":"Defunct functions in eurostat — eurostat-defunct","title":"Defunct functions in eurostat — eurostat-defunct","text":"list defunct functions maintained document changes eurostat functions transparent manner.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurostat-defunct.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Defunct functions in eurostat — eurostat-defunct","text":"","code":"grepEurostatTOC(...)"},{"path":"https://ropengov.github.io/eurostat/reference/eurostat-defunct.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Defunct functions in eurostat — eurostat-defunct","text":"... Generic representation old arguments","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurostat-defunct.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Defunct functions in eurostat — eurostat-defunct","text":"following functions defunct: grepEurostatTOC: Use search_eurostat instead","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurostat-package.html","id":null,"dir":"Reference","previous_headings":"","what":"R Tools for Eurostat open data — eurostat-package","title":"R Tools for Eurostat open data — eurostat-package","text":"Tools download data Eurostat database https://ec.europa.eu/eurostat together search manipulation utilities.","code":""},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/eurostat-package.html","id":"eurostat","dir":"Reference","previous_headings":"","what":"Eurostat","title":"R Tools for Eurostat open data — eurostat-package","text":"Eurostat website: https://ec.europa.eu/eurostat Eurostat database: https://ec.europa.eu/eurostat/web/main/data/database Information data update schedule Eurostat: \"Eurostat datasets updated twice day 11:00 23:00 CET, newer data available structural changes, example dimensions dataset. Eurostat database always contains latest version datasets, meaning versioning documentation past versions data.\"","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurostat-package.html","id":"data-source-eurostat-sdmx-dissemination-api","dir":"Reference","previous_headings":"","what":"Data source: Eurostat SDMX 2.1 Dissemination API","title":"R Tools for Eurostat open data — eurostat-package","text":"Data downloaded Eurostat SDMX 2.1 API endpoint compressed TSV files transformed tabular format. See Eurostat documentation information: https://wikis.ec.europa.eu/display/EUROSTATHELP/API+SDMX+2.1+-+data+query new dissemination API replaces old bulk download facility used Eurostat October 2023 eurostat R package versions 4.0.0. See Eurostat documentation transition Bulk Download API information differences old bulk download facility data provided new API connection: https://wikis.ec.europa.eu/display/EUROSTATHELP/Transition+-++Eurostat+Bulk+Download++API See especially document Migrating_to_API_TSV.pdf describes changes TSV file format new applications. information SDMX 2.1, see SDMX standards: Section 7: Guidelines use web services, Version 2.1: https://sdmx.org/wp-content/uploads/SDMX_2-1_SECTION_7_WebServicesGuidelines.pdf","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurostat-package.html","id":"disclaimer-availability-of-filtering-functionalities","dir":"Reference","previous_headings":"","what":"Disclaimer: Availability of filtering functionalities","title":"R Tools for Eurostat open data — eurostat-package","text":"Currently possible download filtered data API Statistics (JSON API) using eurostat package, although technically filtering datasets downloaded SDMX Dissemination API also supported Eurostat. may support feature future. meantime, interested filtering Dissemination API data queries manually, please consult following Eurostat documentation: https://wikis.ec.europa.eu/display/EUROSTATHELP/API+SDMX+2.1+-+data+filtering","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurostat-package.html","id":"data-source-eurostat-api-statistics-json-api-","dir":"Reference","previous_headings":"","what":"Data source: Eurostat API Statistics (JSON API)","title":"R Tools for Eurostat open data — eurostat-package","text":"Data downloaded Eurostat API Statistics. See Eurostat documentation information data queries API Statistics https://wikis.ec.europa.eu/display/EUROSTATHELP/API+Statistics+-+data+query replaces old JSON Web Services used Eurostat February 2023 eurostat R package versions 3.7.13. See Eurostat documentation migration JSON web service API Statistics information differences old new service: https://wikis.ec.europa.eu/display/EUROSTATHELP/API+Statistics+-+migrating++JSON+web+service++API+Statistics easily viewing filtering options available - addition default ones, time language - Eurostat Web services Query builder tool may useful: https://ec.europa.eu/eurostat/web/query-builder","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurostat-package.html","id":"filtering-datasets","dir":"Reference","previous_headings":"","what":"Filtering datasets","title":"R Tools for Eurostat open data — eurostat-package","text":"using Eurostat API Statistics (JSON API), datasets can filtered downloaded saved local memory. general format filter parameters =. Filter parameters optional used dimension codes must present data product queried. Dimension codes can vary different data products may useful examine new datasets Eurostat data browser beforehand. However, Eurostat datasets concern European countries contain information gathered point time, geo time dimension codes can usually used. case-insensitive can written lowercase uppercase query. Parameters passed onto eurostat package functions get_eurostat() get_eurostat_json() list item. individual item contains multiple items, often can case geo parameters optional items, must form vector: c(\"FI\", \"SE\"). examples use parameters, see function examples .","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurostat-package.html","id":"time-parameters","dir":"Reference","previous_headings":"","what":"Time parameters","title":"R Tools for Eurostat open data — eurostat-package","text":"time time_period address TIME_PERIOD dimension dataset can used interchangeably. Eurostat documentation stated \"Using one Time parameter query accepted\", practice shown actually Eurostat API allows multiple time parameters query. makes possible use R colon operator writing queries, time = c(2015:2018) translates &time=2015&time=2016&time=2017&time=2018. exception queried dataset contains e.g. quarterly data TIME_PERIOD saved 2015-Q1, 2015-Q2 etc. possible use time=2015-Q1&time=2015-Q2 style query URL, makes unfeasible use colon operator requires lot manual typing. , useful know time parameters well: untilTimePeriod: return dataset items oldest record set time, example \"data 2000\": untilTimePeriod = 2000 sinceTimePeriod: return dataset items starting set time, example \"datastarting 2008\": sinceTimePeriod = 2008 lastTimePeriod: starting recent time period, many preceding time periods returned? example 10 recent observations: lastTimePeriod = 10 Using untilTimePeriod sinceTimePeriod parameters query allowed, making usage R colon operator unnecessary. case quarterly data, using untilTimePeriod sinceTimePeriod parameters also works, opposed colon operator, generally safer use well.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurostat-package.html","id":"other-dimensions","dir":"Reference","previous_headings":"","what":"Other dimensions","title":"R Tools for Eurostat open data — eurostat-package","text":"get_eurostat_json() examples nama_10_gdp dataset filtered two additional filter parameters: na_item = \"B1GQ\" unit = \"CLV_I10\" Filters like likely unique nama_10_gdp dataset (datasets within domain) used others dataset without user discretion. using label_eurostat() know \"B1GQ\" stands \"Gross domestic product market prices\" \"CLV_I10\" means \"Chain linked volumes, index 2010=100\". Different dimension codes can translated natural language using get_eurostat_dic() function, returns labels individual dimension items na_item unit, opposed label_eurostat() whole datasets. example, parameter na_item stands \"National accounts indicator (ESA 2010)\" unit stands \"Unit measure\".","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurostat-package.html","id":"language","dir":"Reference","previous_headings":"","what":"Language","title":"R Tools for Eurostat open data — eurostat-package","text":"datasets metadata available English, French German. parameter given, labels returned English. Example: lang = \"fr\"","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurostat-package.html","id":"more-information","dir":"Reference","previous_headings":"","what":"More information","title":"R Tools for Eurostat open data — eurostat-package","text":"information data filtering see Eurostat documentation API Statistics: https://wikis.ec.europa.eu/display/EUROSTATHELP/API+Statistics+-+data+query#APIStatisticsdataquery-TheparametersdefinedintheRESTrequest","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurostat-package.html","id":"data-source-eurostat-table-of-contents","dir":"Reference","previous_headings":"","what":"Data source: Eurostat Table of Contents","title":"R Tools for Eurostat open data — eurostat-package","text":"Eurostat Table Contents (TOC) downloaded https://ec.europa.eu/eurostat/api/dissemination/catalogue/toc/txt?lang=en (default) French German language variants: https://ec.europa.eu/eurostat/api/dissemination/catalogue/toc/txt?lang=fr https://ec.europa.eu/eurostat/api/dissemination/catalogue/toc/txt?lang=de See Eurostat documentation TOC items: https://wikis.ec.europa.eu/display/EUROSTATHELP/API+-+Detailed+guidelines+-+Catalogue+API+-+TOC","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurostat-package.html","id":"data-source-gisco-general-copyright","dir":"Reference","previous_headings":"","what":"Data source: GISCO - General Copyright","title":"R Tools for Eurostat open data — eurostat-package","text":"\"Eurostat's general copyright notice licence policy applicable can consulted : https://ec.europa.eu/eurostat/-us/policies/copyright Please also aware European Commission's general conditions: https://commission.europa.eu/legal-notice_en Moreover, specific provisions applicable following datasets available downloading. download usage data subject acceptance: Administrative Units / Statistical Units Population distribution / Demography Transport Networks Land Cover Elevation (DEM)\" abovementioned datasets, Administrative Units / Statistical Units applicable user wants draw maps borders provided GISCO / EuroGeographics.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurostat-package.html","id":"data-source-gisco-administrative-units-statistical-units","dir":"Reference","previous_headings":"","what":"Data source: GISCO - Administrative Units / Statistical Units","title":"R Tools for Eurostat open data — eurostat-package","text":"following copyright notice provided end user convenience. Please check --date copyright information GISCO website: GISCO: Geographical information maps - Administrative units/statistical units \"addition general copyright licence policy applicable whole Eurostat website, following specific provisions apply datasets downloading. download usage data subject acceptance following clauses: Commission agrees grant non-exclusive transferable right use process Eurostat/GISCO geographical data downloaded page (\"data\"). permission use data granted condition : data used commercial purposes; source acknowledged. copyright notice, specified , visible printed electronic publication using data downloaded page.\"","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurostat-package.html","id":"copyright-notice","dir":"Reference","previous_headings":"","what":"Copyright notice","title":"R Tools for Eurostat open data — eurostat-package","text":"data downloaded page used printed electronic publication, addition provisions applicable whole Eurostat website, data source acknowledged legend map introductory page publication following copyright notice: EN: © EuroGeographics administrative boundaries FR: © EuroGeographics pour les limites administratives DE: © EuroGeographics bezüglich der Verwaltungsgrenzen publications languages English, French German, translation copyright notice language publication shall used. intend use data commercially, please contact EuroGeographics information regarding licence agreements.\"","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurostat-package.html","id":"eurostat-copyright-notice-and-free-re-use-of-data","dir":"Reference","previous_headings":"","what":"Eurostat: Copyright notice and free re-use of data","title":"R Tools for Eurostat open data — eurostat-package","text":"following copyright notice provided end user convenience. Please check --date copyright information eurostat website: https://ec.europa.eu/eurostat/-us/policies/copyright \"(c) European Union, 1995 - today Eurostat policy encouraging free re-use data, non-commercial commercial purposes. statistical data, metadata, content web pages dissemination tools, official publications documents published website, exceptions listed , can reused without payment written licence provided : source indicated Eurostat; re-use involves modifications data text, must stated clearly end user information.\" exceptions abovementioned principles see Eurostat website","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurostat-package.html","id":"citing-eurostat-data","dir":"Reference","previous_headings":"","what":"Citing Eurostat data","title":"R Tools for Eurostat open data — eurostat-package","text":"citing datasets, use get_bibentry() build bibliography suitable reference manager choice. using Eurostat data contexts academic publications -text citations footnotes/endnotes, following guidelines may helpful: origin data always mentioned \"Source: Eurostat\". online dataset codes(s) also provided order ensure transparency facilitate access Eurostat data related methodological information. example: \"Source: Eurostat (online data code: namq_10_gdp)\" Online publications (e.g. web pages, PDF) include clickable link dataset using bookmark functionality available Eurostat data browser. avoided associate different entities (e.g. Eurostat, National Statistical Offices, data providers) dataset indicator without specifying role treatment data. See also section \"Eurostat: Copyright notice free re-use data\" get_eurostat() documentation.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurostat-package.html","id":"strategies-for-handling-large-datasets-more-efficiently","dir":"Reference","previous_headings":"","what":"Strategies for handling large datasets more efficiently","title":"R Tools for Eurostat open data — eurostat-package","text":"Eurostat datasets relatively manageable, least machine 16 GB RAM. largest dataset Eurostat database, time writing , 148362539 (148 million) values, results object 148 million rows tidy data (long) format. test machine 16 GB RAM able handle second largest dataset database 91 million values (rows). still methods make data fetching functions perform faster: turn caching : get_eurostat(cache = FALSE) turn cache compression (may result rather large cache files!): get_eurostat(compress_file = FALSE) want faster caching manageable file sizes, use stringsAsFactors: get_eurostat(cache = TRUE, compress_file = TRUE, stringsAsFactors = TRUE) Use faster data.table functions: get_eurostat(use.data.table = TRUE) Keep column processing minimum: get_eurostat(time_format = \"raw\", type = \"code\") etc. Read get_eurostat() function documentation carefully understand different arguments Filter dataset fetch parts need!","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurostat-package.html","id":"regions-functions","dir":"Reference","previous_headings":"","what":"regions functions","title":"R Tools for Eurostat open data — eurostat-package","text":"working sub-national statistics basic functions regions package imported https://regions.dataobservatory.eu/.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurostat-package.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"R Tools for Eurostat open data — eurostat-package","text":"See citation(\"eurostat\"): citing data downloaded Eurostat, see section \"Citing Eurostat data\" get_eurostat() documentation.","code":"Kindly cite the eurostat R package as follows: Lahti L., Huovari J., Kainu M., and Biecek P. (2017). Retrieval and analysis of Eurostat open data with the eurostat package. The R Journal 9(1), pp. 385-392. doi: 10.32614/RJ-2017-019 A BibTeX entry for LaTeX users is @Article{10.32614/RJ-2017-019, title = {Retrieval and Analysis of Eurostat Open Data with the eurostat Package}, author = {Leo Lahti and Janne Huovari and Markus Kainu and Przemyslaw Biecek}, journal = {The R Journal}, volume = {9}, number = {1}, pages = {385--392}, year = {2017}, doi = {10.32614/RJ-2017-019}, url = {https://doi.org/10.32614/RJ-2017-019}, } Lahti, L., Huovari J., Kainu M., Biecek P., Hernangomez D., Antal D., and Kantanen P. (2023). eurostat: Tools for Eurostat Open Data [Computer software]. R package version 4.0.0. https://github.com/rOpenGov/eurostat A BibTeX entry for LaTeX users is @Misc{eurostat, title = {eurostat: Tools for Eurostat Open Data}, author = {Leo Lahti and Janne Huovari and Markus Kainu and Przemyslaw Biecek and Diego Hernangomez and Daniel Antal and Pyry Kantanen}, url = {https://github.com/rOpenGov/eurostat}, type = {Computer software}, year = {2023}, note = {R package version 4.0.0}, }"},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/eurostat-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"R Tools for Eurostat open data — eurostat-package","text":"Leo Lahti, Janne Huovari, Markus Kainu, Przemyslaw Biecek","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurostat-package.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"R Tools for Eurostat open data — eurostat-package","text":"","code":"library(eurostat)"},{"path":"https://ropengov.github.io/eurostat/reference/eurostat_geodata_60_2016.html","id":null,"dir":"Reference","previous_headings":"","what":"Geospatial data of Europe from GISCO in 1:60 million scale from\nyear 2016 — eurostat_geodata_60_2016","title":"Geospatial data of Europe from GISCO in 1:60 million scale from\nyear 2016 — eurostat_geodata_60_2016","text":"Geospatial data Europe GISCO 1:60 million scale year 2016","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurostat_geodata_60_2016.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Geospatial data of Europe from GISCO in 1:60 million scale from\nyear 2016 — eurostat_geodata_60_2016","text":"sf object","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurostat_geodata_60_2016.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Geospatial data of Europe from GISCO in 1:60 million scale from\nyear 2016 — eurostat_geodata_60_2016","text":"Data source: Eurostat via giscoR::gisco_get_nuts(). © EuroGeographics administrative boundaries Data downloaded : https://ec.europa.eu/eurostat/web/gisco/geodata/reference-data/administrative-units-statistical-units","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurostat_geodata_60_2016.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Geospatial data of Europe from GISCO in 1:60 million scale from\nyear 2016 — eurostat_geodata_60_2016","text":"dataset contains 2016 observations (rows) 12 variables (columns). object contains following columns: id: JSON id code, NUTS_ID. See NUTS_ID clarification. LEVL_CODE: NUTS level code: 0 (national level), 1 (major socio-economic regions), 2 (basic regions application regional policies) 3 (small regions). NUTS_ID: NUTS ID code, consisting country code numbers (1 NUTS 1, 2 NUTS 2 3 NUTS 3) CNTR_CODE: Country code: two-letter ISO code (ISO 3166 alpha-2), except case Greece (EL). NAME_LATN: NUTS name local language, transliterated Latin script NUTS_NAME: NUTS name local language, local script. MOUNT_TYPE: Mountain typology NUTS 3 regions. 1: \"50 % surface covered topographic mountain areas\" 2: \"50 % regional population lives topographic mountain areas\" 3: \"50 % surface covered topographic mountain areas 50 % regional population lives mountain areas\" 4: non-mountain region / region 0: classification provided (e.g. case NUTS 1 NUTS 2 non-EU countries) URBN_TYPE: Urban-rural typology NUTS 3 regions. 1: predominantly urban region 2: intermediate region 3: predominantly rural region 0: classification provided (e.g. case NUTS 1 NUTS 2 regions) COAST_TYPE: Coastal typology NUTS 3 regions. 1: coastal (coast) 2: coastal (>= 50% population living within 50km coastline) 3: non-coastal region 0: classification provided (e.g. case NUTS 1 NUTS 2 regions) FID: NUTS_ID. geo: NUTS_ID, added easier joins dplyr. However, recommended use identical fields purpose. geometry: geospatial information. Dataset updated: 2023-06-29. recent version, please use giscoR::gisco_get_nuts() function.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurostat_geodata_60_2016.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Geospatial data of Europe from GISCO in 1:60 million scale from\nyear 2016 — eurostat_geodata_60_2016","text":"following copyright notice provided end user convenience. Please check --date copyright information eurostat website: GISCO: Geographical information maps - Administrative units/statistical units \"addition general copyright licence policy applicable whole Eurostat website, following specific provisions apply datasets downloading. download usage data subject acceptance following clauses: Commission agrees grant non-exclusive transferable right use process Eurostat/GISCO geographical data downloaded page (\"data\"). permission use data granted condition : data used commercial purposes; source acknowledged. copyright notice, specified , visible printed electronic publication using data downloaded page.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurostat_geodata_60_2016.html","id":"copyright-notice","dir":"Reference","previous_headings":"","what":"Copyright notice","title":"Geospatial data of Europe from GISCO in 1:60 million scale from\nyear 2016 — eurostat_geodata_60_2016","text":"data downloaded page used printed electronic publication, addition provisions applicable whole Eurostat website, data source acknowledged legend map introductory page publication following copyright notice: EN: © EuroGeographics administrative boundaries FR: © EuroGeographics pour les limites administratives DE: © EuroGeographics bezüglich der Verwaltungsgrenzen publications languages English, French German, translation copyright notice language publication shall used. intend use data commercially, please contact EuroGeographics information regarding licence agreements.\"","code":""},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/eurostat_geodata_60_2016.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Geospatial data of Europe from GISCO in 1:60 million scale from\nyear 2016 — eurostat_geodata_60_2016","text":"","code":"eurostat_geodata_60_2016 <- eurostat::eurostat_geodata_60_2016 # Manipulate and plot if (require(sf)) { library(sf) # Filter NUTS3 from select countries like in a regular data frame example_nuts <- subset(eurostat_geodata_60_2016, LEVL_CODE == 3 & CNTR_CODE %in% c(\"DK\", \"DE\", \"PL\")) plot(example_nuts[\"CNTR_CODE\"]) } #> Loading required package: sf #> Linking to GEOS 3.10.2, GDAL 3.4.1, PROJ 8.2.1; sf_use_s2() is TRUE"},{"path":"https://ropengov.github.io/eurostat/reference/eurotime2date.html","id":null,"dir":"Reference","previous_headings":"","what":"Date Conversion from New Eurostat Time Format — eurotime2date","title":"Date Conversion from New Eurostat Time Format — eurotime2date","text":"Date conversion Eurostat time format. function convert Eurostat time values objects class Date() representing calendar dates.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurotime2date.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Date Conversion from New Eurostat Time Format — eurotime2date","text":"","code":"eurotime2date(x, last = FALSE)"},{"path":"https://ropengov.github.io/eurostat/reference/eurotime2date.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Date Conversion from New Eurostat Time Format — eurotime2date","text":"x charter string time information Eurostat time format. last logical. FALSE (default) date first date period (month, quarter year). TRUE date last date period.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurotime2date.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Date Conversion from New Eurostat Time Format — eurotime2date","text":"object class Date().","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurotime2date.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Date Conversion from New Eurostat Time Format — eurotime2date","text":"Available patterns YYYY (year), YYYY-SN (semester), YYYY-QN (quarter), YYYY-MM (month), YYYY-WNN (week) YYYY-MM-DD (day).","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurotime2date.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Date Conversion from New Eurostat Time Format — eurotime2date","text":"See citation(\"eurostat\"):","code":"# Kindly cite the eurostat R package as follows: # # Lahti L., Huovari J., Kainu M., and Biecek P. (2017). Retrieval and # analysis of Eurostat open data with the eurostat package. The R # Journal 9(1), pp. 385-392. doi: 10.32614/RJ-2017-019 # # A BibTeX entry for LaTeX users is # # @Article{10.32614/RJ-2017-019, # title = {Retrieval and Analysis of Eurostat Open Data with the eurostat Package}, # author = {Leo Lahti and Janne Huovari and Markus Kainu and Przemyslaw Biecek}, # journal = {The R Journal}, # volume = {9}, # number = {1}, # pages = {385--392}, # year = {2017}, # doi = {10.32614/RJ-2017-019}, # url = {https://doi.org/10.32614/RJ-2017-019}, # } # # Lahti, L., Huovari J., Kainu M., Biecek P., Hernangomez D., Antal D., # and Kantanen P. (2023). eurostat: Tools for Eurostat Open Data # [Computer software]. R package version 4.0.0. # https://github.com/rOpenGov/eurostat # # A BibTeX entry for LaTeX users is # # @Misc{eurostat, # title = {eurostat: Tools for Eurostat Open Data}, # author = {Leo Lahti and Janne Huovari and Markus Kainu and Przemyslaw Biecek and Diego Hernangomez and Daniel Antal and Pyry Kantanen}, # url = {https://github.com/rOpenGov/eurostat}, # type = {Computer software}, # year = {2023}, # note = {R package version 4.0.0}, # }"},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/eurotime2date.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Date Conversion from New Eurostat Time Format — eurotime2date","text":"Janne Huovari janne.huovari@ptt.fi","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurotime2date.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Date Conversion from New Eurostat Time Format — eurotime2date","text":"","code":"# \\donttest{ na_q <- get_eurostat(\"namq_10_pc\", time_format = \"raw\") #> Table namq_10_pc cached at /tmp/RtmpSVUIhm/eurostat/e6dce4fcf32666cd10e802394665f92c.rds na_q$TIME_PERIOD <- eurotime2date(x = na_q$TIME_PERIOD) unique(na_q$TIME_PERIOD) #> [1] \"1995-01-01\" \"1995-04-01\" \"1995-07-01\" \"1995-10-01\" \"1996-01-01\" #> [6] \"1996-04-01\" \"1996-07-01\" \"1996-10-01\" \"1997-01-01\" \"1997-04-01\" #> [11] \"1997-07-01\" \"1997-10-01\" \"1998-01-01\" \"1998-04-01\" \"1998-07-01\" #> [16] \"1998-10-01\" \"1999-01-01\" \"1999-04-01\" \"1999-07-01\" \"1999-10-01\" #> [21] \"2000-01-01\" \"2000-04-01\" \"2000-07-01\" \"2000-10-01\" \"2001-01-01\" #> [26] \"2001-04-01\" \"2001-07-01\" \"2001-10-01\" \"2002-01-01\" \"2002-04-01\" #> [31] \"2002-07-01\" \"2002-10-01\" \"2003-01-01\" \"2003-04-01\" \"2003-07-01\" #> [36] \"2003-10-01\" \"2004-01-01\" \"2004-04-01\" \"2004-07-01\" \"2004-10-01\" #> [41] \"2005-01-01\" \"2005-04-01\" \"2005-07-01\" \"2005-10-01\" \"2006-01-01\" #> [46] \"2006-04-01\" \"2006-07-01\" \"2006-10-01\" \"2007-01-01\" \"2007-04-01\" #> [51] \"2007-07-01\" \"2007-10-01\" \"2008-01-01\" \"2008-04-01\" \"2008-07-01\" #> [56] \"2008-10-01\" \"2009-01-01\" \"2009-04-01\" \"2009-07-01\" \"2009-10-01\" #> [61] \"2010-01-01\" \"2010-04-01\" \"2010-07-01\" \"2010-10-01\" \"2011-01-01\" #> [66] \"2011-04-01\" \"2011-07-01\" \"2011-10-01\" \"2012-01-01\" \"2012-04-01\" #> [71] \"2012-07-01\" \"2012-10-01\" \"2013-01-01\" \"2013-04-01\" \"2013-07-01\" #> [76] \"2013-10-01\" \"2014-01-01\" \"2014-04-01\" \"2014-07-01\" \"2014-10-01\" #> [81] \"2015-01-01\" \"2015-04-01\" \"2015-07-01\" \"2015-10-01\" \"2016-01-01\" #> [86] \"2016-04-01\" \"2016-07-01\" \"2016-10-01\" \"2017-01-01\" \"2017-04-01\" #> [91] \"2017-07-01\" \"2017-10-01\" \"2018-01-01\" \"2018-04-01\" \"2018-07-01\" #> [96] \"2018-10-01\" \"2019-01-01\" \"2019-04-01\" \"2019-07-01\" \"2019-10-01\" #> [101] \"2020-01-01\" \"2020-04-01\" \"2020-07-01\" \"2020-10-01\" \"2021-01-01\" #> [106] \"2021-04-01\" \"2021-07-01\" \"2021-10-01\" \"2022-01-01\" \"2022-04-01\" #> [111] \"2022-07-01\" \"2022-10-01\" \"2023-01-01\" \"2023-04-01\" \"2023-07-01\" #> [116] \"1991-01-01\" \"1991-04-01\" \"1991-07-01\" \"1991-10-01\" \"1992-01-01\" #> [121] \"1992-04-01\" \"1992-07-01\" \"1992-10-01\" \"1993-01-01\" \"1993-04-01\" #> [126] \"1993-07-01\" \"1993-10-01\" \"1994-01-01\" \"1994-04-01\" \"1994-07-01\" #> [131] \"1994-10-01\" \"1990-01-01\" \"1990-04-01\" \"1990-07-01\" \"1990-10-01\" #> [136] \"1980-01-01\" \"1980-04-01\" \"1980-07-01\" \"1980-10-01\" \"1981-01-01\" #> [141] \"1981-04-01\" \"1981-07-01\" \"1981-10-01\" \"1982-01-01\" \"1982-04-01\" #> [146] \"1982-07-01\" \"1982-10-01\" \"1983-01-01\" \"1983-04-01\" \"1983-07-01\" #> [151] \"1983-10-01\" \"1984-01-01\" \"1984-04-01\" \"1984-07-01\" \"1984-10-01\" #> [156] \"1985-01-01\" \"1985-04-01\" \"1985-07-01\" \"1985-10-01\" \"1986-01-01\" #> [161] \"1986-04-01\" \"1986-07-01\" \"1986-10-01\" \"1987-01-01\" \"1987-04-01\" #> [166] \"1987-07-01\" \"1987-10-01\" \"1988-01-01\" \"1988-04-01\" \"1988-07-01\" #> [171] \"1988-10-01\" \"1989-01-01\" \"1989-04-01\" \"1989-07-01\" \"1989-10-01\" # } if (FALSE) { # Test for weekly data get_eurostat( id = \"lfsi_abs_w\", select_time = c(\"W\"), time_format = \"date\" ) }"},{"path":"https://ropengov.github.io/eurostat/reference/eurotime2num.html","id":null,"dir":"Reference","previous_headings":"","what":"Conversion of Eurostat Time Format to Numeric — eurotime2num","title":"Conversion of Eurostat Time Format to Numeric — eurotime2num","text":"conversion Eurostat time format numeric.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurotime2num.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Conversion of Eurostat Time Format to Numeric — eurotime2num","text":"","code":"eurotime2num(x)"},{"path":"https://ropengov.github.io/eurostat/reference/eurotime2num.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Conversion of Eurostat Time Format to Numeric — eurotime2num","text":"x charter string time information Eurostat time format.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurotime2num.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Conversion of Eurostat Time Format to Numeric — eurotime2num","text":"see .numeric().","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurotime2num.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Conversion of Eurostat Time Format to Numeric — eurotime2num","text":"Bi-annual (semester), quarterly, monthly weekly data can presented fraction year beginning period. Conversion daily data supported.","code":""},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/eurotime2num.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Conversion of Eurostat Time Format to Numeric — eurotime2num","text":"Janne Huovari janne.huovari@ptt.fi, Pyry Kantanen","code":""},{"path":"https://ropengov.github.io/eurostat/reference/eurotime2num.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Conversion of Eurostat Time Format to Numeric — eurotime2num","text":"","code":"# \\donttest{ na_q <- get_eurostat(\"namq_10_pc\", time_format = \"raw\") #> Dataset query already saved in cache_list.json... #> Reading cache file /tmp/RtmpSVUIhm/eurostat/e6dce4fcf32666cd10e802394665f92c.rds #> Table namq_10_pc read from cache file: /tmp/RtmpSVUIhm/eurostat/e6dce4fcf32666cd10e802394665f92c.rds na_q$TIME_PERIOD <- eurotime2num(x = na_q$TIME_PERIOD) unique(na_q$TIME_PERIOD) #> [1] 1995.00 1995.25 1995.50 1995.75 1996.00 1996.25 1996.50 1996.75 1997.00 #> [10] 1997.25 1997.50 1997.75 1998.00 1998.25 1998.50 1998.75 1999.00 1999.25 #> [19] 1999.50 1999.75 2000.00 2000.25 2000.50 2000.75 2001.00 2001.25 2001.50 #> [28] 2001.75 2002.00 2002.25 2002.50 2002.75 2003.00 2003.25 2003.50 2003.75 #> [37] 2004.00 2004.25 2004.50 2004.75 2005.00 2005.25 2005.50 2005.75 2006.00 #> [46] 2006.25 2006.50 2006.75 2007.00 2007.25 2007.50 2007.75 2008.00 2008.25 #> [55] 2008.50 2008.75 2009.00 2009.25 2009.50 2009.75 2010.00 2010.25 2010.50 #> [64] 2010.75 2011.00 2011.25 2011.50 2011.75 2012.00 2012.25 2012.50 2012.75 #> [73] 2013.00 2013.25 2013.50 2013.75 2014.00 2014.25 2014.50 2014.75 2015.00 #> [82] 2015.25 2015.50 2015.75 2016.00 2016.25 2016.50 2016.75 2017.00 2017.25 #> [91] 2017.50 2017.75 2018.00 2018.25 2018.50 2018.75 2019.00 2019.25 2019.50 #> [100] 2019.75 2020.00 2020.25 2020.50 2020.75 2021.00 2021.25 2021.50 2021.75 #> [109] 2022.00 2022.25 2022.50 2022.75 2023.00 2023.25 2023.50 1991.00 1991.25 #> [118] 1991.50 1991.75 1992.00 1992.25 1992.50 1992.75 1993.00 1993.25 1993.50 #> [127] 1993.75 1994.00 1994.25 1994.50 1994.75 1990.00 1990.25 1990.50 1990.75 #> [136] 1980.00 1980.25 1980.50 1980.75 1981.00 1981.25 1981.50 1981.75 1982.00 #> [145] 1982.25 1982.50 1982.75 1983.00 1983.25 1983.50 1983.75 1984.00 1984.25 #> [154] 1984.50 1984.75 1985.00 1985.25 1985.50 1985.75 1986.00 1986.25 1986.50 #> [163] 1986.75 1987.00 1987.25 1987.50 1987.75 1988.00 1988.25 1988.50 1988.75 #> [172] 1989.00 1989.25 1989.50 1989.75 # }"},{"path":"https://ropengov.github.io/eurostat/reference/fixity_checksum.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate a fixity checksum for an object — fixity_checksum","title":"Calculate a fixity checksum for an object — fixity_checksum","text":"Uses hash function (md5) object calculates digest object form character string.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/fixity_checksum.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate a fixity checksum for an object — fixity_checksum","text":"","code":"fixity_checksum(data_object, algorithm = \"md5\")"},{"path":"https://ropengov.github.io/eurostat/reference/fixity_checksum.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Calculate a fixity checksum for an object — fixity_checksum","text":"https://www.dpconline.org/handbook/technical-solutions--tools/fixity--checksums","code":""},{"path":"https://ropengov.github.io/eurostat/reference/fixity_checksum.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate a fixity checksum for an object — fixity_checksum","text":"data_object dataset downloaded eurostat package function. algorithm Algorithm use calculating checksum dataset. Default 'md5', can supported algorithm digest function.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/fixity_checksum.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Calculate a fixity checksum for an object — fixity_checksum","text":"“Fixity, preservation sense, means assurance digital file remained unchanged, .e. fixed.” (Bailey, 2014). practice, fixity can easily established calculating checksum data object changes anything data object changed. use checksum default calculated md5 hash algorithm. possible use algorithms supported imported digest function, see function documentation. case big objects millions rows data calculating checksum can take bit longer require amount RAM available. Selecting another algorithm might perform faster /efficiently. Whichever algorithm using, please make sure report transparently work transparency ensuring replicability. function takes whole data object input, meaning everything counts calculating fixity checksum. dataset column names labeled, data labeled, stringsAsFactors TRUE, flags removed kept, data somehow edited... affect calculated checksum. advisable calculate checksum immediately downloading data, adding labels mutating operations. using arguments default ones downloading data, also good report exact arguments used. implementation fulfills level 1 requirement National Digital Stewardship Alliance (NDSA) preservation levels creating \"fixity info wasn’t provided content\". current version package, fixity information created manually responsibility user.","code":""},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/get_bibentry.html","id":null,"dir":"Reference","previous_headings":"","what":"Create A Data Bibliography — get_bibentry","title":"Create A Data Bibliography — get_bibentry","text":"Creates bibliography selected Eurostat data files, including last Eurostat update, URL access data, optional keywords set user.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_bibentry.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create A Data Bibliography — get_bibentry","text":"","code":"get_bibentry(code, keywords = NULL, format = \"Biblatex\", lang = \"en\")"},{"path":"https://ropengov.github.io/eurostat/reference/get_bibentry.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create A Data Bibliography — get_bibentry","text":"code Eurostat data code vector Eurostat data codes character factor. keywords list keywords added entries. Defaults NULL. format Default 'Biblatex', alternatives 'bibentry' 'Bibtex' (case sensitive) lang 2-letter language code, default \"en\" (English), options \"fr\" (French) \"de\" (German). Used labeling datasets.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_bibentry.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create A Data Bibliography — get_bibentry","text":"bibentry, Bibtex Biblatex object.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_bibentry.html","id":"citing-eurostat-data","dir":"Reference","previous_headings":"","what":"Citing Eurostat data","title":"Create A Data Bibliography — get_bibentry","text":"citing datasets, use get_bibentry() build bibliography suitable reference manager choice. using Eurostat data contexts academic publications -text citations footnotes/endnotes, following guidelines may helpful: origin data always mentioned \"Source: Eurostat\". online dataset codes(s) also provided order ensure transparency facilitate access Eurostat data related methodological information. example: \"Source: Eurostat (online data code: namq_10_gdp)\" Online publications (e.g. web pages, PDF) include clickable link dataset using bookmark functionality available Eurostat data browser. avoided associate different entities (e.g. Eurostat, National Statistical Offices, data providers) dataset indicator without specifying role treatment data. See also section \"Eurostat: Copyright notice free re-use data\" get_eurostat() documentation.","code":""},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/get_bibentry.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create A Data Bibliography — get_bibentry","text":"Daniel Antal, Przemyslaw Biecek","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_bibentry.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create A Data Bibliography — get_bibentry","text":"","code":"if (FALSE) { my_bibliography <- get_bibentry( code = c(\"tran_hv_frtra\", \"tec00001\"), keywords = list( c(\"transport\", \"freight\", \"multimodal data\", \"GDP\"), c(\"economy and finance\", \"annual\", \"national accounts\", \"GDP\") ), format = \"Biblatex\" ) my_bibliography }"},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Eurostat Data — get_eurostat","title":"Get Eurostat Data — get_eurostat","text":"Download data sets Eurostat https://ec.europa.eu/eurostat","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Eurostat Data — get_eurostat","text":"","code":"get_eurostat( id, time_format = \"date\", filters = NULL, type = \"code\", select_time = NULL, lang = \"en\", cache = TRUE, update_cache = FALSE, cache_dir = NULL, compress_file = TRUE, stringsAsFactors = FALSE, keepFlags = FALSE, use.data.table = FALSE, ... )"},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Eurostat Data — get_eurostat","text":"id unique identifier / code dataset interest. code known search_eurostat() function can used search Eurostat table contents. time_format string giving type conversion time column eurostat format. default argument \"date\" converts Date() class date first day period. \"date_last\" argument converts dataset date Date() class object difference exact date last date period. Period can year, semester (half year), quarter, month, week (See eurotime2date() information). Argument \"num\" converts date numeric (integer) meaning first day year 2000 close 2000.01 last day year close 2000.99 (see eurotime2num() information). Using argument \"raw\" preserves dates original Eurostat data. filters named list filters. Names list objects Eurostat variable codes values vectors observation codes. NULL (default) whole dataset returned. See details information filters limitations per query. type type variables, \"code\" (default), \"label\" \"\". parameter \"\" return data_frame named vectors, labels values codes names. select_time character symbol time frequency NULL, used default datasets just one time frequency. datasets multiple time frequencies, select one desired frequencies : \"Y\" (\"\") = annual, \"S\" = semi-annual / semester, \"Q\" = quarterly, \"M\" = monthly, \"W\" = weekly. frequencies data frame time_format = \"raw\" used. lang 2-letter language code, default \"en\" (English), options \"fr\" (French) \"de\" (German). Used labeling datasets. cache logical whether caching. Default TRUE. update_cache logical whether update cache. Can set also options(eurostat_update = TRUE) cache_dir path cache directory. NULL (default) uses creates 'eurostat' directory temporary directory defined base R tempdir() function. user can set cache directory existing directory using argument. cache directory can also set set_eurostat_cache_dir() function. compress_file logical whether compress RDS-file caching. Default TRUE. stringsAsFactors TRUE (default) variables converted factors original Eurostat order. FALSE returned strings. keepFlags logical whether flags (e.g. \"confidential\", \"provisional\") kept separate column can removed. Default FALSE. flag values see: https://ec.europa.eu/eurostat/data/database/information. Also possible non-real zero \"0n\" indicated flags column. Flags available eurostat API, keepFlags can used filters. use.data.table Use faster data.table functions? Default FALSE. Windows requires RTools installed. ... Arguments passed get_eurostat_json proxy Use proxy, TRUE FALSE (default).","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get Eurostat Data — get_eurostat","text":"tibble. One column dimension data, time column time dimension values column numerical values. Eurostat data include missing values treatment missing values depend source. bulk download facility missing values dropped dimensions missing particular time. JSON API missing values dropped dimensions missing times. data bulk download facility can completed example tidyr::complete().","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get Eurostat Data — get_eurostat","text":"Datasets downloaded Eurostat SDMX 2.1 API TSV format Eurostat API Statistics JSON API. table id given, whole table downloaded SDMX API. filters given JSON API used instead. bulk download facility fastest method download whole datasets. also often way JSON API limitation maximum 50 sub-indicators time whole datasets usually exceeds . Also, seems multi frequency datasets can retrieved via bulk download facility select_time available JSON API method. connection proxy, may set proxy parameters use JSON API, see get_eurostat_json(). default datasets cached reduce load Eurostat services datasets can quite large. Cache files stored temporary directory default named directory (See set_eurostat_cache_dir()). cache can emptied clean_eurostat_cache(). id, code, dataset can searched search_eurostat() Eurostat database https://ec.europa.eu/eurostat/data/database. Eurostat database gives codes Data Navigation Tree every dataset parenthesis.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat.html","id":"eurostat-copyright-notice-and-free-re-use-of-data","dir":"Reference","previous_headings":"","what":"Eurostat: Copyright notice and free re-use of data","title":"Get Eurostat Data — get_eurostat","text":"following copyright notice provided end user convenience. Please check --date copyright information eurostat website: https://ec.europa.eu/eurostat/-us/policies/copyright \"(c) European Union, 1995 - today Eurostat policy encouraging free re-use data, non-commercial commercial purposes. statistical data, metadata, content web pages dissemination tools, official publications documents published website, exceptions listed , can reused without payment written licence provided : source indicated Eurostat; re-use involves modifications data text, must stated clearly end user information.\" exceptions abovementioned principles see Eurostat website","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat.html","id":"filtering-datasets","dir":"Reference","previous_headings":"","what":"Filtering datasets","title":"Get Eurostat Data — get_eurostat","text":"using Eurostat API Statistics (JSON API), datasets can filtered downloaded saved local memory. general format filter parameters =. Filter parameters optional used dimension codes must present data product queried. Dimension codes can vary different data products may useful examine new datasets Eurostat data browser beforehand. However, Eurostat datasets concern European countries contain information gathered point time, geo time dimension codes can usually used. case-insensitive can written lowercase uppercase query. Parameters passed onto eurostat package functions get_eurostat() get_eurostat_json() list item. individual item contains multiple items, often can case geo parameters optional items, must form vector: c(\"FI\", \"SE\"). examples use parameters, see function examples .","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat.html","id":"time-parameters","dir":"Reference","previous_headings":"","what":"Time parameters","title":"Get Eurostat Data — get_eurostat","text":"time time_period address TIME_PERIOD dimension dataset can used interchangeably. Eurostat documentation stated \"Using one Time parameter query accepted\", practice shown actually Eurostat API allows multiple time parameters query. makes possible use R colon operator writing queries, time = c(2015:2018) translates &time=2015&time=2016&time=2017&time=2018. exception queried dataset contains e.g. quarterly data TIME_PERIOD saved 2015-Q1, 2015-Q2 etc. possible use time=2015-Q1&time=2015-Q2 style query URL, makes unfeasible use colon operator requires lot manual typing. , useful know time parameters well: untilTimePeriod: return dataset items oldest record set time, example \"data 2000\": untilTimePeriod = 2000 sinceTimePeriod: return dataset items starting set time, example \"datastarting 2008\": sinceTimePeriod = 2008 lastTimePeriod: starting recent time period, many preceding time periods returned? example 10 recent observations: lastTimePeriod = 10 Using untilTimePeriod sinceTimePeriod parameters query allowed, making usage R colon operator unnecessary. case quarterly data, using untilTimePeriod sinceTimePeriod parameters also works, opposed colon operator, generally safer use well.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat.html","id":"other-dimensions","dir":"Reference","previous_headings":"","what":"Other dimensions","title":"Get Eurostat Data — get_eurostat","text":"get_eurostat_json() examples nama_10_gdp dataset filtered two additional filter parameters: na_item = \"B1GQ\" unit = \"CLV_I10\" Filters like likely unique nama_10_gdp dataset (datasets within domain) used others dataset without user discretion. using label_eurostat() know \"B1GQ\" stands \"Gross domestic product market prices\" \"CLV_I10\" means \"Chain linked volumes, index 2010=100\". Different dimension codes can translated natural language using get_eurostat_dic() function, returns labels individual dimension items na_item unit, opposed label_eurostat() whole datasets. example, parameter na_item stands \"National accounts indicator (ESA 2010)\" unit stands \"Unit measure\".","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat.html","id":"language","dir":"Reference","previous_headings":"","what":"Language","title":"Get Eurostat Data — get_eurostat","text":"datasets metadata available English, French German. parameter given, labels returned English. Example: lang = \"fr\"","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat.html","id":"more-information","dir":"Reference","previous_headings":"","what":"More information","title":"Get Eurostat Data — get_eurostat","text":"information data filtering see Eurostat documentation API Statistics: https://wikis.ec.europa.eu/display/EUROSTATHELP/API+Statistics+-+data+query#APIStatisticsdataquery-TheparametersdefinedintheRESTrequest","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat.html","id":"citing-eurostat-data","dir":"Reference","previous_headings":"","what":"Citing Eurostat data","title":"Get Eurostat Data — get_eurostat","text":"citing datasets, use get_bibentry() build bibliography suitable reference manager choice. using Eurostat data contexts academic publications -text citations footnotes/endnotes, following guidelines may helpful: origin data always mentioned \"Source: Eurostat\". online dataset codes(s) also provided order ensure transparency facilitate access Eurostat data related methodological information. example: \"Source: Eurostat (online data code: namq_10_gdp)\" Online publications (e.g. web pages, PDF) include clickable link dataset using bookmark functionality available Eurostat data browser. avoided associate different entities (e.g. Eurostat, National Statistical Offices, data providers) dataset indicator without specifying role treatment data. See also section \"Eurostat: Copyright notice free re-use data\" get_eurostat() documentation.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat.html","id":"disclaimer-availability-of-filtering-functionalities","dir":"Reference","previous_headings":"","what":"Disclaimer: Availability of filtering functionalities","title":"Get Eurostat Data — get_eurostat","text":"Currently possible download filtered data API Statistics (JSON API) using eurostat package, although technically filtering datasets downloaded SDMX Dissemination API also supported Eurostat. may support feature future. meantime, interested filtering Dissemination API data queries manually, please consult following Eurostat documentation: https://wikis.ec.europa.eu/display/EUROSTATHELP/API+SDMX+2.1+-+data+filtering","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat.html","id":"strategies-for-handling-large-datasets-more-efficiently","dir":"Reference","previous_headings":"","what":"Strategies for handling large datasets more efficiently","title":"Get Eurostat Data — get_eurostat","text":"Eurostat datasets relatively manageable, least machine 16 GB RAM. largest dataset Eurostat database, time writing , 148362539 (148 million) values, results object 148 million rows tidy data (long) format. test machine 16 GB RAM able handle second largest dataset database 91 million values (rows). still methods make data fetching functions perform faster: turn caching : get_eurostat(cache = FALSE) turn cache compression (may result rather large cache files!): get_eurostat(compress_file = FALSE) want faster caching manageable file sizes, use stringsAsFactors: get_eurostat(cache = TRUE, compress_file = TRUE, stringsAsFactors = TRUE) Use faster data.table functions: get_eurostat(use.data.table = TRUE) Keep column processing minimum: get_eurostat(time_format = \"raw\", type = \"code\") etc. Read get_eurostat() function documentation carefully understand different arguments Filter dataset fetch parts need!","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Get Eurostat Data — get_eurostat","text":"See citation(\"eurostat\"): citing data downloaded Eurostat, see section \"Citing Eurostat data\" get_eurostat() documentation.","code":"Kindly cite the eurostat R package as follows: Lahti L., Huovari J., Kainu M., and Biecek P. (2017). Retrieval and analysis of Eurostat open data with the eurostat package. The R Journal 9(1), pp. 385-392. doi: 10.32614/RJ-2017-019 A BibTeX entry for LaTeX users is @Article{10.32614/RJ-2017-019, title = {Retrieval and Analysis of Eurostat Open Data with the eurostat Package}, author = {Leo Lahti and Janne Huovari and Markus Kainu and Przemyslaw Biecek}, journal = {The R Journal}, volume = {9}, number = {1}, pages = {385--392}, year = {2017}, doi = {10.32614/RJ-2017-019}, url = {https://doi.org/10.32614/RJ-2017-019}, } Lahti, L., Huovari J., Kainu M., Biecek P., Hernangomez D., Antal D., and Kantanen P. (2023). eurostat: Tools for Eurostat Open Data [Computer software]. R package version 4.0.0. https://github.com/rOpenGov/eurostat A BibTeX entry for LaTeX users is @Misc{eurostat, title = {eurostat: Tools for Eurostat Open Data}, author = {Leo Lahti and Janne Huovari and Markus Kainu and Przemyslaw Biecek and Diego Hernangomez and Daniel Antal and Pyry Kantanen}, url = {https://github.com/rOpenGov/eurostat}, type = {Computer software}, year = {2023}, note = {R package version 4.0.0}, }"},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Get Eurostat Data — get_eurostat","text":"Przemyslaw Biecek, Leo Lahti, Janne Huovari, Markus Kainu Pyry Kantanen","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get Eurostat Data — get_eurostat","text":"","code":"if (FALSE) { k <- get_eurostat(\"nama_10_lp_ulc\") k <- get_eurostat(\"nama_10_lp_ulc\", time_format = \"num\") k <- get_eurostat(\"nama_10_lp_ulc\", update_cache = TRUE) k <- get_eurostat(\"nama_10_lp_ulc\", cache_dir = file.path(tempdir(), \"r_cache\") ) options(eurostat_update = TRUE) k <- get_eurostat(\"nama_10_lp_ulc\") options(eurostat_update = FALSE) set_eurostat_cache_dir(file.path(tempdir(), \"r_cache2\")) k <- get_eurostat(\"nama_10_lp_ulc\") k <- get_eurostat(\"nama_10_lp_ulc\", cache = FALSE) k <- get_eurostat(\"avia_gonc\", select_time = \"Y\", cache = FALSE) dd <- get_eurostat(\"nama_10_gdp\", filters = list( geo = \"FI\", na_item = \"B1GQ\", unit = \"CLV_I10\" ) ) # A dataset with multiple time series in one dd2 <- get_eurostat(\"AVIA_GOR_ME\", select_time = c(\"A\", \"M\", \"Q\"), time_format = \"date_last\" ) # An example of downloading whole dataset from JSON API dd3 <- get_eurostat(\"AVIA_GOR_ME\", filters = list() ) # Filtering a dataset from a local file dd3_filter <- get_eurostat(\"AVIA_GOR_ME\", filters = list( tra_meas = \"FRM_BRD\" ) ) }"},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_dic.html","id":null,"dir":"Reference","previous_headings":"","what":"Download Eurostat Dictionary — get_eurostat_dic","title":"Download Eurostat Dictionary — get_eurostat_dic","text":"Download Eurostat dictionary.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_dic.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Download Eurostat Dictionary — get_eurostat_dic","text":"","code":"get_eurostat_dic(dictname, lang = \"en\")"},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_dic.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Download Eurostat Dictionary — get_eurostat_dic","text":"dictname character, dictionary variable downloaded. lang character, language code. Options: \"en\" (default), \"fr\", \"de\".","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_dic.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Download Eurostat Dictionary — get_eurostat_dic","text":"tibble two columns: code names full names.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_dic.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Download Eurostat Dictionary — get_eurostat_dic","text":"given coded variable Eurostat https://ec.europa.eu/eurostat/. dictionaries link codes human-readable labels. translate codes labels, use label_eurostat().","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_dic.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Download Eurostat Dictionary — get_eurostat_dic","text":"See citation(\"eurostat\"):","code":"# Kindly cite the eurostat R package as follows: # # Lahti L., Huovari J., Kainu M., and Biecek P. (2017). Retrieval and # analysis of Eurostat open data with the eurostat package. The R # Journal 9(1), pp. 385-392. doi: 10.32614/RJ-2017-019 # # A BibTeX entry for LaTeX users is # # @Article{10.32614/RJ-2017-019, # title = {Retrieval and Analysis of Eurostat Open Data with the eurostat Package}, # author = {Leo Lahti and Janne Huovari and Markus Kainu and Przemyslaw Biecek}, # journal = {The R Journal}, # volume = {9}, # number = {1}, # pages = {385--392}, # year = {2017}, # doi = {10.32614/RJ-2017-019}, # url = {https://doi.org/10.32614/RJ-2017-019}, # } # # Lahti, L., Huovari J., Kainu M., Biecek P., Hernangomez D., Antal D., # and Kantanen P. (2023). eurostat: Tools for Eurostat Open Data # [Computer software]. R package version 4.0.0. # https://github.com/rOpenGov/eurostat # # A BibTeX entry for LaTeX users is # # @Misc{eurostat, # title = {eurostat: Tools for Eurostat Open Data}, # author = {Leo Lahti and Janne Huovari and Markus Kainu and Przemyslaw Biecek and Diego Hernangomez and Daniel Antal and Pyry Kantanen}, # url = {https://github.com/rOpenGov/eurostat}, # type = {Computer software}, # year = {2023}, # note = {R package version 4.0.0}, # }"},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_dic.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Download Eurostat Dictionary — get_eurostat_dic","text":"Przemyslaw Biecek Leo Lahti leo.lahti@iki.fi. Thanks Wietse Dol contributions. Updated Pyry Kantanen support XML codelists.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_dic.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Download Eurostat Dictionary — get_eurostat_dic","text":"","code":"# \\donttest{ get_eurostat_dic(\"crop_pro\") #> # A tibble: 224 × 2 #> code_name full_name #> #> 1 C1040 Cereals for the production of grain (including rice and seed) #> 2 C1050 Cereals (excluding rice) #> 3 C1100 Wheat (including spelt) #> 4 C1120 Common wheat and spelt #> 5 C1123 Common winter wheat #> 6 C1124 Common spring wheat #> 7 C1130 Durum wheat #> 8 C1133 Winter durum wheat #> 9 C1134 Spring durum wheat #> 10 C1140 Rye and maslin #> # ℹ 214 more rows # Try another language get_eurostat_dic(\"crop_pro\", lang = \"fr\") #> # A tibble: 224 × 2 #> code_name full_name #> #> 1 C1040 Céréales pour la production de grains (riz et semence compris) #> 2 C1050 Céréales (à l'exception du riz) #> 3 C1100 Blé (épeautre compris) #> 4 C1120 Blé tendre et épeautre #> 5 C1123 Blé tendre d'hiver #> 6 C1124 Blé tendre de printemps #> 7 C1130 Blé dur #> 8 C1133 Blé dur d'hiver #> 9 C1134 Blé dur de printemps #> 10 C1140 Seigle et méteil #> # ℹ 214 more rows # }"},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_folder.html","id":null,"dir":"Reference","previous_headings":"","what":"Get all datasets in a folder — get_eurostat_folder","title":"Get all datasets in a folder — get_eurostat_folder","text":"Loops files Eurostat database folder, downloads data assigns datasets environment.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_folder.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get all datasets in a folder — get_eurostat_folder","text":"","code":"get_eurostat_folder(code, env = .EurostatEnv)"},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_folder.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get all datasets in a folder — get_eurostat_folder","text":"code Folder code Eurostat Table Contents. env Name environment downloaded datasets assigned. Default .EurostatEnv. NULL, datasets returned list object.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_folder.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get all datasets in a folder — get_eurostat_folder","text":"datasets assigned .EurostatEnv default, using dataset codes object names. datasets downloaded SDMX API TSV files, meaning returned without filtering. filters can provided using function. Please attempt download many datasets whole database . number datasets can downloaded hardcoded 20. function also asks user confirmation number datasets folder 10. design discourage straining Eurostat API.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_folder.html","id":"data-source-eurostat-table-of-contents","dir":"Reference","previous_headings":"","what":"Data source: Eurostat Table of Contents","title":"Get all datasets in a folder — get_eurostat_folder","text":"Eurostat Table Contents (TOC) downloaded https://ec.europa.eu/eurostat/api/dissemination/catalogue/toc/txt?lang=en (default) French German language variants: https://ec.europa.eu/eurostat/api/dissemination/catalogue/toc/txt?lang=fr https://ec.europa.eu/eurostat/api/dissemination/catalogue/toc/txt?lang=de See Eurostat documentation TOC items: https://wikis.ec.europa.eu/display/EUROSTATHELP/API+-+Detailed+guidelines+-+Catalogue+API+-+TOC","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_folder.html","id":"data-source-eurostat-sdmx-dissemination-api","dir":"Reference","previous_headings":"","what":"Data source: Eurostat SDMX 2.1 Dissemination API","title":"Get all datasets in a folder — get_eurostat_folder","text":"Data downloaded Eurostat SDMX 2.1 API endpoint compressed TSV files transformed tabular format. See Eurostat documentation information: https://wikis.ec.europa.eu/display/EUROSTATHELP/API+SDMX+2.1+-+data+query new dissemination API replaces old bulk download facility used Eurostat October 2023 eurostat R package versions 4.0.0. See Eurostat documentation transition Bulk Download API information differences old bulk download facility data provided new API connection: https://wikis.ec.europa.eu/display/EUROSTATHELP/Transition+-++Eurostat+Bulk+Download++API See especially document Migrating_to_API_TSV.pdf describes changes TSV file format new applications. information SDMX 2.1, see SDMX standards: Section 7: Guidelines use web services, Version 2.1: https://sdmx.org/wp-content/uploads/SDMX_2-1_SECTION_7_WebServicesGuidelines.pdf","code":""},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_folder.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Get all datasets in a folder — get_eurostat_folder","text":"Pyry Kantanen","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_geospatial.html","id":null,"dir":"Reference","previous_headings":"","what":"Download Geospatial Data from GISCO — get_eurostat_geospatial","title":"Download Geospatial Data from GISCO — get_eurostat_geospatial","text":"Downloads either simple features (sf) data_frame NUTS regions. function wrapper giscoR::gisco_get_nuts(). function requires installed packages sf giscoR.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_geospatial.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Download Geospatial Data from GISCO — get_eurostat_geospatial","text":"","code":"get_eurostat_geospatial( output_class = \"sf\", resolution = \"60\", nuts_level = \"all\", year = \"2016\", cache = TRUE, update_cache = FALSE, cache_dir = NULL, crs = \"4326\", make_valid = \"DEPRECATED\", ... )"},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_geospatial.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Download Geospatial Data from GISCO — get_eurostat_geospatial","text":"Data source: Eurostat © EuroGeographics administrative boundaries Data downloaded using giscoR","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_geospatial.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Download Geospatial Data from GISCO — get_eurostat_geospatial","text":"output_class Class object returned, either sf simple features df (data_frame). spdf output soft-deprecated, function switch sf. resolution Resolution geospatial data. One \"60\" (1:60million), \"20\" (1:20million) \"10\" (1:10million) \"03\" (1:3million) \"01\" (1:1million). nuts_level Level NUTS classification geospatial data. One \"0\", \"1\", \"2\", \"3\" \"\" (mimics original behaviour) year NUTS release year. One \"2003\", \"2006\", \"2010\", \"2013\", \"2016\" \"2021\" cache logical whether caching. Default TRUE. update_cache logical whether update cache. Can set also options(eurostat_update = TRUE) cache_dir path cache directory. See set_eurostat_cache_dir(). NULL cache dir set globally file stored tempdir(). crs projection map: 4-digit EPSG code. One : \"4326\" - WGS84 \"3035\" - ETRS89 / ETRS-LAEA \"3857\" - Pseudo-Mercator make_valid Deprecated ... Arguments passed giscoR::gisco_get_nuts verbose Logical, displays information. Useful debugging, default FALSE. spatialtype Type geometry returned: \"BN\": Boundaries - LINESTRING object. \"LB\": Labels - POINT object. \"RG\": Regions - MULTIPOLYGON/POLYGON object. country Optional. character vector country codes. either vector country names, vector ISO3 country codes vector Eurostat country codes. Mixed types (c(\"Turkey\",\"US\",\"FRA\")) work. See also countrycode::countrycode(). nuts_id Optional. character vector NUTS IDs.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_geospatial.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Download Geospatial Data from GISCO — get_eurostat_geospatial","text":"sf data_frame","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_geospatial.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Download Geospatial Data from GISCO — get_eurostat_geospatial","text":"objects downloaded GISCO contain following variable columns: id: JSON id code, NUTS_ID. See NUTS_ID clarification. LEVL_CODE: NUTS level code: 0 (national level), 1 (major socio-economic regions), 2 (basic regions application regional policies) 3 (small regions). NUTS_ID: NUTS ID code, consisting country code numbers (1 NUTS 1, 2 NUTS 2 3 NUTS 3) CNTR_CODE: Country code: two-letter ISO code (ISO 3166 alpha-2), except case Greece (EL). NAME_LATN: NUTS name local language, transliterated Latin script NUTS_NAME: NUTS name local language, local script. MOUNT_TYPE: Mountain typology NUTS 3 regions. 1: \"50 % surface covered topographic mountain areas\" 2: \"50 % regional population lives topographic mountain areas\" 3: \"50 % surface covered topographic mountain areas 50 % regional population lives mountain areas\" 4: non-mountain region / region 0: classification provided (e.g. case NUTS 1 NUTS 2 non-EU countries) URBN_TYPE: Urban-rural typology NUTS 3 regions. 1: predominantly urban region 2: intermediate region 3: predominantly rural region 0: classification provided (e.g. case NUTS 1 NUTS 2 regions) COAST_TYPE: Coastal typology NUTS 3 regions. 1: coastal (coast) 2: coastal (>= 50% population living within 50km coastline) 3: non-coastal region 0: classification provided (e.g. case NUTS 1 NUTS 2 regions) FID: NUTS_ID. geo: NUTS_ID, added easier joins dplyr. Consider status column \"questioning\" use columns joins possible. geometry: geospatial information.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_geospatial.html","id":"eurostat-copyright-notice-and-free-re-use-of-data","dir":"Reference","previous_headings":"","what":"Eurostat: Copyright notice and free re-use of data","title":"Download Geospatial Data from GISCO — get_eurostat_geospatial","text":"following copyright notice provided end user convenience. Please check --date copyright information eurostat website: https://ec.europa.eu/eurostat/-us/policies/copyright \"(c) European Union, 1995 - today Eurostat policy encouraging free re-use data, non-commercial commercial purposes. statistical data, metadata, content web pages dissemination tools, official publications documents published website, exceptions listed , can reused without payment written licence provided : source indicated Eurostat; re-use involves modifications data text, must stated clearly end user information.\" exceptions abovementioned principles see Eurostat website","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_geospatial.html","id":"data-source-gisco-general-copyright","dir":"Reference","previous_headings":"","what":"Data source: GISCO - General Copyright","title":"Download Geospatial Data from GISCO — get_eurostat_geospatial","text":"\"Eurostat's general copyright notice licence policy applicable can consulted : https://ec.europa.eu/eurostat/-us/policies/copyright Please also aware European Commission's general conditions: https://commission.europa.eu/legal-notice_en Moreover, specific provisions applicable following datasets available downloading. download usage data subject acceptance: Administrative Units / Statistical Units Population distribution / Demography Transport Networks Land Cover Elevation (DEM)\" abovementioned datasets, Administrative Units / Statistical Units applicable user wants draw maps borders provided GISCO / EuroGeographics.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_geospatial.html","id":"data-source-gisco-administrative-units-statistical-units","dir":"Reference","previous_headings":"","what":"Data source: GISCO - Administrative Units / Statistical Units","title":"Download Geospatial Data from GISCO — get_eurostat_geospatial","text":"following copyright notice provided end user convenience. Please check --date copyright information GISCO website: GISCO: Geographical information maps - Administrative units/statistical units \"addition general copyright licence policy applicable whole Eurostat website, following specific provisions apply datasets downloading. download usage data subject acceptance following clauses: Commission agrees grant non-exclusive transferable right use process Eurostat/GISCO geographical data downloaded page (\"data\"). permission use data granted condition : data used commercial purposes; source acknowledged. copyright notice, specified , visible printed electronic publication using data downloaded page.\"","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_geospatial.html","id":"copyright-notice","dir":"Reference","previous_headings":"","what":"Copyright notice","title":"Download Geospatial Data from GISCO — get_eurostat_geospatial","text":"data downloaded page used printed electronic publication, addition provisions applicable whole Eurostat website, data source acknowledged legend map introductory page publication following copyright notice: EN: © EuroGeographics administrative boundaries FR: © EuroGeographics pour les limites administratives DE: © EuroGeographics bezüglich der Verwaltungsgrenzen publications languages English, French German, translation copyright notice language publication shall used. intend use data commercially, please contact EuroGeographics information regarding licence agreements.\"","code":""},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_geospatial.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Download Geospatial Data from GISCO — get_eurostat_geospatial","text":"Markus Kainu markuskainu@gmail.com, Diego Hernangomez https://github.com/dieghernan/","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_geospatial.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Download Geospatial Data from GISCO — get_eurostat_geospatial","text":"","code":"# \\donttest{ # Uses cached dataset sf <- get_eurostat_geospatial( output_class = \"sf\", resolution = \"60\", nuts_level = \"all\" ) #> Extracting data from eurostat::eurostat_geodata_60_2016 # Downloads dataset from server sf2 <- get_eurostat_geospatial( output_class = \"sf\", resolution = \"20\", nuts_level = \"all\" ) #> Extracting data using giscoR package, please report issues on https://github.com/rOpenGov/giscoR/issues #> Cache management as per giscoR. see 'giscoR::gisco_get_nuts()' df <- get_eurostat_geospatial( output_class = \"df\", nuts_level = \"0\" ) #> Extracting data from eurostat::eurostat_geodata_60_2016 # }"},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_interactive.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Eurostat data interactive — get_eurostat_interactive","title":"Get Eurostat data interactive — get_eurostat_interactive","text":"simple interactive helper function go steps downloading /finding suitable eurostat datasets.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_interactive.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Eurostat data interactive — get_eurostat_interactive","text":"","code":"get_eurostat_interactive(code = NULL)"},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_interactive.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Eurostat data interactive — get_eurostat_interactive","text":"code unique identifier / code dataset interest. code known search_eurostat() function can used search Eurostat table contents.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_interactive.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get Eurostat data interactive — get_eurostat_interactive","text":"function intended enable easy exploration different eurostat package functionalities functions. order drown end user endless menus function allow setting possible get_eurostat() function arguments. possible set time_format, type, lang, stringsAsFactors, keepFlags, use.data.table interactive menus. datasets setting parameters may result \"Error label_eurostat\" error, example: \"labels XXXXXX includes duplicated labels Eurostat dictionary\". cases, complex queries, please use get_eurostat() function directly.","code":""},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_json.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Data from Eurostat API in JSON — get_eurostat_json","title":"Get Data from Eurostat API in JSON — get_eurostat_json","text":"Retrieve data Eurostat API JSON format.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_json.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Data from Eurostat API in JSON — get_eurostat_json","text":"","code":"get_eurostat_json( id, filters = NULL, type = \"code\", lang = \"en\", stringsAsFactors = FALSE, proxy = FALSE, ... )"},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_json.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Data from Eurostat API in JSON — get_eurostat_json","text":"id unique identifier / code dataset interest. code known search_eurostat() function can used search Eurostat table contents. filters named list filters. Names list objects Eurostat variable codes values vectors observation codes. NULL (default) whole dataset returned. See details information filters limitations per query. type type variables, \"code\" (default), \"label\" \"\". parameter \"\" return data_frame named vectors, labels values codes names. lang 2-letter language code, default \"en\" (English), options \"fr\" (French) \"de\" (German). Used labeling datasets. stringsAsFactors TRUE (default) variables converted factors original Eurostat order. FALSE returned strings. proxy Use proxy, TRUE FALSE (default). ... Arguments passed httr2::req_proxy req request. url,port Location proxy. username,password Login details proxy, needed. auth Type HTTP authentication use. one following: basic, digest, digest_ie, gssnegotiate, ntlm, .","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_json.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get Data from Eurostat API in JSON — get_eurostat_json","text":"dataset object data.frame class.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_json.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get Data from Eurostat API in JSON — get_eurostat_json","text":"Data retrieve Eurostat Web Services can specified filters. Normally, better use JSON query get_eurostat(), use get_eurostat_json() directly. Queries limited 50 sub-indicators time. time can filtered fixed \"time\" filter \"sinceTimePeriod\" \"lastTimePeriod\" filters. sinceTimePeriod = 2000 returns observations 2000 last available. lastTimePeriod = 10 returns 10 last observations. See \"Filtering datasets\" section detailed information filters. use proxy connect, proxy arguments can passed httr2::req_perform() via httr2::req_proxy() - see latter function documentation parameter names can passed .... non-functional example: get_eurostat_json(id, filters, proxy = TRUE, url = \"127.0.0.1\", port = 80). retrieving data Eurostat JSON API user may encounter errors. end user convenience, provided ready-made internal dataset sdmx_http_errors contains descriptive labels descriptions possible interpretation cause error. messages returned API returns status indicating HTTP error (400 greater). Eurostat implementation seems based SDMX 2.1, reason used SDMX Standards guidelines supplementary source included dataset. means practice dataset contains error codes mappings mentioned Eurostat website. hope never encounter .","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_json.html","id":"data-source-eurostat-api-statistics-json-api-","dir":"Reference","previous_headings":"","what":"Data source: Eurostat API Statistics (JSON API)","title":"Get Data from Eurostat API in JSON — get_eurostat_json","text":"Data downloaded Eurostat API Statistics. See Eurostat documentation information data queries API Statistics https://wikis.ec.europa.eu/display/EUROSTATHELP/API+Statistics+-+data+query replaces old JSON Web Services used Eurostat February 2023 eurostat R package versions 3.7.13. See Eurostat documentation migration JSON web service API Statistics information differences old new service: https://wikis.ec.europa.eu/display/EUROSTATHELP/API+Statistics+-+migrating++JSON+web+service++API+Statistics easily viewing filtering options available - addition default ones, time language - Eurostat Web services Query builder tool may useful: https://ec.europa.eu/eurostat/web/query-builder","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_json.html","id":"filtering-datasets","dir":"Reference","previous_headings":"","what":"Filtering datasets","title":"Get Data from Eurostat API in JSON — get_eurostat_json","text":"using Eurostat API Statistics (JSON API), datasets can filtered downloaded saved local memory. general format filter parameters =. Filter parameters optional used dimension codes must present data product queried. Dimension codes can vary different data products may useful examine new datasets Eurostat data browser beforehand. However, Eurostat datasets concern European countries contain information gathered point time, geo time dimension codes can usually used. case-insensitive can written lowercase uppercase query. Parameters passed onto eurostat package functions get_eurostat() get_eurostat_json() list item. individual item contains multiple items, often can case geo parameters optional items, must form vector: c(\"FI\", \"SE\"). examples use parameters, see function examples .","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_json.html","id":"time-parameters","dir":"Reference","previous_headings":"","what":"Time parameters","title":"Get Data from Eurostat API in JSON — get_eurostat_json","text":"time time_period address TIME_PERIOD dimension dataset can used interchangeably. Eurostat documentation stated \"Using one Time parameter query accepted\", practice shown actually Eurostat API allows multiple time parameters query. makes possible use R colon operator writing queries, time = c(2015:2018) translates &time=2015&time=2016&time=2017&time=2018. exception queried dataset contains e.g. quarterly data TIME_PERIOD saved 2015-Q1, 2015-Q2 etc. possible use time=2015-Q1&time=2015-Q2 style query URL, makes unfeasible use colon operator requires lot manual typing. , useful know time parameters well: untilTimePeriod: return dataset items oldest record set time, example \"data 2000\": untilTimePeriod = 2000 sinceTimePeriod: return dataset items starting set time, example \"datastarting 2008\": sinceTimePeriod = 2008 lastTimePeriod: starting recent time period, many preceding time periods returned? example 10 recent observations: lastTimePeriod = 10 Using untilTimePeriod sinceTimePeriod parameters query allowed, making usage R colon operator unnecessary. case quarterly data, using untilTimePeriod sinceTimePeriod parameters also works, opposed colon operator, generally safer use well.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_json.html","id":"other-dimensions","dir":"Reference","previous_headings":"","what":"Other dimensions","title":"Get Data from Eurostat API in JSON — get_eurostat_json","text":"get_eurostat_json() examples nama_10_gdp dataset filtered two additional filter parameters: na_item = \"B1GQ\" unit = \"CLV_I10\" Filters like likely unique nama_10_gdp dataset (datasets within domain) used others dataset without user discretion. using label_eurostat() know \"B1GQ\" stands \"Gross domestic product market prices\" \"CLV_I10\" means \"Chain linked volumes, index 2010=100\". Different dimension codes can translated natural language using get_eurostat_dic() function, returns labels individual dimension items na_item unit, opposed label_eurostat() whole datasets. example, parameter na_item stands \"National accounts indicator (ESA 2010)\" unit stands \"Unit measure\".","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_json.html","id":"language","dir":"Reference","previous_headings":"","what":"Language","title":"Get Data from Eurostat API in JSON — get_eurostat_json","text":"datasets metadata available English, French German. parameter given, labels returned English. Example: lang = \"fr\"","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_json.html","id":"more-information","dir":"Reference","previous_headings":"","what":"More information","title":"Get Data from Eurostat API in JSON — get_eurostat_json","text":"information data filtering see Eurostat documentation API Statistics: https://wikis.ec.europa.eu/display/EUROSTATHELP/API+Statistics+-+data+query#APIStatisticsdataquery-TheparametersdefinedintheRESTrequest","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_json.html","id":"eurostat-copyright-notice-and-free-re-use-of-data","dir":"Reference","previous_headings":"","what":"Eurostat: Copyright notice and free re-use of data","title":"Get Data from Eurostat API in JSON — get_eurostat_json","text":"following copyright notice provided end user convenience. Please check --date copyright information eurostat website: https://ec.europa.eu/eurostat/-us/policies/copyright \"(c) European Union, 1995 - today Eurostat policy encouraging free re-use data, non-commercial commercial purposes. statistical data, metadata, content web pages dissemination tools, official publications documents published website, exceptions listed , can reused without payment written licence provided : source indicated Eurostat; re-use involves modifications data text, must stated clearly end user information.\" exceptions abovementioned principles see Eurostat website","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_json.html","id":"citing-eurostat-data","dir":"Reference","previous_headings":"","what":"Citing Eurostat data","title":"Get Data from Eurostat API in JSON — get_eurostat_json","text":"citing datasets, use get_bibentry() build bibliography suitable reference manager choice. using Eurostat data contexts academic publications -text citations footnotes/endnotes, following guidelines may helpful: origin data always mentioned \"Source: Eurostat\". online dataset codes(s) also provided order ensure transparency facilitate access Eurostat data related methodological information. example: \"Source: Eurostat (online data code: namq_10_gdp)\" Online publications (e.g. web pages, PDF) include clickable link dataset using bookmark functionality available Eurostat data browser. avoided associate different entities (e.g. Eurostat, National Statistical Offices, data providers) dataset indicator without specifying role treatment data. See also section \"Eurostat: Copyright notice free re-use data\" get_eurostat() documentation.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_json.html","id":"disclaimer-availability-of-filtering-functionalities","dir":"Reference","previous_headings":"","what":"Disclaimer: Availability of filtering functionalities","title":"Get Data from Eurostat API in JSON — get_eurostat_json","text":"Currently possible download filtered data API Statistics (JSON API) using eurostat package, although technically filtering datasets downloaded SDMX Dissemination API also supported Eurostat. may support feature future. meantime, interested filtering Dissemination API data queries manually, please consult following Eurostat documentation: https://wikis.ec.europa.eu/display/EUROSTATHELP/API+SDMX+2.1+-+data+filtering","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_json.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Get Data from Eurostat API in JSON — get_eurostat_json","text":"See citation(\"eurostat\"): citing data downloaded Eurostat, see section \"Citing Eurostat data\" get_eurostat() documentation.","code":"Kindly cite the eurostat R package as follows: Lahti L., Huovari J., Kainu M., and Biecek P. (2017). Retrieval and analysis of Eurostat open data with the eurostat package. The R Journal 9(1), pp. 385-392. doi: 10.32614/RJ-2017-019 A BibTeX entry for LaTeX users is @Article{10.32614/RJ-2017-019, title = {Retrieval and Analysis of Eurostat Open Data with the eurostat Package}, author = {Leo Lahti and Janne Huovari and Markus Kainu and Przemyslaw Biecek}, journal = {The R Journal}, volume = {9}, number = {1}, pages = {385--392}, year = {2017}, doi = {10.32614/RJ-2017-019}, url = {https://doi.org/10.32614/RJ-2017-019}, } Lahti, L., Huovari J., Kainu M., Biecek P., Hernangomez D., Antal D., and Kantanen P. (2023). eurostat: Tools for Eurostat Open Data [Computer software]. R package version 4.0.0. https://github.com/rOpenGov/eurostat A BibTeX entry for LaTeX users is @Misc{eurostat, title = {eurostat: Tools for Eurostat Open Data}, author = {Leo Lahti and Janne Huovari and Markus Kainu and Przemyslaw Biecek and Diego Hernangomez and Daniel Antal and Pyry Kantanen}, url = {https://github.com/rOpenGov/eurostat}, type = {Computer software}, year = {2023}, note = {R package version 4.0.0}, }"},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_json.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Get Data from Eurostat API in JSON — get_eurostat_json","text":"Przemyslaw Biecek, Leo Lahti, Janne Huovari Markus Kainu Pyry Kantanen","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_json.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get Data from Eurostat API in JSON — get_eurostat_json","text":"","code":"if (FALSE) { # Generally speaking these queries would be done through get_eurostat tmp <- get_eurostat_json(\"nama_10_gdp\") yy <- get_eurostat_json(\"nama_10_gdp\", filters = list( geo = c(\"FI\", \"SE\", \"EU28\"), time = c(2015:2023), lang = \"FR\", na_item = \"B1GQ\", unit = \"CLV_I10\" )) # TIME_PERIOD filter works also with the new JSON API yy2 <- get_eurostat_json(\"nama_10_gdp\", filters = list( geo = c(\"FI\", \"SE\", \"EU28\"), TIME_PERIOD = c(2015:2023), lang = \"FR\", na_item = \"B1GQ\", unit = \"CLV_I10\" )) # An example from get_eurostat dd <- get_eurostat(\"nama_10_gdp\", filters = list( geo = \"FI\", na_item = \"B1GQ\", unit = \"CLV_I10\" )) }"},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_raw.html","id":null,"dir":"Reference","previous_headings":"","what":"Download Data from Eurostat Dissemination API — get_eurostat_raw","title":"Download Data from Eurostat Dissemination API — get_eurostat_raw","text":"Download data eurostat database new dissemination API.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_raw.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Download Data from Eurostat Dissemination API — get_eurostat_raw","text":"","code":"get_eurostat_raw(id, use.data.table = FALSE)"},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_raw.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Download Data from Eurostat Dissemination API — get_eurostat_raw","text":"id unique identifier / code dataset interest. code known search_eurostat() function can used search Eurostat table contents. use.data.table Use faster data.table functions? Default FALSE. Windows requires RTools installed.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_raw.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Download Data from Eurostat Dissemination API — get_eurostat_raw","text":"dataset tibble format. First column contains comma separated codes cases. columns usually corresponds years column names years preceding X. Data character format contains values together eurostat flags data.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_raw.html","id":"data-source-eurostat-sdmx-dissemination-api","dir":"Reference","previous_headings":"","what":"Data source: Eurostat SDMX 2.1 Dissemination API","title":"Download Data from Eurostat Dissemination API — get_eurostat_raw","text":"Data downloaded Eurostat SDMX 2.1 API endpoint compressed TSV files transformed tabular format. See Eurostat documentation information: https://wikis.ec.europa.eu/display/EUROSTATHELP/API+SDMX+2.1+-+data+query new dissemination API replaces old bulk download facility used Eurostat October 2023 eurostat R package versions 4.0.0. See Eurostat documentation transition Bulk Download API information differences old bulk download facility data provided new API connection: https://wikis.ec.europa.eu/display/EUROSTATHELP/Transition+-++Eurostat+Bulk+Download++API See especially document Migrating_to_API_TSV.pdf describes changes TSV file format new applications. information SDMX 2.1, see SDMX standards: Section 7: Guidelines use web services, Version 2.1: https://sdmx.org/wp-content/uploads/SDMX_2-1_SECTION_7_WebServicesGuidelines.pdf","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_raw.html","id":"eurostat-copyright-notice-and-free-re-use-of-data","dir":"Reference","previous_headings":"","what":"Eurostat: Copyright notice and free re-use of data","title":"Download Data from Eurostat Dissemination API — get_eurostat_raw","text":"following copyright notice provided end user convenience. Please check --date copyright information eurostat website: https://ec.europa.eu/eurostat/-us/policies/copyright \"(c) European Union, 1995 - today Eurostat policy encouraging free re-use data, non-commercial commercial purposes. statistical data, metadata, content web pages dissemination tools, official publications documents published website, exceptions listed , can reused without payment written licence provided : source indicated Eurostat; re-use involves modifications data text, must stated clearly end user information.\" exceptions abovementioned principles see Eurostat website","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_raw.html","id":"citing-eurostat-data","dir":"Reference","previous_headings":"","what":"Citing Eurostat data","title":"Download Data from Eurostat Dissemination API — get_eurostat_raw","text":"citing datasets, use get_bibentry() build bibliography suitable reference manager choice. using Eurostat data contexts academic publications -text citations footnotes/endnotes, following guidelines may helpful: origin data always mentioned \"Source: Eurostat\". online dataset codes(s) also provided order ensure transparency facilitate access Eurostat data related methodological information. example: \"Source: Eurostat (online data code: namq_10_gdp)\" Online publications (e.g. web pages, PDF) include clickable link dataset using bookmark functionality available Eurostat data browser. avoided associate different entities (e.g. Eurostat, National Statistical Offices, data providers) dataset indicator without specifying role treatment data. See also section \"Eurostat: Copyright notice free re-use data\" get_eurostat() documentation.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_raw.html","id":"disclaimer-availability-of-filtering-functionalities","dir":"Reference","previous_headings":"","what":"Disclaimer: Availability of filtering functionalities","title":"Download Data from Eurostat Dissemination API — get_eurostat_raw","text":"Currently possible download filtered data API Statistics (JSON API) using eurostat package, although technically filtering datasets downloaded SDMX Dissemination API also supported Eurostat. may support feature future. meantime, interested filtering Dissemination API data queries manually, please consult following Eurostat documentation: https://wikis.ec.europa.eu/display/EUROSTATHELP/API+SDMX+2.1+-+data+filtering","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_raw.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Download Data from Eurostat Dissemination API — get_eurostat_raw","text":"See citation(\"eurostat\"):","code":"# Kindly cite the eurostat R package as follows: # # Lahti L., Huovari J., Kainu M., and Biecek P. (2017). Retrieval and # analysis of Eurostat open data with the eurostat package. The R # Journal 9(1), pp. 385-392. doi: 10.32614/RJ-2017-019 # # A BibTeX entry for LaTeX users is # # @Article{10.32614/RJ-2017-019, # title = {Retrieval and Analysis of Eurostat Open Data with the eurostat Package}, # author = {Leo Lahti and Janne Huovari and Markus Kainu and Przemyslaw Biecek}, # journal = {The R Journal}, # volume = {9}, # number = {1}, # pages = {385--392}, # year = {2017}, # doi = {10.32614/RJ-2017-019}, # url = {https://doi.org/10.32614/RJ-2017-019}, # } # # Lahti, L., Huovari J., Kainu M., Biecek P., Hernangomez D., Antal D., # and Kantanen P. (2023). eurostat: Tools for Eurostat Open Data # [Computer software]. R package version 4.0.0. # https://github.com/rOpenGov/eurostat # # A BibTeX entry for LaTeX users is # # @Misc{eurostat, # title = {eurostat: Tools for Eurostat Open Data}, # author = {Leo Lahti and Janne Huovari and Markus Kainu and Przemyslaw Biecek and Diego Hernangomez and Daniel Antal and Pyry Kantanen}, # url = {https://github.com/rOpenGov/eurostat}, # type = {Computer software}, # year = {2023}, # note = {R package version 4.0.0}, # }"},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_raw.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Download Data from Eurostat Dissemination API — get_eurostat_raw","text":"Przemyslaw Biecek, Leo Lahti, Janne Huovari Pyry Kantanen","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_raw.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Download Data from Eurostat Dissemination API — get_eurostat_raw","text":"","code":"# \\donttest{ eurostat:::get_eurostat_raw(\"educ_iste\") #> # A tibble: 213 × 16 #> freq,indic_ed,geo\\\\TIME_PE…¹ `1998` `1999` `2000` `2001` `2002` `2003` `2004` #> #> 1 A,ST1_1,AL NA NA 18.2 18.7 NA 18.7 NA #> 2 A,ST1_1,AT 10.5 d 11.2 NA 11.1 11.3 11.3 11.9 #> 3 A,ST1_1,BE NA NA NA 11.2 d 10.7 d 11.0 d 10.8 d #> 4 A,ST1_1,BE_FRA NA NA NA NA 9.9 10.5 10.5 #> 5 A,ST1_1,BE_VLA 13.1 13.3 13.7 NA 11.3 11.2 11.1 #> 6 A,ST1_1,BG 13.0 14.1 13.2 13.6 13.5 13.7 13.5 #> 7 A,ST1_1,CY NA 15.3 14.9 16.6 15.1 15.0 14.0 #> 8 A,ST1_1,CZ 16.8 17.4 16.6 15.6 15.1 14.8 14.4 #> 9 A,ST1_1,DE 17.2 17.2 16.4 16.3 16.1 16.0 16.1 #> 10 A,ST1_1,DK 10.9 d 11.0 d 11.0 d 10.9 d 11.7 d 11.4 d : u #> # ℹ 203 more rows #> # ℹ abbreviated name: ¹​`freq,indic_ed,geo\\\\TIME_PERIOD` #> # ℹ 8 more variables: `2005` , `2006` , `2007` , `2008` , #> # `2009` , `2010` , `2011` , `2012` # }"},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_toc.html","id":null,"dir":"Reference","previous_headings":"","what":"Download Table of Contents of Eurostat Data Sets — get_eurostat_toc","title":"Download Table of Contents of Eurostat Data Sets — get_eurostat_toc","text":"Download table contents (TOC) eurostat datasets.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_toc.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Download Table of Contents of Eurostat Data Sets — get_eurostat_toc","text":"","code":"get_eurostat_toc(lang = \"en\")"},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_toc.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Download Table of Contents of Eurostat Data Sets — get_eurostat_toc","text":"lang 2-letter language code, default \"en\" (English), options \"fr\" (French) \"de\" (German). Used labeling datasets.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_toc.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Download Table of Contents of Eurostat Data Sets — get_eurostat_toc","text":"tibble nine columns: title Dataset title English (default) code item (dataset, table folder) TOC unique code allows identified API. Used get_eurostat() get_eurostat_raw() functions retrieve datasets. type dataset, folder table last.update..data Date, indicates last time dataset/table updated (format DD.MM.YYYY %d.%m.%Y) last.table.structure.change Date, indicates last time dataset/table structure modified (format DD.MM.YYYY %d.%m.%Y) data.start Date oldest value included dataset (available) (format usually YYYY %Y can also YYYY-MM, YYYY-MM-DD, YYYY-SN, YYYY-QN etc.) data.end Date recent value included dataset (available) (format usually YYYY %Y can also YYYY-MM, YYYY-MM-DD, YYYY-SN, YYYY-QN etc.) values Number actual values included dataset hierarchy Hierarchy data navigation tree, represented original txt file 4-spaces indentation prefix title","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_toc.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Download Table of Contents of Eurostat Data Sets — get_eurostat_toc","text":"downloaded Eurostat Table Contents 'code' column values refer function 'id' used argument certain functions downloading datasets.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_toc.html","id":"data-source-eurostat-table-of-contents","dir":"Reference","previous_headings":"","what":"Data source: Eurostat Table of Contents","title":"Download Table of Contents of Eurostat Data Sets — get_eurostat_toc","text":"Eurostat Table Contents (TOC) downloaded https://ec.europa.eu/eurostat/api/dissemination/catalogue/toc/txt?lang=en (default) French German language variants: https://ec.europa.eu/eurostat/api/dissemination/catalogue/toc/txt?lang=fr https://ec.europa.eu/eurostat/api/dissemination/catalogue/toc/txt?lang=de See Eurostat documentation TOC items: https://wikis.ec.europa.eu/display/EUROSTATHELP/API+-+Detailed+guidelines+-+Catalogue+API+-+TOC","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_toc.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Download Table of Contents of Eurostat Data Sets — get_eurostat_toc","text":"See citation(\"eurostat\"): citing data downloaded Eurostat, see section \"Citing Eurostat data\" get_eurostat() documentation.","code":"Kindly cite the eurostat R package as follows: Lahti L., Huovari J., Kainu M., and Biecek P. (2017). Retrieval and analysis of Eurostat open data with the eurostat package. The R Journal 9(1), pp. 385-392. doi: 10.32614/RJ-2017-019 A BibTeX entry for LaTeX users is @Article{10.32614/RJ-2017-019, title = {Retrieval and Analysis of Eurostat Open Data with the eurostat Package}, author = {Leo Lahti and Janne Huovari and Markus Kainu and Przemyslaw Biecek}, journal = {The R Journal}, volume = {9}, number = {1}, pages = {385--392}, year = {2017}, doi = {10.32614/RJ-2017-019}, url = {https://doi.org/10.32614/RJ-2017-019}, } Lahti, L., Huovari J., Kainu M., Biecek P., Hernangomez D., Antal D., and Kantanen P. (2023). eurostat: Tools for Eurostat Open Data [Computer software]. R package version 4.0.0. https://github.com/rOpenGov/eurostat A BibTeX entry for LaTeX users is @Misc{eurostat, title = {eurostat: Tools for Eurostat Open Data}, author = {Leo Lahti and Janne Huovari and Markus Kainu and Przemyslaw Biecek and Diego Hernangomez and Daniel Antal and Pyry Kantanen}, url = {https://github.com/rOpenGov/eurostat}, type = {Computer software}, year = {2023}, note = {R package version 4.0.0}, }"},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_toc.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Download Table of Contents of Eurostat Data Sets — get_eurostat_toc","text":"Przemyslaw Biecek, Leo Lahti Pyry Kantanen ropengov-forum@googlegroups.com","code":""},{"path":"https://ropengov.github.io/eurostat/reference/get_eurostat_toc.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Download Table of Contents of Eurostat Data Sets — get_eurostat_toc","text":"","code":"# \\donttest{ tmp <- get_eurostat_toc() head(tmp) #> # A tibble: 6 × 9 #> title code type last.update.of.data last.table.structure…¹ data.start #> #> 1 Database by… data fold… \" \" \" \" \" \" #> 2 General and… gene… fold… \" \" \" \" \" \" #> 3 European an… euro… fold… \" \" \" \" \" \" #> 4 Balance of … ei_bp fold… \" \" \" \" \" \" #> 5 Current acc… ei_b… table \"17.11.2023\" \"17.11.2023\" \"1992-Q1\" #> 6 Financial a… ei_b… table \"17.11.2023\" \"17.11.2023\" \"1992-Q1\" #> # ℹ abbreviated name: ¹​last.table.structure.change #> # ℹ 3 more variables: data.end , values , hierarchy # Convert columns containing dates as character into Date class # Last update of data tmp[[4]] <- as.Date(tmp[[4]], format = c(\"%d.%m.%Y\")) # Last table structure change tmp[[5]] <- as.Date(tmp[[5]], format = c(\"%d.%m.%Y\")) # Data start, contains several formats (date, week, month quarter, semester) # Unfortunately semesters are not directly supported so they need to be # changed into quarters tmp$data.start <- gsub(\"S2\", \"Q3\", tmp$data.start) tmp$data.start <- lubridate::as_date( x = tmp$data.start, format = c(\"%Y\", \"%Y-Q%q\", \"%Y-W%W\", \"%Y-S%q\", \"%Y-%m-%d\", \"%Y-%m\") ) #> Warning: 1774 failed to parse. # Data end, same as data start tmp$data.end <- gsub(\"S2\", \"Q3\", tmp$data.end) tmp$data.end <- lubridate::as_date( x = tmp$data.end, format = c(\"%Y\", \"%Y-Q%q\", \"%Y-W%W\", \"%Y-S%q\", \"%Y-%m-%d\", \"%Y-%m\") ) #> Warning: 1774 failed to parse. # }"},{"path":"https://ropengov.github.io/eurostat/reference/harmonize_country_code.html","id":null,"dir":"Reference","previous_headings":"","what":"Harmonize Country Code — harmonize_country_code","title":"Harmonize Country Code — harmonize_country_code","text":"European Commission Eurostat generally uses ISO 3166-1 alpha-2 codes two exceptions: EL (GR) used represent Greece, UK (GB) used represent United Kingdom. function turns country codes ISO 3166-1 alpha-2.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/harmonize_country_code.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Harmonize Country Code — harmonize_country_code","text":"","code":"harmonize_country_code(x)"},{"path":"https://ropengov.github.io/eurostat/reference/harmonize_country_code.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Harmonize Country Code — harmonize_country_code","text":"x character factor vector eurostat countycodes.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/harmonize_country_code.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Harmonize Country Code — harmonize_country_code","text":"vector.","code":""},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/harmonize_country_code.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Harmonize Country Code — harmonize_country_code","text":"Janne Huovari janne.huovari@ptt.fi","code":""},{"path":"https://ropengov.github.io/eurostat/reference/harmonize_country_code.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Harmonize Country Code — harmonize_country_code","text":"","code":"# \\donttest{ lp <- get_eurostat(\"nama_10_lp_ulc\") #> Dataset query already saved in cache_list.json... #> Reading cache file /tmp/RtmpSVUIhm/eurostat/e76c74b5bcbe2ce2621e9832d1c0599d.rds #> Table nama_10_lp_ulc read from cache file: /tmp/RtmpSVUIhm/eurostat/e76c74b5bcbe2ce2621e9832d1c0599d.rds lp$geo <- harmonize_country_code(lp$geo) # }"},{"path":"https://ropengov.github.io/eurostat/reference/harmonize_geo_code.html","id":null,"dir":"Reference","previous_headings":"","what":"Harmonize NUTS region codes that changed with the NUTS2016\ndefinition — harmonize_geo_code","title":"Harmonize NUTS region codes that changed with the NUTS2016\ndefinition — harmonize_geo_code","text":"Eurostat mixes NUTS2013 NUTS2016 geographic label codes 'geo' column, creates time-wise comparativity issues. deprecated function checked data affected problem gives information . function deprecated, general function moved regions::validate_nuts_regions().","code":""},{"path":"https://ropengov.github.io/eurostat/reference/harmonize_geo_code.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Harmonize NUTS region codes that changed with the NUTS2016\ndefinition — harmonize_geo_code","text":"","code":"harmonize_geo_code(dat)"},{"path":"https://ropengov.github.io/eurostat/reference/harmonize_geo_code.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Harmonize NUTS region codes that changed with the NUTS2016\ndefinition — harmonize_geo_code","text":"dat Eurostat data frame downloaded get_eurostat()","code":""},{"path":"https://ropengov.github.io/eurostat/reference/harmonize_geo_code.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Harmonize NUTS region codes that changed with the NUTS2016\ndefinition — harmonize_geo_code","text":"augmented data frame explains potential problems possible solutions.","code":""},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/harmonize_geo_code.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Harmonize NUTS region codes that changed with the NUTS2016\ndefinition — harmonize_geo_code","text":"Daniel Antal","code":""},{"path":"https://ropengov.github.io/eurostat/reference/harmonize_geo_code.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Harmonize NUTS region codes that changed with the NUTS2016\ndefinition — harmonize_geo_code","text":"","code":"dat <- eurostat::tgs00026 regions::validate_nuts_regions(dat) #> # A tibble: 2,723 × 8 #> unit direct na_item geo time values typology valid_2016 #> #> 1 PPS_EU27_2020_HAB BAL B6N AT11 2009 18900 nuts_level_2 TRUE #> 2 PPS_EU27_2020_HAB BAL B6N AT12 2009 19900 nuts_level_2 TRUE #> 3 PPS_EU27_2020_HAB BAL B6N AT13 2009 19800 nuts_level_2 TRUE #> 4 PPS_EU27_2020_HAB BAL B6N AT21 2009 18500 nuts_level_2 TRUE #> 5 PPS_EU27_2020_HAB BAL B6N AT22 2009 18700 nuts_level_2 TRUE #> 6 PPS_EU27_2020_HAB BAL B6N AT31 2009 19300 nuts_level_2 TRUE #> 7 PPS_EU27_2020_HAB BAL B6N AT32 2009 19600 nuts_level_2 TRUE #> 8 PPS_EU27_2020_HAB BAL B6N AT33 2009 18700 nuts_level_2 TRUE #> 9 PPS_EU27_2020_HAB BAL B6N AT34 2009 19700 nuts_level_2 TRUE #> 10 PPS_EU27_2020_HAB BAL B6N BE10 2009 15400 nuts_level_2 TRUE #> # ℹ 2,713 more rows"},{"path":"https://ropengov.github.io/eurostat/reference/label_eurostat.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Eurostat Codes for data downloaded from new dissemination API — label_eurostat","title":"Get Eurostat Codes for data downloaded from new dissemination API — label_eurostat","text":"Get definitions Eurostat codes Eurostat dictionaries.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/label_eurostat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Eurostat Codes for data downloaded from new dissemination API — label_eurostat","text":"","code":"label_eurostat( x, dic = NULL, code = NULL, eu_order = FALSE, lang = \"en\", countrycode = NULL, countrycode_nomatch = NULL, custom_dic = NULL, fix_duplicated = FALSE ) label_eurostat_vars(x = NULL, id, lang = \"en\") label_eurostat_tables(x, lang = \"en\")"},{"path":"https://ropengov.github.io/eurostat/reference/label_eurostat.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Eurostat Codes for data downloaded from new dissemination API — label_eurostat","text":"x character factor vector data_frame. dic string (vector) naming eurostat dictionary dictionaries. NULL (default) dictionary names taken column names data_frame. code data_frames names column also code columns retained. suffix \"_code\" added code column names. eu_order Logical. Eurostat ordering used label levels. Affects factors. lang 2-letter language code, default \"en\" (English), options \"fr\" (French) \"de\" (German). Used labeling datasets. countrycode NULL name coding scheme countrycode::countrycode() label \"geo\" variable countrycode-package. can used convert short long country names many different languages. NULL (default) eurostat dictionary used instead. countrycode_nomatch using countrycode label \"geo\" countrycode fails find match, example country codes like EU28. original code used NULL (default), eurostat dictionary label used \"eurostat\", NA used NA. custom_dic named vector named list named vectors give dictionary (part ) codes. Names vector codes values labels. List can used specify dictionaries list names dictionary codes. fix_duplicated logical. TRUE, code added duplicated label values. FALSE (default) error given labeling produce duplicates. id unique identifier / code dataset interest. code known search_eurostat() function can used search Eurostat table contents.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/label_eurostat.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get Eurostat Codes for data downloaded from new dissemination API — label_eurostat","text":"vector data_frame.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/label_eurostat.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get Eurostat Codes for data downloaded from new dissemination API — label_eurostat","text":"character factor vector codes returns corresponding vector definitions. label_eurostat() labels also data_frames get_eurostat(). vectors dictionary name supplied. data_frames dictionary names taken column names. \"time\" \"values\" columns returned , can supply data_frame get_eurostat() get data_frame definitions instead codes. Eurostat dictionaries includes duplicated labels. default duplicated labels cause error, can fixed automatically fix_duplicated = TRUE.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/label_eurostat.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"Get Eurostat Codes for data downloaded from new dissemination API — label_eurostat","text":"label_eurostat_vars(): Get definitions variable (column) names. label_eurostat_tables(): Get definitions table names","code":""},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/label_eurostat.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Get Eurostat Codes for data downloaded from new dissemination API — label_eurostat","text":"Janne Huovari janne.huovari@ptt.fi","code":""},{"path":"https://ropengov.github.io/eurostat/reference/label_eurostat.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get Eurostat Codes for data downloaded from new dissemination API — label_eurostat","text":"","code":"if (FALSE) { lp <- get_eurostat(\"nama_10_lp_ulc\") lpl <- label_eurostat(lp) str(lpl) lpl_order <- label_eurostat(lp, eu_order = TRUE) lpl_code <- label_eurostat(lp, code = \"unit\") # Note that the dataset id must be provided in label_eurostat_vars label_eurostat_vars(id = \"nama_10_lp_ulc\", x = \"geo\", lang = \"en\") label_eurostat_tables(\"nama_10_lp_ulc\") label_eurostat(c(\"FI\", \"DE\", \"EU28\"), dic = \"geo\") label_eurostat( c(\"FI\", \"DE\", \"EU28\"), dic = \"geo\", custom_dic = c(DE = \"Germany\") ) label_eurostat( c(\"FI\", \"DE\", \"EU28\"), dic = \"geo\", countrycode = \"country.name\", custom_dic = c(EU28 = \"EU\") ) label_eurostat( c(\"FI\", \"DE\", \"EU28\"), dic = \"geo\", countrycode = \"country.name\" ) # In Finnish label_eurostat( c(\"FI\", \"DE\", \"EU28\"), dic = \"geo\", countrycode = \"cldr.short.fi\" ) }"},{"path":"https://ropengov.github.io/eurostat/reference/list_eurostat_cache_items.html","id":null,"dir":"Reference","previous_headings":"","what":"Output cache information as data.frame — list_eurostat_cache_items","title":"Output cache information as data.frame — list_eurostat_cache_items","text":"Parses cache_list.json file returns data.frame","code":""},{"path":"https://ropengov.github.io/eurostat/reference/list_eurostat_cache_items.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Output cache information as data.frame — list_eurostat_cache_items","text":"","code":"list_eurostat_cache_items(cache_dir = NULL)"},{"path":"https://ropengov.github.io/eurostat/reference/list_eurostat_cache_items.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Output cache information as data.frame — list_eurostat_cache_items","text":"cache_dir path cache directory. NULL (default) uses creates 'eurostat' directory temporary directory defined base R tempdir() function. user can set cache directory existing directory using argument. cache directory can also set set_eurostat_cache_dir() function.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/list_eurostat_cache_items.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Output cache information as data.frame — list_eurostat_cache_items","text":"data.frame object 3 columns: dataset code, download date query md5 hash","code":""},{"path":"https://ropengov.github.io/eurostat/reference/recode_to_nuts_2013.html","id":null,"dir":"Reference","previous_headings":"","what":"Recode geo labels and rename regions from NUTS2016 to NUTS2013 — recode_to_nuts_2013","title":"Recode geo labels and rename regions from NUTS2016 to NUTS2013 — recode_to_nuts_2013","text":"Eurostat mixes NUTS2013 NUTS2016 geographic label codes 'geo' column, creates time-wise comparativity issues. function deprecated, general function moved [regions::recode_nuts()].","code":""},{"path":"https://ropengov.github.io/eurostat/reference/recode_to_nuts_2013.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Recode geo labels and rename regions from NUTS2016 to NUTS2013 — recode_to_nuts_2013","text":"","code":"recode_to_nuts_2013(dat)"},{"path":"https://ropengov.github.io/eurostat/reference/recode_to_nuts_2013.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Recode geo labels and rename regions from NUTS2016 to NUTS2013 — recode_to_nuts_2013","text":"dat Eurostat data frame downloaded get_eurostat().","code":""},{"path":"https://ropengov.github.io/eurostat/reference/recode_to_nuts_2013.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Recode geo labels and rename regions from NUTS2016 to NUTS2013 — recode_to_nuts_2013","text":"augmented potentially relabelled data frame contains formerly 'NUTS2013' definition geo labels 'NUTS2016' vocabulary code changed, boundary . also contains information geo labels brought current 'NUTS2013' definition. Furthermore, official name region changed, use new name (otherwise region boundary change.) called , function use helper function harmonize_geo_code()","code":""},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/recode_to_nuts_2013.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Recode geo labels and rename regions from NUTS2016 to NUTS2013 — recode_to_nuts_2013","text":"Daniel Antal","code":""},{"path":"https://ropengov.github.io/eurostat/reference/recode_to_nuts_2013.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Recode geo labels and rename regions from NUTS2016 to NUTS2013 — recode_to_nuts_2013","text":"","code":"test_regional_codes <- data.frame( geo = c(\"FRB\", \"FRE\", \"UKN02\", \"IE022\", \"FR243\", \"FRB03\"), time = c(rep(as.Date(\"2014-01-01\"), 5), as.Date(\"2015-01-01\")), values = c(1:6), control = c( \"Changed from NUTS2 to NUTS1\", \"New region NUTS2016 only\", \"Discontinued region NUTS2013\", \"Boundary shift NUTS2013\", \"Recoded in NUTS2013\", \"Recoded in NUTS2016\" ) ) recode_to_nuts_2013(test_regional_codes) #> Warning: The 'recode_to_nuts_2013' function is deprecated. Use instead regions::recode_nuts(dat, nuts_year = 2013) #> geo time values control typology #> 1 UKN02 2014-01-01 3 Discontinued region NUTS2013 nuts_level_3 #> 2 IE022 2014-01-01 4 Boundary shift NUTS2013 nuts_level_3 #> 3 FR243 2014-01-01 5 Recoded in NUTS2013 nuts_level_3 #> 4 FRB03 2015-01-01 6 Recoded in NUTS2016 nuts_level_3 #> 5 FRB 2014-01-01 1 Changed from NUTS2 to NUTS1 nuts_level_1 #> 6 FRE 2014-01-01 2 New region NUTS2016 only nuts_level_1 #> typology_change code_2013 #> 1 unchanged UKN02 #> 2 unchanged IE022 #> 3 unchanged FR243 #> 4 Recoded from FRB03 [used in NUTS 2016-2021] FR243 #> 5 Used in NUTS 2016-2021 #> 6 Used in NUTS 2016-2021 "},{"path":"https://ropengov.github.io/eurostat/reference/recode_to_nuts_2016.html","id":null,"dir":"Reference","previous_headings":"","what":"Recode geo labels and rename regions from NUTS2013 to NUTS2016 — recode_to_nuts_2016","title":"Recode geo labels and rename regions from NUTS2013 to NUTS2016 — recode_to_nuts_2016","text":"Eurostat mixes NUTS2013 NUTS2016 geographic label codes 'geo' column, creates time-wise comparativity issues. function deprecated, general function moved [regions::recode_nuts()].","code":""},{"path":"https://ropengov.github.io/eurostat/reference/recode_to_nuts_2016.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Recode geo labels and rename regions from NUTS2013 to NUTS2016 — recode_to_nuts_2016","text":"","code":"recode_to_nuts_2016(dat)"},{"path":"https://ropengov.github.io/eurostat/reference/recode_to_nuts_2016.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Recode geo labels and rename regions from NUTS2013 to NUTS2016 — recode_to_nuts_2016","text":"dat Eurostat data frame downloaded get_eurostat().","code":""},{"path":"https://ropengov.github.io/eurostat/reference/recode_to_nuts_2016.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Recode geo labels and rename regions from NUTS2013 to NUTS2016 — recode_to_nuts_2016","text":"augmented potentially relabelled data frame contains formerly 'NUTS2013' definition geo labels 'NUTS2016' vocabulary code changed, boundary . also contains information geo labels brought current 'NUTS2016' definition. Furthermore, official name region changed, use new name (otherwise region boundary change.) called , function use helper function harmonize_geo_code()","code":""},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/recode_to_nuts_2016.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Recode geo labels and rename regions from NUTS2013 to NUTS2016 — recode_to_nuts_2016","text":"Daniel Antal","code":""},{"path":"https://ropengov.github.io/eurostat/reference/recode_to_nuts_2016.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Recode geo labels and rename regions from NUTS2013 to NUTS2016 — recode_to_nuts_2016","text":"","code":"test_regional_codes <- data.frame( geo = c(\"FRB\", \"FRE\", \"UKN02\", \"IE022\", \"FR243\", \"FRB03\"), time = c(rep(as.Date(\"2014-01-01\"), 5), as.Date(\"2015-01-01\")), values = c(1:6), control = c( \"Changed from NUTS2 to NUTS1\", \"New region NUTS2016 only\", \"Discontinued region NUTS2013\", \"Boundary shift NUTS2013\", \"Recoded in NUTS2013\", \"Recoded in NUTS2016\" ) ) recode_to_nuts_2016(test_regional_codes) #> Warning: The 'recode_to_nuts_2013' function is deprecated. Use instead regions::recode_nuts(dat, nuts_year = 2016) #> geo time values control typology #> 1 FRB 2014-01-01 1 Changed from NUTS2 to NUTS1 nuts_level_1 #> 2 FRE 2014-01-01 2 New region NUTS2016 only nuts_level_1 #> 3 FRB03 2015-01-01 6 Recoded in NUTS2016 nuts_level_3 #> 4 IE022 2014-01-01 4 Boundary shift NUTS2013 nuts_level_3 #> 5 FR243 2014-01-01 5 Recoded in NUTS2013 nuts_level_3 #> 6 UKN02 2014-01-01 3 Discontinued region NUTS2013 nuts_level_3 #> typology_change code_2016 #> 1 unchanged FRB #> 2 unchanged FRE #> 3 unchanged FRB03 #> 4 Recoded from IE022 [used in NUTS 2013-2013] IE062 #> 5 Recoded from FR243 [used in NUTS 1999-2013] FRB03 #> 6 Used in NUTS 1999-2013 "},{"path":"https://ropengov.github.io/eurostat/reference/reexports.html","id":null,"dir":"Reference","previous_headings":"","what":"Recode Region Codes From Source To Target NUTS Typology — reexports","title":"Recode Region Codes From Source To Target NUTS Typology — reexports","text":"objects imported packages. Follow links see documentation. regions recode_nuts, validate_geo_code, validate_nuts_regions","code":""},{"path":"https://ropengov.github.io/eurostat/reference/reexports.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Recode Region Codes From Source To Target NUTS Typology — reexports","text":"dat data frame 3-5 character geo_var variable validated. geo_var Defaults \"geo\". variable contains 3-5 character geo codes validated. geo vector geographical code validate. nuts_year valid NUTS edition year.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/reexports.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Recode Region Codes From Source To Target NUTS Typology — reexports","text":"original data frame 'geo_var' column extended 'typology' column states typology 'geo_var' valid code. invalid codes, looks potential reasons invalidity adds 'typology_change' column, last adds column character vector containing desired codes target typology, example, NUTS2013 typology. Returns original dat data frame column specifies comformity NUTS definition year nuts_year. character list valid typology, 'invalid' cases geo coding valid.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/reexports.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Recode Region Codes From Source To Target NUTS Typology — reexports","text":"country codes technically part NUTS typologies, Eurostat de facto uses NUTS0 typology identify countries. de facto typology three exception handled validate_nuts_countries function. NUTS typologies different versions, therefore conformity validated one specific versions, can : 1999, 2003, 2006, 2010, 2013, currently used 2016 already announced defined 2021. NUTS typology codified NUTS2003, pre-1999 NUTS typologies may confuse programmatic data processing, given NUTS1 regions identified country codes smaller countries NUTS1 divisions. Currently 2016 used Eurostat, many datasets still contain 2013 sometimes earlier metadata.","code":""},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/reexports.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Recode Region Codes From Source To Target NUTS Typology — reexports","text":"","code":"{ foo <- data.frame ( geo = c(\"FR\", \"DEE32\", \"UKI3\" , \"HU12\", \"DED\", \"FRK\"), values = runif(6, 0, 100 ), stringsAsFactors = FALSE ) recode_nuts(foo, nuts_year = 2013) } #> geo values typology typology_change #> 1 FR 32.43514 country unchanged #> 2 UKI3 0.33628 nuts_level_2 unchanged #> 3 DED 60.32014 nuts_level_1 unchanged #> 4 FRK 84.90043 nuts_level_1 Recoded from FRK [used in NUTS 2016-2021] #> 5 HU12 14.28238 nuts_level_2 Used in NUTS 2016-2021 #> 6 DEE32 78.34309 nuts_level_3 Used in NUTS 1999-2003 #> code_2013 #> 1 FR #> 2 UKI3 #> 3 DED #> 4 FR7 #> 5 #> 6 # \\donttest{ my_reg_data <- data.frame( geo = c( \"BE1\", \"HU102\", \"FR1\", \"DED\", \"FR7\", \"TR\", \"DED2\", \"EL\", \"XK\", \"GB\" ), values = runif(10) ) validate_nuts_regions(my_reg_data) #> geo values typology valid_2016 #> 1 BE1 0.66177730 nuts_level_1 TRUE #> 2 HU102 0.51824919 FALSE #> 3 FR1 0.20266040 nuts_level_1 TRUE #> 4 DED 0.42121445 nuts_level_1 TRUE #> 5 FR7 0.75108584 iso-3166-alpha-3 FALSE #> 6 TR 0.09404199 country TRUE #> 7 DED2 0.64923619 nuts_level_2 TRUE #> 8 EL 0.16511930 country TRUE #> 9 XK 0.90381598 country TRUE #> 10 GB 0.97918314 country TRUE validate_nuts_regions(my_reg_data, nuts_year = 2013) #> geo values typology valid_2013 #> 1 BE1 0.66177730 nuts_level_1 TRUE #> 2 HU102 0.51824919 nuts_level_3 TRUE #> 3 FR1 0.20266040 nuts_level_1 TRUE #> 4 DED 0.42121445 nuts_level_1 TRUE #> 5 FR7 0.75108584 nuts_level_1 TRUE #> 6 TR 0.09404199 country TRUE #> 7 DED2 0.64923619 nuts_level_2 TRUE #> 8 EL 0.16511930 country TRUE #> 9 XK 0.90381598 country TRUE #> 10 GB 0.97918314 country TRUE validate_nuts_regions(my_reg_data, nuts_year = 2003) #> geo values typology valid_2003 #> 1 BE1 0.66177730 nuts_level_1 TRUE #> 2 HU102 0.51824919 FALSE #> 3 FR1 0.20266040 nuts_level_1 TRUE #> 4 DED 0.42121445 nuts_level_1 TRUE #> 5 FR7 0.75108584 nuts_level_1 TRUE #> 6 TR 0.09404199 country TRUE #> 7 DED2 0.64923619 nuts_level_2 TRUE #> 8 EL 0.16511930 country TRUE #> 9 XK 0.90381598 country TRUE #> 10 GB 0.97918314 country TRUE # } # \\donttest{ my_reg_data <- data.frame( geo = c( \"BE1\", \"HU102\", \"FR1\", \"DED\", \"FR7\", \"TR\", \"DED2\", \"EL\", \"XK\", \"GB\" ), values = runif(10) ) validate_geo_code(my_reg_data$geo) #> [1] \"nuts_level_1\" \"invalid\" \"nuts_level_1\" \"nuts_level_1\" #> [5] \"invalid\" \"non_eu_country\" \"nuts_level_2\" \"country\" #> [9] \"non_eu_country\" \"iso_country\" # }"},{"path":"https://ropengov.github.io/eurostat/reference/search_eurostat.html","id":null,"dir":"Reference","previous_headings":"","what":"Grep Datasets Titles from Eurostat — search_eurostat","title":"Grep Datasets Titles from Eurostat — search_eurostat","text":"Lists datasets eurostat table contents particular pattern item titles.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/search_eurostat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Grep Datasets Titles from Eurostat — search_eurostat","text":"","code":"search_eurostat( pattern, type = \"dataset\", column = \"title\", fixed = TRUE, lang = \"en\" )"},{"path":"https://ropengov.github.io/eurostat/reference/search_eurostat.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Grep Datasets Titles from Eurostat — search_eurostat","text":"pattern Text string used search dataset, folder table titles, depending type argument. type Selection types datasets searched. Default dataset, possible options table, folder types. column Selection column TOC search done. Default title, possible option code. fixed logical. TRUE (default), pattern string matched . See grep() documentation information. lang 2-letter language code, default \"en\" (English), options \"fr\" (French) \"de\" (German). Used labeling datasets.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/search_eurostat.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Grep Datasets Titles from Eurostat — search_eurostat","text":"tibble nine columns: title Dataset title English (default) code item (dataset, table folder) TOC unique code allows identified API. Used get_eurostat() get_eurostat_raw() functions retrieve datasets. type dataset, folder table last.update..data Date, indicates last time dataset/table updated (format DD.MM.YYYY %d.%m.%Y) last.table.structure.change Date, indicates last time dataset/table structure modified (format DD.MM.YYYY %d.%m.%Y) data.start Date oldest value included dataset (available) (format usually YYYY %Y can also YYYY-MM, YYYY-MM-DD, YYYY-SN, YYYY-QN etc.) data.end Date recent value included dataset (available) (format usually YYYY %Y can also YYYY-MM, YYYY-MM-DD, YYYY-SN, YYYY-QN etc.) values Number actual values included dataset hierarchy Hierarchy data navigation tree, represented original txt file 4-spaces indentation prefix title","code":""},{"path":"https://ropengov.github.io/eurostat/reference/search_eurostat.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Grep Datasets Titles from Eurostat — search_eurostat","text":"Downloads list datasets available eurostat return list names datasets contains particular pattern dataset description. E.g. datasets related education teaching. wish perform searches fields item title, can download Eurostat Table Contents manually using get_eurostat_toc() function use grep() function normally. data browser Eurostat website may also return useful results.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/search_eurostat.html","id":"data-source-eurostat-table-of-contents","dir":"Reference","previous_headings":"","what":"Data source: Eurostat Table of Contents","title":"Grep Datasets Titles from Eurostat — search_eurostat","text":"Eurostat Table Contents (TOC) downloaded https://ec.europa.eu/eurostat/api/dissemination/catalogue/toc/txt?lang=en (default) French German language variants: https://ec.europa.eu/eurostat/api/dissemination/catalogue/toc/txt?lang=fr https://ec.europa.eu/eurostat/api/dissemination/catalogue/toc/txt?lang=de See Eurostat documentation TOC items: https://wikis.ec.europa.eu/display/EUROSTATHELP/API+-+Detailed+guidelines+-+Catalogue+API+-+TOC","code":""},{"path":"https://ropengov.github.io/eurostat/reference/search_eurostat.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Grep Datasets Titles from Eurostat — search_eurostat","text":"See citation(\"eurostat\"): citing data downloaded Eurostat, see section \"Citing Eurostat data\" get_eurostat() documentation.","code":"Kindly cite the eurostat R package as follows: Lahti L., Huovari J., Kainu M., and Biecek P. (2017). Retrieval and analysis of Eurostat open data with the eurostat package. The R Journal 9(1), pp. 385-392. doi: 10.32614/RJ-2017-019 A BibTeX entry for LaTeX users is @Article{10.32614/RJ-2017-019, title = {Retrieval and Analysis of Eurostat Open Data with the eurostat Package}, author = {Leo Lahti and Janne Huovari and Markus Kainu and Przemyslaw Biecek}, journal = {The R Journal}, volume = {9}, number = {1}, pages = {385--392}, year = {2017}, doi = {10.32614/RJ-2017-019}, url = {https://doi.org/10.32614/RJ-2017-019}, } Lahti, L., Huovari J., Kainu M., Biecek P., Hernangomez D., Antal D., and Kantanen P. (2023). eurostat: Tools for Eurostat Open Data [Computer software]. R package version 4.0.0. https://github.com/rOpenGov/eurostat A BibTeX entry for LaTeX users is @Misc{eurostat, title = {eurostat: Tools for Eurostat Open Data}, author = {Leo Lahti and Janne Huovari and Markus Kainu and Przemyslaw Biecek and Diego Hernangomez and Daniel Antal and Pyry Kantanen}, url = {https://github.com/rOpenGov/eurostat}, type = {Computer software}, year = {2023}, note = {R package version 4.0.0}, }"},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/search_eurostat.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Grep Datasets Titles from Eurostat — search_eurostat","text":"Przemyslaw Biecek Leo Lahti ropengov-forum@googlegroups.com","code":""},{"path":"https://ropengov.github.io/eurostat/reference/search_eurostat.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Grep Datasets Titles from Eurostat — search_eurostat","text":"","code":"# \\donttest{ tmp <- search_eurostat(\"education\") head(tmp) #> # A tibble: 6 × 9 #> title code type last.update.of.data last.table.structure…¹ data.start #> #> 1 Population … cens… data… 01.04.2019 08.02.2021 2011 #> 2 Population … cens… data… 26.08.2015 08.02.2021 2011 #> 3 Employed pe… cens… data… 26.03.2009 08.02.2021 2001 #> 4 Population … cens… data… 26.03.2009 08.02.2021 2001 #> 5 Pupils enro… educ… data… 07.07.2023 07.07.2023 2013 #> 6 Pupils enro… educ… data… 07.07.2023 07.07.2023 2013 #> # ℹ abbreviated name: ¹​last.table.structure.change #> # ℹ 3 more variables: data.end , values , hierarchy # Use \"fixed = TRUE\" when pattern has characters that would need escaping. # Here, parentheses would normally need to be escaped in regex tmp <- search_eurostat(\"Live births (total) by NUTS 3 region\", fixed = TRUE) # }"},{"path":"https://ropengov.github.io/eurostat/reference/set_eurostat_cache_dir.html","id":null,"dir":"Reference","previous_headings":"","what":"Set Eurostat Cache — set_eurostat_cache_dir","title":"Set Eurostat Cache — set_eurostat_cache_dir","text":"function store cache_dir path local machine load future sessions. Type Sys.getenv(\"EUROSTAT_CACHE_DIR\") find cached path. Alternatively, can store cache_dir manually following options: Run Sys.setenv(EUROSTAT_CACHE_DIR = \"cache_dir\"). need run command session (Similar install = FALSE). Set options(eurostat_cache_dir = \"cache_dir\"). Similar previous option. provided backwards compatibility purposes. Write line .Renviron file: EUROSTAT_CACHE_DIR = \"value_for_cache_dir\" (behavior install = TRUE). store cache_dir permanently.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/set_eurostat_cache_dir.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set Eurostat Cache — set_eurostat_cache_dir","text":"","code":"set_eurostat_cache_dir( cache_dir, overwrite = FALSE, install = FALSE, verbose = TRUE )"},{"path":"https://ropengov.github.io/eurostat/reference/set_eurostat_cache_dir.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set Eurostat Cache — set_eurostat_cache_dir","text":"cache_dir path cache directory. missing value function store cached files temporary dir (See base::tempdir()). overwrite set TRUE, overwrite existing EUROSTAT_CACHE_DIR already local machine. install TRUE, install key local machine use future sessions. Defaults FALSE. cache_dir FALSE parameter set FALSE automatically. verbose Logical, displays information. Useful debugging, default FALSE.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/set_eurostat_cache_dir.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set Eurostat Cache — set_eurostat_cache_dir","text":"(invisible) character path cache_dir.","code":""},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/set_eurostat_cache_dir.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Set Eurostat Cache — set_eurostat_cache_dir","text":"Diego Hernangómez","code":""},{"path":"https://ropengov.github.io/eurostat/reference/set_eurostat_cache_dir.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Set Eurostat Cache — set_eurostat_cache_dir","text":"","code":"# Don't run this! It would modify your current state if (FALSE) { set_eurostat_cache_dir(verbose = TRUE) } Sys.getenv(\"EUROSTAT_CACHE_DIR\") #> [1] \"/tmp/RtmpSVUIhm/eurostat\""},{"path":"https://ropengov.github.io/eurostat/reference/set_eurostat_toc.html","id":null,"dir":"Reference","previous_headings":"","what":"Set Eurostat TOC — set_eurostat_toc","title":"Set Eurostat TOC — set_eurostat_toc","text":"Internal function.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/set_eurostat_toc.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set Eurostat TOC — set_eurostat_toc","text":"","code":"set_eurostat_toc(lang = \"en\")"},{"path":"https://ropengov.github.io/eurostat/reference/set_eurostat_toc.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set Eurostat TOC — set_eurostat_toc","text":"lang 2-letter language code, default \"en\" (English), options \"fr\" (French) \"de\" (German). Used labeling datasets.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/set_eurostat_toc.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set Eurostat TOC — set_eurostat_toc","text":"Empty element","code":""},{"path":"https://ropengov.github.io/eurostat/reference/set_eurostat_toc.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Set Eurostat TOC — set_eurostat_toc","text":"see citation(\"eurostat\")","code":""},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/set_eurostat_toc.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Set Eurostat TOC — set_eurostat_toc","text":"Przemyslaw Biecek Leo Lahti ropengov-forum@googlegroups.com","code":""},{"path":"https://ropengov.github.io/eurostat/reference/tgs00026.html","id":null,"dir":"Reference","previous_headings":"","what":"Auxiliary Data — tgs00026","title":"Auxiliary Data — tgs00026","text":"Auxiliary Data Sets","code":""},{"path":"https://ropengov.github.io/eurostat/reference/tgs00026.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Auxiliary Data — tgs00026","text":"","code":"tgs00026"},{"path":"https://ropengov.github.io/eurostat/reference/tgs00026.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Auxiliary Data — tgs00026","text":"data_frame","code":""},{"path":"https://ropengov.github.io/eurostat/reference/tgs00026.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Auxiliary Data — tgs00026","text":"Disposable income private households NUTS 2 regions Retrieved : tgs00026 <- get_eurostat(\"tgs00026\", time_format = \"raw\") Data retrieval date: 2022-06-27","code":""},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/tidy_eurostat.html","id":null,"dir":"Reference","previous_headings":"","what":"Transform Data into Row-Column-Value Format — tidy_eurostat","title":"Transform Data into Row-Column-Value Format — tidy_eurostat","text":"Transform raw Eurostat data table downloaded API tidy row-column-value format (RCV).","code":""},{"path":"https://ropengov.github.io/eurostat/reference/tidy_eurostat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Transform Data into Row-Column-Value Format — tidy_eurostat","text":"","code":"tidy_eurostat( dat, time_format = \"date\", select_time = NULL, stringsAsFactors = FALSE, keepFlags = FALSE, use.data.table = FALSE )"},{"path":"https://ropengov.github.io/eurostat/reference/tidy_eurostat.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Transform Data into Row-Column-Value Format — tidy_eurostat","text":"dat data_frame get_eurostat_raw(). time_format string giving type conversion time column eurostat format. default argument \"date\" converts Date() class date first day period. \"date_last\" argument converts dataset date Date() class object difference exact date last date period. Period can year, semester (half year), quarter, month, week (See eurotime2date() information). Argument \"num\" converts date numeric (integer) meaning first day year 2000 close 2000.01 last day year close 2000.99 (see eurotime2num() information). Using argument \"raw\" preserves dates original Eurostat data. select_time character symbol time frequency NULL, used default datasets just one time frequency. datasets multiple time frequencies, select one desired frequencies : \"Y\" (\"\") = annual, \"S\" = semi-annual / semester, \"Q\" = quarterly, \"M\" = monthly, \"W\" = weekly. frequencies data frame time_format = \"raw\" used. stringsAsFactors TRUE (default) variables converted factors original Eurostat order. FALSE returned strings. keepFlags logical whether flags (e.g. \"confidential\", \"provisional\") kept separate column can removed. Default FALSE. flag values see: https://ec.europa.eu/eurostat/data/database/information. Also possible non-real zero \"0n\" indicated flags column. Flags available eurostat API, keepFlags can used filters. use.data.table Use faster data.table functions? Default FALSE. Windows requires RTools installed.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/tidy_eurostat.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Transform Data into Row-Column-Value Format — tidy_eurostat","text":"tibble melted format last column 'values'.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/tidy_eurostat.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Transform Data into Row-Column-Value Format — tidy_eurostat","text":"See citation(\"eurostat\"): citing data downloaded Eurostat, see section \"Citing Eurostat data\" get_eurostat() documentation.","code":"Kindly cite the eurostat R package as follows: Lahti L., Huovari J., Kainu M., and Biecek P. (2017). Retrieval and analysis of Eurostat open data with the eurostat package. The R Journal 9(1), pp. 385-392. doi: 10.32614/RJ-2017-019 A BibTeX entry for LaTeX users is @Article{10.32614/RJ-2017-019, title = {Retrieval and Analysis of Eurostat Open Data with the eurostat Package}, author = {Leo Lahti and Janne Huovari and Markus Kainu and Przemyslaw Biecek}, journal = {The R Journal}, volume = {9}, number = {1}, pages = {385--392}, year = {2017}, doi = {10.32614/RJ-2017-019}, url = {https://doi.org/10.32614/RJ-2017-019}, } Lahti, L., Huovari J., Kainu M., Biecek P., Hernangomez D., Antal D., and Kantanen P. (2023). eurostat: Tools for Eurostat Open Data [Computer software]. R package version 4.0.0. https://github.com/rOpenGov/eurostat A BibTeX entry for LaTeX users is @Misc{eurostat, title = {eurostat: Tools for Eurostat Open Data}, author = {Leo Lahti and Janne Huovari and Markus Kainu and Przemyslaw Biecek and Diego Hernangomez and Daniel Antal and Pyry Kantanen}, url = {https://github.com/rOpenGov/eurostat}, type = {Computer software}, year = {2023}, note = {R package version 4.0.0}, }"},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/tidy_eurostat.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Transform Data into Row-Column-Value Format — tidy_eurostat","text":"Przemyslaw Biecek, Leo Lahti, Janne Huovari Pyry Kantanen","code":""},{"path":"https://ropengov.github.io/eurostat/reference/tidy_eurostat.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Transform Data into Row-Column-Value Format — tidy_eurostat","text":"","code":"if (FALSE) { # Example of a dataset with multiple time series get_eurostat(\"AVIA_GOR_ME\", time_format = \"date_last\", cache = F ) }"},{"path":"https://ropengov.github.io/eurostat/reference/toc_count_children.html","id":null,"dir":"Reference","previous_headings":"","what":"Count number of children — toc_count_children","title":"Count number of children — toc_count_children","text":"Determine many children certain TOC item (usually folder) .","code":""},{"path":"https://ropengov.github.io/eurostat/reference/toc_count_children.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Count number of children — toc_count_children","text":"","code":"toc_count_children(code)"},{"path":"https://ropengov.github.io/eurostat/reference/toc_count_children.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Count number of children — toc_count_children","text":"code Eurostat TOC item code (folder, dataset, table)","code":""},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/toc_count_children.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Count number of children — toc_count_children","text":"Pyry Kantanen","code":""},{"path":"https://ropengov.github.io/eurostat/reference/toc_count_whitespace.html","id":null,"dir":"Reference","previous_headings":"","what":"Count white space at the start of the title — toc_count_whitespace","title":"Count white space at the start of the title — toc_count_whitespace","text":"Counts number white space characters start string.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/toc_count_whitespace.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Count white space at the start of the title — toc_count_whitespace","text":"","code":"toc_count_whitespace(input_string)"},{"path":"https://ropengov.github.io/eurostat/reference/toc_count_whitespace.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Count white space at the start of the title — toc_count_whitespace","text":"input_string string containing Eurostat TOC titles","code":""},{"path":"https://ropengov.github.io/eurostat/reference/toc_count_whitespace.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Count white space at the start of the title — toc_count_whitespace","text":"Numeric (number white space characters)","code":""},{"path":"https://ropengov.github.io/eurostat/reference/toc_count_whitespace.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Count white space at the start of the title — toc_count_whitespace","text":"Used toc_determine_hierarchy function determine hierarchy. Hierarchy defined Eurostat .txt format TOC files number white space characters intervals four. example, \" Foo\" (4 white space characters) one level higher \" Bar\" (8 white space characters). \"Database themes\" (0 white space characters first alphanumeric character) highest hierarchy. function return warning input white space anything else increments 4. 0, 4, 8... acceptable 3, 6, 10... .","code":""},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/toc_count_whitespace.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Count white space at the start of the title — toc_count_whitespace","text":"Pyry Kantanen","code":""},{"path":"https://ropengov.github.io/eurostat/reference/toc_count_whitespace.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Count white space at the start of the title — toc_count_whitespace","text":"","code":"strings <- c(\" abc\", \" cdf\", \"no_spaces\") for (string in strings) { whitespace_count <- eurostat:::toc_count_whitespace(string) cat(\"String:\", string, \"\\tWhitespace Count:\", whitespace_count, \"\\n\") } #> String: abc \tWhitespace Count: 4 #> String: cdf \tWhitespace Count: 2 #> String: no_spaces \tWhitespace Count: 0"},{"path":"https://ropengov.github.io/eurostat/reference/toc_determine_hierarchy.html","id":null,"dir":"Reference","previous_headings":"","what":"Determine level in hierarchy — toc_determine_hierarchy","title":"Determine level in hierarchy — toc_determine_hierarchy","text":"Divides number spaces alphanumeric characters 4 uses result determine hierarchy. Top level 0.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/toc_determine_hierarchy.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Determine level in hierarchy — toc_determine_hierarchy","text":"","code":"toc_determine_hierarchy(input_string)"},{"path":"https://ropengov.github.io/eurostat/reference/toc_determine_hierarchy.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Determine level in hierarchy — toc_determine_hierarchy","text":"input_string string containing Eurostat TOC titles","code":""},{"path":"https://ropengov.github.io/eurostat/reference/toc_determine_hierarchy.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Determine level in hierarchy — toc_determine_hierarchy","text":"Numeric","code":""},{"path":"https://ropengov.github.io/eurostat/reference/toc_determine_hierarchy.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Determine level in hierarchy — toc_determine_hierarchy","text":"Used toc_determine_hierarchy function determine hierarchy. Hierarchy defined Eurostat .txt format TOC files number white space characters intervals four. example, \" Foo\" (4 white space characters) one level higher \" Bar\" (8 white space characters). \"Database themes\" (0 white space characters first alphanumeric character) highest hierarchy. function return warning input white space anything else increments 4. 0, 4, 8... acceptable 3, 6, 10... .","code":""},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/toc_determine_hierarchy.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Determine level in hierarchy — toc_determine_hierarchy","text":"Pyry Kantanen","code":""},{"path":"https://ropengov.github.io/eurostat/reference/toc_determine_hierarchy.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Determine level in hierarchy — toc_determine_hierarchy","text":"","code":"strings <- c(\" abc\", \" cdf\", \"no_spaces\") eurostat:::toc_determine_hierarchy(strings) #> [1] 2 1 0"},{"path":"https://ropengov.github.io/eurostat/reference/toc_list_children.html","id":null,"dir":"Reference","previous_headings":"","what":"List children — toc_list_children","title":"List children — toc_list_children","text":"List children specific folder.","code":""},{"path":"https://ropengov.github.io/eurostat/reference/toc_list_children.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List children — toc_list_children","text":"","code":"toc_list_children(code)"},{"path":"https://ropengov.github.io/eurostat/reference/toc_list_children.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"List children — toc_list_children","text":"code Eurostat TOC item code (folder, dataset, table)","code":""},{"path":[]},{"path":"https://ropengov.github.io/eurostat/reference/toc_list_children.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"List children — toc_list_children","text":"Pyry Kantanen","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-400","dir":"Changelog","previous_headings":"","what":"eurostat 4.0.0","title":"eurostat 4.0.0","text":"CRAN release: 2023-12-19","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"major-updates-4-0-0","dir":"Changelog","previous_headings":"","what":"Major updates","title":"eurostat 4.0.0","text":"Add data.table package Imports make using data.table functions optional get_eurostat() use.data.table argument. especially useful big datasets otherwise take long time go different data cleaning functions crash R large memory footprint. (issue #277, PR #278) switch httr package httr2 (issue #273, PR #276) Rewritten caching functionalities, making possible cache filtered queries rely local caches user attempt filter complete dataset already cached. list queries cached item hashes stored cache_list.json file cache folder. can viewed new function: list_eurostat_cache_items(). (Affects issues mentioned #144, #257, #258, fixed PR #267) Column names .eurostatTOC object (returned get_eurostat_toc()) now use dots instead spaces style base::make.names(), e.g. turning last update data last.update..data (PR #271) .eurostatTOC object includes new hierarchy column represents position folder, dataset table folder structure. search_eurostat() includes option search Table Content items dataset codes addition titles. makes possible make queries similar datasets (e.g. “nama_10_gdp”, “nama_10r_2gdp”, “nama_10r_3popgdp”) might different titles. label_eurostat_tables() rewritten use new SDMX API instead table_dic.dic file Eurostat Bulk Download Listing (PR #271) Remove legacy code related downloading data old bulk download facilities temporary functions added package version 3.7.14. \"spdf\" output class soft-deprecated, return sf object message. make_valid parameter soft-deprecated. Added ... function additional parametes can passed giscoR::gisco_get_nuts(). Dataset eurostat_geodata_60_2016 updated. get_eurostat_geospatial() now requires sf package work (PR #280, thanks @dieghernan)","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"minor-updates-4-0-0","dir":"Changelog","previous_headings":"","what":"Minor updates","title":"eurostat 4.0.0","text":"Added suppressWarnings() tests use TOC’s directly indirectly tests directly related TOC files. Use parameter inheritance package function documentation reduce discrepancies different functions (DRY-principle) (PR #270) Documentation explicitly explains use filter parameters get_eurostat() get_eurostat_json() functions. documentation now warns users potential problems caused time / TIME_PERIOD parameters used query datasets contain quarterly data (issue #260) continuation update done 3.7.14, started use new URL also dictionary files get_eurostat_dic() label_eurostat() functions. get_bibentry() now outputs “Accessed YYYY-MM-DD” “dataset last updated YYYY-MM-DD” note field otherwise sporadically printed printed urldate field. Print informative API error messages. (issue #261, PR #262, thanks @ake123) Removed sp, methods broom packages dependencies. Added giscoR Suggests. (PR #264)","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"new-features-4-0-0","dir":"Changelog","previous_headings":"","what":"New features","title":"eurostat 4.0.0","text":"Added new function: get_eurostat_interactive() interactively searching downloading data Eurostat SDMX API. function aims make good data citation practices prominently visible also make easier explore different arguments get_eurostat() function . also new internal function eurostat:::fixity_checksum() easily calculate fixity checksum datasets downloaded Eurostat. fixity checksum can, example, saved research notes reported part data appendices. Printing fixity checksum encouraged including option print every get_eurostat_interactive() query. Added new internal function clean_eurostat_toc() easy removal TOC objects .EurostatEnv environment. (PR #278) New internal function check_lang() (PR #270) get_eurostat() function now explicity accepts ‘lang’ argument, passing onwards get_eurostat_json() label_eurostat() (PR #270) New user facing function: get_eurostat_folder() downloading datasets folder. function limited downloading folders contain maximum 20 datasets. function relies new internal helper functions: toc_count_whitespace(), toc_determine_hierarchy(), toc_count_children() toc_list_children(). (PR #270) EXPERIMENTAL: get_eurostat_toc() set_eurostat_toc() now experimental features support downloading TOCs French German well. support, turn, leveraged get_bibentry() now language parameter: lang (PR #270) Related updates get_eurostat_toc(), search_eurostat() now supports searching French German TOC-files well (PR #270)","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"deprecated-and-defunct-4-0-0","dir":"Changelog","previous_headings":"","what":"Deprecated and defunct","title":"eurostat 4.0.0","text":"grepEurostatTOC() completely marked defunct enroute removed package search_eurostat() now way fetch Eurostat TOC items search (grep) (PR #270) development 4.0.0 version temporary function called label_eurostat_vars2 removed final version, promised earlier: “old function completely removed October 2023 Eurostat Bulk Download Listing website retired label_eurostat_vars2 renamed label_eurostat_vars()”. new label_eurostat_vars() function uses new SDMX API retrieve names dataset columns. Function evolution subject ongoing Eurostat API developments. (PR #270)","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"bug-fixes-4-0-0","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"eurostat 4.0.0","text":"Added informatic warning message situations TOC datasets downloaded Eurostat might proper titles. reason isolated German French language versions TOC English language TOC proper titles items. (PR #278) get_bibentry() returns correct codes titles warns user / requested codes found TOC (PR #270) get_bibentry() uses date field internal BibEntry format can easily translated formats: bibtex, bibentry (PR #270) get_bibentry() now outputs dataset codes titles correctly bibtex biblatex entries can copypasted bibliographies without adding escape characters manually (PR #270) Fix issue related downloading quarterly data (issue #260, PR #271) Reduce RAM usage eurotime2date() handling big datasets containing weekly data tens millions rows (dataset used testing mentioned issue #200).","code":""},{"path":[]},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"bug-fixes-3-8-3","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"eurostat 3.8.3 (2023-03-07)","text":"Fix date handling bug get_eurostat_json() eurotime2date() functions (issue #251, reported @lz1nwm). get_eurostat_json() function uses temporary eurotime2date() function date handling old bulk download API deprecated.","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-382-2023-03-06","dir":"Changelog","previous_headings":"","what":"eurostat 3.8.2 (2023-03-06)","title":"eurostat 3.8.2 (2023-03-06)","text":"CRAN release: 2023-03-06","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"minor-updates-3-8-2","dir":"Changelog","previous_headings":"","what":"Minor updates","title":"eurostat 3.8.2 (2023-03-06)","text":"use curl::curl_download Windows platforms instead utils::download.file latter causes following error: “error reading connection […] invalid incomplete compressed data”. affects files downloaded new API.","code":""},{"path":[]},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"major-updates-3-7-14","dir":"Changelog","previous_headings":"","what":"Major updates","title":"eurostat 3.7.14 (2023-02-22)","text":"Updated get_eurostat() assorted functions download data new dissemination API (related issues #251, #243). See Eurostat web page Transition - Eurostat Bulk Download API list differences old new data sources: https://wikis.ec.europa.eu/display/EUROSTATHELP/Transition+-++Eurostat+Bulk+Download++API Added new temporary functions downloading handling data new dissemination API: get_eurostat_raw2, tidy_eurostat2, convert_time_col2, eurotime2date2, eurotime2num2 label_eurostat2. old bulk download facilities decommissioned, functions replace old functions old naming schemes (without 2s end). tidy_eurostat2 function now able handle multiple time frequencies one call: example, can download annual, quarterly, monthly data simply using vector c(“”, “Q”, “M”) select_time instead using singular frequencies separate calls. function also return multiple time series one dataset select_time NULL (default). dataset contains multiple time series explicitly downloaded / select_time parameter given, message printed. eurotime2num can now handle monthly weekly data well. Added new parameter get_eurostat() function: legacy_bulk_download (default = TRUE). setting parameter FALSE user can download data new dissemination API. want test new API becomes way download data (much encourage ), set parameter FALSE.","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"minor-updates-3-7-14","dir":"Changelog","previous_headings":"","what":"Minor updates","title":"eurostat 3.7.14 (2023-02-22)","text":"Removed render-rmarkdown.yaml workflow used rendering README.md file. README.md must generated locally now .","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-3713-2023-02-01","dir":"Changelog","previous_headings":"","what":"eurostat 3.7.13 (2023-02-01)","title":"eurostat 3.7.13 (2023-02-01)","text":"Updated get_eurostat_json() migrate JSON web service API Statistics (addressed issues #243, #251). Please note output JSON API now slightly different : datasets now contain freq column indicate frequency data collected, example annually “”, monthly “M” quarterly “Q”. See Eurostat - Data browser online help website information: https://wikis.ec.europa.eu/display/EUROSTATHELP/API+Statistics+-+migrating++JSON+web+service++API+Statistics Minor fixes get_bibentry() get_eurostat_geospatial()","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-3712-2022-06-28","dir":"Changelog","previous_headings":"","what":"eurostat 3.7.12 (2022-06-28)","title":"eurostat 3.7.12 (2022-06-28)","text":"Updated included dataset eurostat_geodata_60_2016 fix issue old-style crs object (#237) Added information different variables eurostat_geodata_60_2016 dataset understandable usable testing purposes. Added information get_eurostat_geospatial() documentation well. Added GISCO copyright disclaimer eurostat_geodata_60_2016 get_eurostat_geospatial() documentation. Get rid unnecessary “encoding supplied: defaulting UTF-8.” messages get_eurostat_geospatial() setting content encoding UTF-8 httr::content() function called dplyr tidyr namespaces longer imported completely, selected functions importFrom","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-3710-2022-02-09","dir":"Changelog","previous_headings":"","what":"eurostat 3.7.10 (2022-02-09)","title":"eurostat 3.7.10 (2022-02-09)","text":"CRAN release: 2022-02-09 Fixed URL issues tests examples","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-379-2020-10-01","dir":"Changelog","previous_headings":"","what":"eurostat 3.7.9 (2020-10-01)","title":"eurostat 3.7.9 (2020-10-01)","text":"Function documentation migrated old \\code{}, \\link{} syntax markdown (issue #230, PR #231 @dieghernan)","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-378-2020-09-30","dir":"Changelog","previous_headings":"","what":"eurostat 3.7.8 (2020-09-30)","title":"eurostat 3.7.8 (2020-09-30)","text":"Package cache management updated: options() command longer needed cache dir can modified persistently custom function (issue #223, PR #228 @dieghernan)","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-377-2020-06-24","dir":"Changelog","previous_headings":"","what":"eurostat 3.7.7 (2020-06-24)","title":"eurostat 3.7.7 (2020-06-24)","text":"Maps vignette fixed","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-376-2021-05-20","dir":"Changelog","previous_headings":"","what":"eurostat 3.7.6 (2021-05-20)","title":"eurostat 3.7.6 (2021-05-20)","text":"Deprecated add_nuts_level(), harmonize_geo_code(), recode_to_nuts_2016() recode_to_nuts_2013(); functions moved new package regions. problem sub-national geo codes explained new vignette “Mapping Regional Data, Mapping Metadata Problems”, replaces “Regional data examples eurostat R package” vignette. shared vignette, new regions package articles work sub-national data. (issues #218 #219, PR #220 @antaldaniel)","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-375-2020-05-12","dir":"Changelog","previous_headings":"","what":"eurostat 3.7.5 (2020-05-12)","title":"eurostat 3.7.5 (2020-05-12)","text":"CRAN release: 2021-05-14 Moved sf Imports Suggests made get_eurostat_geospatial() return message sf installed. increase compatibility eurostat-package systems trouble installing sf (issue #213) Wrapped problem causing examples \\dontrun{} quick CRAN release","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-373","dir":"Changelog","previous_headings":"","what":"eurostat 3.7.3","title":"eurostat 3.7.3","text":"Removed outdated dependencies (mapproj, plotrix, rsdmx)","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-372","dir":"Changelog","previous_headings":"","what":"eurostat 3.7.2","title":"eurostat 3.7.2","text":"Non-intersecting sf-geometries get_eurostat_geospatial (PR #202 @retostauffer)","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-364-2020-05-12","dir":"Changelog","previous_headings":"","what":"eurostat 3.6.4 (2020-05-12)","title":"eurostat 3.6.4 (2020-05-12)","text":"Fixed stringsAsFactors R-4.0.0 moved default FALSE","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-363-2020-04-21","dir":"Changelog","previous_headings":"","what":"eurostat 3.6.3 (2020-04-21)","title":"eurostat 3.6.3 (2020-04-21)","text":"Stabilized http requests (PR @annnvv)","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-353","dir":"Changelog","previous_headings":"","what":"eurostat 3.5.3","title":"eurostat 3.5.3","text":"get_eurostat switched v2.1","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-352","dir":"Changelog","previous_headings":"","what":"eurostat 3.5.2","title":"eurostat 3.5.2","text":"CRAN release: 2020-01-25 internet proxy setting fixes bibentry fix","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-341","dir":"Changelog","previous_headings":"","what":"eurostat 3.4.1","title":"eurostat 3.4.1","text":"Fixed vignette Added automated error messages URL download failures","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-333","dir":"Changelog","previous_headings":"","what":"eurostat 3.3.3","title":"eurostat 3.3.3","text":"Countries Country Codes data.frames get label column country names Eurostat database. Fixed vignette duplicate entry issue smaller issues Added get_bibentry","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-331","dir":"Changelog","previous_headings":"","what":"eurostat 3.3.1","title":"eurostat 3.3.1","text":"CRAN release: 2018-11-24 label_eurostat() new countrycode countrycode_nomatch arguments label countrycode package custom_dic argument add custom dictionary. Vignette updated","code":""},{"path":[]},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"minor-features-3-2-3","dir":"Changelog","previous_headings":"","what":"Minor features","title":"eurostat 3.2.3","text":"dplyr moved Dependencies Imports curl removed Imports solved geospatial map issues eurostat_url moved options","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-321","dir":"Changelog","previous_headings":"","what":"eurostat 3.2.1","title":"eurostat 3.2.1","text":"CRAN release: 2018-05-20","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"major-updates-3-2-1","dir":"Changelog","previous_headings":"","what":"Major updates","title":"eurostat 3.2.1","text":"Improved support sf map visualization","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"minor-features-3-2-1","dir":"Changelog","previous_headings":"","what":"Minor features","title":"eurostat 3.2.1","text":"./data/ generation script ./data-raw/ updated make data reproducible","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"bug-fixes-3-2-1","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"eurostat 3.2.1","text":"Typo corrected Cisco Gisco","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-315","dir":"Changelog","previous_headings":"","what":"eurostat 3.1.5","title":"eurostat 3.1.5","text":"CRAN release: 2017-08-09","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"minor-features-3-1-5","dir":"Changelog","previous_headings":"","what":"Minor features","title":"eurostat 3.1.5","text":"Added new example data set reduce repeated downloads eurostat service Now label_eurostat() gives always error default, labelling introduces duplicated labels. new fix_duplicated argument add fix duplicated labels automatically. (#79, #90) Shrinked package tarball size","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"bug-fixes-3-1-5","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"eurostat 3.1.5","text":"Modified tutorial accommodate CRAN error Fixed cut_to_classes generate unique breaks","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-311","dir":"Changelog","previous_headings":"","what":"eurostat 3.1.1","title":"eurostat 3.1.1","text":"CRAN release: 2017-03-16","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"r-journal-submission-3-1-1","dir":"Changelog","previous_headings":"","what":"R Journal submission","title":"eurostat 3.1.1","text":"Release version associated R Journal manuscript 2017 final version Git release added Zenodo DOI","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"minor-features-3-1-1","dir":"Changelog","previous_headings":"","what":"Minor features","title":"eurostat 3.1.1","text":"Changed maintainer email address louhos leo Added ./docs/ (automated package website generated pkgdown) Expanded unit tests Gitter badge added README Added ./revdep/ check possible reverse dependencies automatically Cheat sheet added","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"bug-fixes-3-1-1","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"eurostat 3.1.1","text":"search_eurostat() accepts new argument fixed: TRUE (default), pattern provided used ; FALSE, pattern interpreted true regex pattern. Augmented list Suggested packages DESCRIPTION file, including Cairo package (#70) Updated journal manuscript based reviewer feedback","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-2220001","dir":"Changelog","previous_headings":"","what":"eurostat 2.2.20001","title":"eurostat 2.2.20001","text":"Development version opened","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-221","dir":"Changelog","previous_headings":"","what":"eurostat 2.2.1","title":"eurostat 2.2.1","text":"CRAN release: 2016-09-14 Fixed canonical cran url README","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-211","dir":"Changelog","previous_headings":"","what":"eurostat 2.1.1","title":"eurostat 2.1.1","text":"complete package now using tibbles Rare encoding issues circumvented (#55) Improved functionality within firewall-protected systems (#63)","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-20","dir":"Changelog","previous_headings":"","what":"eurostat 2.0","title":"eurostat 2.0","text":"get_eurostat() returns tibbles (#52) get_eurostat_dic() get_eurostat_toc() return tibbles Now read_tsv() used instead read.csv() (#29)","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-1227","dir":"Changelog","previous_headings":"","what":"eurostat 1.2.27","title":"eurostat 1.2.27","text":"Calls extract_numeric replaced .numeric (#60) column ‘flags’ labelled even type = “label” (#61)","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-1222","dir":"Changelog","previous_headings":"","what":"eurostat 1.2.22","title":"eurostat 1.2.22","text":"European Commission Eurostat generally uses ISO 3166-1 alpha-2 codes two exceptions: EL (GR) used represent Greece, UK (GB) used represent United Kingdom. now can handled harmonize_country_code() converts raw data values EL GR UK GB. Harmonized roxygen documentation better follow CRAN conventions Changed Windows encoding UTF input files Improved memory usage","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-1221","dir":"Changelog","previous_headings":"","what":"eurostat 1.2.21","title":"eurostat 1.2.21","text":"CRAN release: 2016-03-11 get_eurostat() can now get data also Eurostat JSON API via get_eurostat_json(). also new argument type select labels variable values instead codes. Fix error update tidyr 0.4.0 (#47).","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-1213","dir":"Changelog","previous_headings":"","what":"eurostat 1.2.13","title":"eurostat 1.2.13","text":"CRAN release: 2016-01-19 New select_time argument get_eurostat() select time frequency case multi-frequency datasets. Now get_eurostat() also gives error try get multi-frequency time formats time_format = \"raw\". (#30) time column also now ascending order. get_eurostat() gets new argument compress_file control compression cache file. Also cache filenames includes now relevant arguments. (#28) search_eurostat() new type option type = \"\" search types. label_eurostat() new arguments. code retain also codes specified columns. eu_order order factor levels Eurostat order, uses new function dic_order(). Now label_eurostat_vars(x) gives labels names, x character factor label_eurostat_tables(x) accept character factor. get_eurostat() new argument stringsAsFactors control factor conversion variables. eurotime2date (get_eurostat) convers now also daily data.","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-1016","dir":"Changelog","previous_headings":"","what":"eurostat 1.0.16","title":"eurostat 1.0.16","text":"CRAN release: 2015-03-27 Fixed vignette error","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-1014-2015-03-19","dir":"Changelog","previous_headings":"","what":"eurostat 1.0.14 (2015-03-19)","title":"eurostat 1.0.14 (2015-03-19)","text":"Package largely rewritten Vignette added Changed value column values get_eurostat output","code":""},{"path":"https://ropengov.github.io/eurostat/news/index.html","id":"eurostat-091-2014-04-24","dir":"Changelog","previous_headings":"","what":"eurostat 0.9.1 (2014-04-24)","title":"eurostat 0.9.1 (2014-04-24)","text":"Package collected statfi smarterpoland","code":""}] diff --git a/sitemap.xml b/sitemap.xml index 4aad253d..12077ccc 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -12,6 +12,9 @@ https://ropengov.github.io/eurostat/articles/cheatsheet.html + + https://ropengov.github.io/eurostat/articles/dimlst_vs_allconceptschemes.html + https://ropengov.github.io/eurostat/articles/eurostat_tutorial.html @@ -51,9 +54,6 @@ https://ropengov.github.io/eurostat/reference/convert_time_col.html - - https://ropengov.github.io/eurostat/reference/convert_time_col2.html - https://ropengov.github.io/eurostat/reference/cut_to_classes.html @@ -63,6 +63,9 @@ https://ropengov.github.io/eurostat/reference/eu_countries.html + + https://ropengov.github.io/eurostat/reference/eurostat-defunct.html + https://ropengov.github.io/eurostat/reference/eurostat-package.html @@ -72,14 +75,11 @@ https://ropengov.github.io/eurostat/reference/eurotime2date.html - - https://ropengov.github.io/eurostat/reference/eurotime2date2.html - https://ropengov.github.io/eurostat/reference/eurotime2num.html - https://ropengov.github.io/eurostat/reference/eurotime2num2.html + https://ropengov.github.io/eurostat/reference/fixity_checksum.html https://ropengov.github.io/eurostat/reference/get_bibentry.html @@ -90,17 +90,20 @@ https://ropengov.github.io/eurostat/reference/get_eurostat_dic.html + + https://ropengov.github.io/eurostat/reference/get_eurostat_folder.html + https://ropengov.github.io/eurostat/reference/get_eurostat_geospatial.html - https://ropengov.github.io/eurostat/reference/get_eurostat_json.html + https://ropengov.github.io/eurostat/reference/get_eurostat_interactive.html - https://ropengov.github.io/eurostat/reference/get_eurostat_raw.html + https://ropengov.github.io/eurostat/reference/get_eurostat_json.html - https://ropengov.github.io/eurostat/reference/get_eurostat_raw2.html + https://ropengov.github.io/eurostat/reference/get_eurostat_raw.html https://ropengov.github.io/eurostat/reference/get_eurostat_toc.html @@ -118,7 +121,7 @@ https://ropengov.github.io/eurostat/reference/label_eurostat.html - https://ropengov.github.io/eurostat/reference/label_eurostat2.html + https://ropengov.github.io/eurostat/reference/list_eurostat_cache_items.html https://ropengov.github.io/eurostat/reference/recode_to_nuts_2013.html @@ -145,6 +148,15 @@ https://ropengov.github.io/eurostat/reference/tidy_eurostat.html - https://ropengov.github.io/eurostat/reference/tidy_eurostat2.html + https://ropengov.github.io/eurostat/reference/toc_count_children.html + + + https://ropengov.github.io/eurostat/reference/toc_count_whitespace.html + + + https://ropengov.github.io/eurostat/reference/toc_determine_hierarchy.html + + + https://ropengov.github.io/eurostat/reference/toc_list_children.html