Skip to content

Commit

Permalink
Update get_bibentry url and replace year field with date
Browse files Browse the repository at this point in the history
  • Loading branch information
pitkant committed Aug 15, 2023
1 parent 8fb1013 commit 3ae8337
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions R/get_bibentry.R
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ get_bibentry <- function(code,

for (i in seq_len(nrow(toc))) {
last_update_date <- lubridate::dmy(toc[["last update of data"]][[i]])
last_update_year <- lubridate::year(last_update_date)
last_update_month <- lubridate::month(last_update_date)
last_update_day <- lubridate::day(last_update_date)
# last_update_year <- lubridate::year(last_update_date)
# last_update_month <- lubridate::month(last_update_date)
# last_update_day <- lubridate::day(last_update_date)

if (!is.null(keywords)) { # if user entered keywords
if (length(keywords) < i) { # last keyword not entered
Expand All @@ -84,10 +84,10 @@ get_bibentry <- function(code,
bibtype = "misc",
key = eurostat_id[i],
title = paste0(toc$title[i], " [", code[i], "]"),
url = paste0("https://ec.europa.eu/eurostat/web/products-datasets/-/",
code[i]),
url = paste0("https://ec.europa.eu/eurostat/databrowser/view/",
code[i], "/default/table?lang=en"),
language = "en",
year = paste0(toc$`last update of data`[i]),
date = format.Date(last_update_date, "%Y-%m-%d"),
publisher = "Eurostat",
author = "Eurostat",
keywords = keyword_entry,
Expand Down

0 comments on commit 3ae8337

Please sign in to comment.