European Commission

Data

Datasets

Javascript

Code
tibble(id = list.files(pattern = "\\.qmd$") %>% gsub(".qmd$", "", .)) %>%
  filter(!(id == "index")) %>%
  mutate(Title = read_lines(paste0(id, ".qmd"), skip = 1, n_max = 1) %>% gsub("title: ", "", .),
         Last_download = as.Date(file.info(paste0("~/Library/Mobile\ Documents/com~apple~CloudDocs/website/data/ec/", id, ".RData"))$mtime),
         Last_compile = as.Date(file.info(paste0("~/Library/Mobile\ Documents/com~apple~CloudDocs/website/data/ec/", id, ".html"))$mtime)) %>%
  mutate(html = paste0('<a  target=_blank href=https://fgeerolf.com/data/ec/', id, '.html > html </a>')) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F, escape = F) else .}

Flat

Code
tibble(id = list.files(pattern = "\\.qmd$") %>% gsub(".qmd$", "", .)) %>%
  filter(!(id == "index")) %>%
  mutate(Title = read_lines(paste0(id, ".qmd"), skip = 1, n_max = 1) %>% gsub("title: ", "", .),
         Last_download = as.Date(file.info(paste0("~/Library/Mobile\ Documents/com~apple~CloudDocs/website/data/ec/", id, ".RData"))$mtime),
         Last_compile = as.Date(file.info(paste0("~/Library/Mobile\ Documents/com~apple~CloudDocs/website/data/ec/", id, ".html"))$mtime)) %>%
  {if (is_html_output()) mutate(., html = paste0("[html](https://fgeerolf.com/data/ec/",id, ".html)")) else .} %>%
  {if (is_html_output()) print_table(.) else .}
id Title Last_download Last_compile html
CONSUMPTION Consumption - CONSUMPTION 2023-10-01 2024-09-15 [html]
INDUSTRY_SUBSECTOR Industry (subsector data) 2023-10-05 2024-09-15 [html]
INDUSTRY Industry (sector data) 2023-10-01 2024-09-15 [html]
WOB Weekly Oil Bulletin 2024-08-25 2024-09-15 [html]

Other Datasets

Javascript

Code
datasets %>%
  filter(!(code %in% list_main_datasets)) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F, escape = F) else .}