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

Add rogtemplate to eurostat #229

Merged
merged 7 commits into from
Sep 29, 2021
Merged
Show file tree
Hide file tree
Changes from 4 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
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
13 changes: 10 additions & 3 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 @@ -18,16 +19,22 @@ jobs:
- 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")'
- name: Install rmarkdown, remotes, and the local package
run: |
install.packages("remotes")
remotes::install_local(".")
remotes::install_cran("rmarkdown")
remotes::install_github("ropengov/rogtemplate")
shell: Rscript {0}
- name: Render README
run: Rscript -e 'rmarkdown::render("README.Rmd")'
- name: Commit results
run: |
git config --local user.email "[email protected]"
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 "[email protected]"
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
.httr-oauth
.DS_Store

_pkgdown.yml
inst/doc
docs/docsearch.js
docs/articles/2015-RJournal/response.txt
Expand Down
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
10 changes: 6 additions & 4 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ knitr::opts_chunk$set(
comment = "#>",
fig.path = "README-"
)

library(eurostat)
```

<!-- badges: start -->
Expand Down Expand Up @@ -37,15 +39,15 @@ 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 +70,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 +89,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
50 changes: 16 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

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

<!-- badges: start -->

[![R build
Expand All @@ -18,28 +17,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 +40,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 +63,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 +88,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-->
Loading