Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I made an issue, too - there is a small bug in the get_bibentry #152

Merged
merged 4 commits into from
Jan 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: eurostat
Type: Package
Title: Tools for Eurostat Open Data
Date: 2019-12-18
Version: 3.4.10002
Date: 2019-12-19
Version: 3.4.20002
Encoding: UTF-8
Authors@R: c(
person("Leo", "Lahti", email = "leo.lahti@iki.fi", role = c("aut", "cre"), comment = c(ORCID = "0000-0001-5537-637X")),
Expand Down
8 changes: 7 additions & 1 deletion R/get_bibentry.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#' @export
#' @author Daniel Antal, Przemyslaw Biecek
#' @return a bibentry, Bibtex or Biblatex object.
#' @import lubridate dmy, year, month, day
#' @examples
#' \dontrun{
#' my_bibliography <- get_bibentry (
Expand Down Expand Up @@ -49,6 +50,11 @@ get_bibentry <- function(
toc <- toc[! duplicated(toc), ]

urldate <- as.character(Sys.Date())
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)


if (nrow(toc) == 0) {
warning(paste0("Code ",code, "not found"))
Expand All @@ -75,7 +81,7 @@ get_bibentry <- function(
title = paste0(toc$title[i]," [",code[i],"]"),
url = paste0("https://ec.europa.eu/eurostat/web/products-datasets/-/",code[i]),
language = "en",
year = paste0(toc$`last update of data`[1]),
year = paste0(toc$`last update of data`[i]),
publisher = "Eurostat",
author = "Eurostat",
keywords = keyword_entry,
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Contributions are very welcome:

### Acknowledgements

**Kindly cite this work** as follows: [Leo Lahti](https://github.com/antagomir), Przemyslaw Biecek, Markus Kainu and Janne Huovari. Retrieval and analysis of Eurostat open data with the eurostat package. [R Journal 9(1):385-392, 2017](https://journal.r-project.org/archive/2017/RJ-2017-019/index.html). R package version 3.4.10002. URL: [http://ropengov.github.io/eurostat](http://ropengov.github.io/eurostat)
**Kindly cite this work** as follows: [Leo Lahti](https://github.com/antagomir), Przemyslaw Biecek, Markus Kainu and Janne Huovari. Retrieval and analysis of Eurostat open data with the eurostat package. [R Journal 9(1):385-392, 2017](https://journal.r-project.org/archive/2017/RJ-2017-019/index.html). R package version 3.4.20002. URL: [http://ropengov.github.io/eurostat](http://ropengov.github.io/eurostat)

We are grateful to all [contributors](https://github.com/rOpenGov/eurostat/graphs/contributors), including Daniel Antal, Joona Lehtomäki, Francois Briatte, and Oliver Reiter, and for the [Eurostat](https://ec.europa.eu/eurostat/) open data portal! This project is part of [rOpenGov](http://ropengov.github.io).

Expand Down
7 changes: 5 additions & 2 deletions docs/LICENSE-text.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions docs/articles/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 7 additions & 4 deletions docs/authors.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions docs/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion docs/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ pandoc: 2.2.1
pkgdown: 1.4.1
pkgdown_sha: ~
articles:
eurostat_tutorial: eurostat_tutorial.html
vignette: vignette.html
blogposts: website/blogposts.html
cheatsheet: website/cheatsheet.html
eurostat_tutorial: website/eurostat_tutorial.html
maps: website/maps.html
publications: website/publications.html

7 changes: 5 additions & 2 deletions docs/reference/clean_eurostat_cache.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions docs/reference/convert_time_col.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions docs/reference/cut_to_classes.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions docs/reference/dic_order.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions docs/reference/eu_countries.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions docs/reference/eurostat-package.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading