Skip to content

Commit

Permalink
Merge pull request #229 from rOpenGov/rogtemplate
Browse files Browse the repository at this point in the history
Add rogtemplate to eurostat
  • Loading branch information
antagomir committed Sep 29, 2021
2 parents c334f55 + 3b5d892 commit e6c2504
Show file tree
Hide file tree
Showing 156 changed files with 16,347 additions and 10,639 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,4 @@ docs
^\.github$
^codecov\.yml$
^pkgdown$
^\._pkgdown\.yml$
2 changes: 2 additions & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
*.html
R-version
*.Rds
22 changes: 17 additions & 5 deletions .github/workflows/render-readme.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# and https://fromthebottomoftheheap.net/2020/04/30/rendering-your-readme-with-github-actions/
# Workflow triggering derived from: https://stevenmortimer.com/running-github-actions-sequentially/
on:
workflow_dispatch:
push:
paths:
- 'README.Rmd'
Expand All @@ -16,18 +17,29 @@ jobs:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-r@v1
- uses: r-lib/actions/setup-pandoc@v1
- name: Install rmarkdown
run: Rscript -e 'install.packages("rmarkdown")'

- uses: r-lib/actions/setup-pandoc@master

- uses: r-lib/actions/setup-r@master
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@master
with:
extra-packages: |
rmarkdown
needs: website
- name: Render README
run: Rscript -e 'rmarkdown::render("README.Rmd")'

- name: Commit results
run: |
git config --local user.email "actions@github.com"
git config --local user.name "GitHub Actions"
git commit README.md -m 'Re-build README.Rmd' || echo "No changes to commit"
git commit examples/README.md -m 'Re-build README.Rmd' || echo "No changes to commit"
git push origin || echo "No changes to commit"
- name: Trigger pkgdown workflow
if: success()
uses: peter-evans/repository-dispatch@v1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
# Workflow triggering derived from: https://stevenmortimer.com/running-github-actions-sequentially/
on:
push:
branches: [main, master]
Expand All @@ -9,11 +8,12 @@ on:
- 'README.Rmd'
repository_dispatch:
types: [trigger-pkgdown-workflow]
workflow_dispatch:

name: pkgdown
name: rogtemplate-gh-pages

jobs:
pkgdown:
rogtemplate-gh-pages:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -28,11 +28,29 @@ jobs:

- uses: r-lib/actions/setup-r-dependencies@v1
with:
extra-packages: pkgdown
extra-packages: |
magick
ropengov/rogtemplate
needs: website

- name: Build logo if not present and prepare template
run: |
# Check that logo is not present
if (isFALSE(file.exists(file.path("man", "figures", "logo.png")) ||
file.exists(file.path("man", "figures", "logo.png")))) {
rogtemplate::rog_logo()
} else {
message("The package already has a logo")
}
rogtemplate::rog_add_template_pkgdown()
shell: Rscript {0}

- name: Deploy package
run: |
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com"
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'
6 changes: 0 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@
.Rdata
.httr-oauth
.DS_Store

_pkgdown.yml
inst/doc
docs/docsearch.js
docs/articles/2015-RJournal/response.txt
*Rcheck*
inst/extras/*
application/*
Expand All @@ -30,10 +26,8 @@ vignettes/zipfile
NUTS_2010.xls
zipfile
packrat/lib*/

/revdep/.cache.rds
doc
Meta
/doc/
/Meta/
docs
2 changes: 2 additions & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,5 @@ VignetteBuilder: knitr
NeedsCompilation: no
Repository: CRAN
RoxygenNote: 7.1.1
X-schema.org-isPartOf: http://ropengov.org/
X-schema.org-keywords: ropengov
13 changes: 9 additions & 4 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@ knitr::opts_chunk$set(
comment = "#>",
fig.path = "README-"
)
library(eurostat)
```

<!-- badges: start -->
[![rOG-badge](https://ropengov.github.io/rogtemplate/reference/figures/ropengov-badge.svg)](http://ropengov.org/)
[![R build status](https://github.com/rOpenGov/eurostat/workflows/R-CMD-check/badge.svg)](https://github.com/rOpenGov/eurostat/actions)
[![lifecycle](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable-1)
[![DOI](https://img.shields.io/badge/DOI-10.32614/RJ--2017--019-blue)](https://doi.org/10.32614/RJ-2017-019)
[![codecov](https://codecov.io/gh/rOpenGov/eurostat/branch/master/graph/badge.svg?token=Wp2VVvpWQA)](https://codecov.io/gh/rOpenGov/eurostat)
[![Downloads](http://cranlogs.r-pkg.org/badges/grand-total/eurostat)](https://cran.r-project.org/package=eurostat)
[![Downloads](http://cranlogs.r-pkg.org/badges/eurostat)](https://cran.r-project.org/package=eurostat)
Expand All @@ -37,15 +41,16 @@ knitr::opts_chunk$set(

<!-- badges: end -->

# eurostat R package
# eurostat R package <a href='https://ropengov.github.io/eurostat/'><img src='man/figures/logo.png' align="right" height="139" /></a>

R tools to access open data from [Eurostat](https://ec.europa.eu/eurostat). Data search, download, manipulation and visualization.


### Installation and use

Install stable version from CRAN:

```{r, eval = TRUE}
```{r, eval = FALSE}
install.packages("eurostat")
```

Expand All @@ -68,7 +73,7 @@ passengers <- search_eurostat("passenger transport")
knitr::kable(head(passengers))
```

See the [Tutorial](https://ropengov.github.io/eurostat/articles/website/eurostat_tutorial.html) and other resources at the [package homepage](https://ropengov.github.io/eurostat/) for more information and examples.
See the [Tutorial](https://ropengov.github.io/eurostat//articles/website/eurostat_tutorial.html) and other resources at the [package homepage](https://ropengov.github.io/eurostat//) for more information and examples.

### Recommended packages

Expand All @@ -87,7 +92,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 `r sessionInfo()$otherPkgs$eurostat$Version`. URL: [https://ropengov.github.io/eurostat/](https://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 `r sessionInfo()$otherPkgs$eurostat$Version`. URL: [https://ropengov.github.io/eurostat//](https://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.org).

Expand Down
52 changes: 18 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@

<!-- README.md is generated from README.Rmd. Please edit that file -->

<!-- badges: start -->

[![rOG-badge](https://ropengov.github.io/rogtemplate/reference/figures/ropengov-badge.svg)](http://ropengov.org/)
[![R build
status](https://github.com/rOpenGov/eurostat/workflows/R-CMD-check/badge.svg)](https://github.com/rOpenGov/eurostat/actions)
[![lifecycle](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable-1)
[![DOI](https://img.shields.io/badge/DOI-10.32614/RJ--2017--019-blue)](https://doi.org/10.32614/RJ-2017-019)
[![codecov](https://codecov.io/gh/rOpenGov/eurostat/branch/master/graph/badge.svg?token=Wp2VVvpWQA)](https://codecov.io/gh/rOpenGov/eurostat)
[![Downloads](http://cranlogs.r-pkg.org/badges/grand-total/eurostat)](https://cran.r-project.org/package=eurostat)
[![Downloads](http://cranlogs.r-pkg.org/badges/eurostat)](https://cran.r-project.org/package=eurostat)
Expand All @@ -18,28 +19,18 @@ GitHub](https://img.shields.io/github/stars/ropengov/eurostat.svg?style=social)]
[![Follow](https://img.shields.io/twitter/follow/ropengov.svg?style=social)](https://twitter.com/intent/follow?screen_name=ropengov)

<!--[![Build Status](https://travis-ci.org/rOpenGov/eurostat.svg?branch=master)](https://travis-ci.org/rOpenGov/eurostat)-->

<!--[![AppVeyor Status](https://ci.appveyor.com/api/projects/status/github/rOpenGov/eurostat?branch=master&svg=true)](https://ci.appveyor.com/project/rOpenGov/eurostat)-->

<!--[![license](https://img.shields.io/github/license/mashape/apistatus.svg)]()-->

<!--[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.399279.svg)](https://doi.org/10.5281/zenodo.399279)-->

<!--[![PRs Welcome][prs-badge]][prs]-->

<!--[![Code of Conduct][coc-badge]][coc]-->

<!--[![Contributors](https://img.shields.io/github/contributors/cdnjs/cdnjs.svg?style=flat-square)](#contributors)-->

<!--[![License](https://img.shields.io/pypi/l/Django.svg)](https://opensource.org/licenses/BSD-2-Clause)-->

<!--[![Stories in Ready](http://badge.waffle.io/ropengov/eurostat.png?label=TODO)](http://waffle.io/ropengov/eurostat)-->

<!--[![CRAN version](http://www.r-pkg.org/badges/version/eurostat)](https://cran.r-project.org/package=eurostat)-->

<!-- badges: end -->

# eurostat R package
# eurostat R package <a href='https://ropengov.github.io/eurostat/'><img src='man/figures/logo.png' align="right" height="139" /></a>

R tools to access open data from
[Eurostat](https://ec.europa.eu/eurostat). Data search, download,
Expand All @@ -51,12 +42,6 @@ Install stable version from CRAN:

``` r
install.packages("eurostat")
#> Installing package into '/Users/runner/work/_temp/Library'
#> (as 'lib' is unspecified)
#> also installing the dependencies 'sys', 'bit', 'prettyunits', 'proxy', 'utf8', 'askpass', 'bit64', 'withr', 'progress', 'wk', 'backports', 'ellipsis', 'generics', 'purrr', 'e1071', 'lifecycle', 'R6', 'tidyselect', 'vctrs', 'pillar', 'openssl', 'Rcpp', 'cli', 'clipr', 'crayon', 'hms', 'vroom', 'cpp11', 'tzdb', 'xml2', 'plyr', 'DBI', 's2', 'units', 'fansi', 'pkgconfig', 'broom', 'classInt', 'countrycode', 'curl', 'dplyr', 'httr', 'lubridate', 'RColorBrewer', 'readr', 'RefManageR', 'sf', 'tibble', 'tidyr'
#>
#> The downloaded binary packages are in
#> /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T//RtmpAxhaCw/downloaded_packages
```

Alternatively, install development version from GitHub:
Expand All @@ -80,19 +65,19 @@ knitr::kable(head(passengers))
```

| title | code | type | last update of data | last table structure change | data start | data end | values |
| :----------------------------------------------------------------- | :-------------- | :------ | :------------------ | :-------------------------- | :--------- | :------- | :----- |
|:-------------------------------------------------------------------|:----------------|:--------|:--------------------|:----------------------------|:-----------|:---------|:-------|
| Air passenger transport | enps\_avia\_pa | dataset | 16.04.2021 | NA | 2005 | 2020 | NA |
| Volume of passenger transport relative to GDP | tran\_hv\_pstra | dataset | 07.07.2021 | 07.07.2021 | 1990 | 2019 | NA |
| Modal split of passenger transport | tran\_hv\_psmod | dataset | 07.07.2021 | 07.07.2021 | 1990 | 2019 | NA |
| Air passenger transport by reporting country | avia\_paoc | dataset | 27.08.2021 | 27.08.2021 | 1993 | 2021Q2 | NA |
| Air passenger transport by main airports in each reporting country | avia\_paoa | dataset | 27.08.2021 | 27.08.2021 | 1993 | 2021Q2 | NA |
| Air passenger transport between reporting countries | avia\_paocc | dataset | 27.08.2021 | 27.08.2021 | 1993 | 2021Q2 | NA |
| Air passenger transport by reporting country | avia\_paoc | dataset | 01.09.2021 | 27.08.2021 | 1993 | 2021Q2 | NA |
| Air passenger transport by main airports in each reporting country | avia\_paoa | dataset | 01.09.2021 | 27.08.2021 | 1993 | 2021Q2 | NA |
| Air passenger transport between reporting countries | avia\_paocc | dataset | 01.09.2021 | 27.08.2021 | 1993 | 2021Q2 | NA |

See the
[Tutorial](https://ropengov.github.io/eurostat/articles/website/eurostat_tutorial.html)
[Tutorial](https://ropengov.github.io/eurostat//articles/website/eurostat_tutorial.html)
and other resources at the [package
homepage](https://ropengov.github.io/eurostat/) for more information and
examples.
homepage](https://ropengov.github.io/eurostat//) for more information
and examples.

### Recommended packages

Expand All @@ -105,31 +90,30 @@ analysis and visualization.

Contributions are very welcome:

- [Use issue tracker](https://github.com/ropengov/eurostat/issues) for
- [Use issue tracker](https://github.com/ropengov/eurostat/issues) for
feedback and bug reports.
- [Send pull requests](https://github.com/ropengov/eurostat/)
- [Star us on the Github page](https://github.com/ropengov/eurostat/)
- [Join the discussion in Gitter](https://gitter.im/rOpenGov/eurostat)
- [Send pull requests](https://github.com/ropengov/eurostat/)
- [Star us on the Github page](https://github.com/ropengov/eurostat/)
- [Join the discussion in Gitter](https://gitter.im/rOpenGov/eurostat)

### 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.7.5. URL: <https://ropengov.github.io/eurostat/>
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.7.7. URL: <https://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.org).
portal! This project is part of [rOpenGov](http://ropengov.org).

### Disclaimer

This package is in no way officially related to or endorsed by Eurostat.

<!--[build-badge]: https://img.shields.io/travis/ropengov/eurostat.svg?style=flat-square-->

<!--[build]: https://travis-ci.org/ropengov/eurostat-->

0 comments on commit e6c2504

Please sign in to comment.