Skip to content

Commit caacfc8

Browse files
committed
Add rogtemplate support
1 parent dcc058a commit caacfc8

182 files changed

Lines changed: 111 additions & 29284 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.Rbuildignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,5 @@ TROUBLESHOOTING.md
4141
^\.github$
4242
^doc$
4343
^Meta$
44+
^pkgdown$
45+
^\._pkgdown\.yml$

.github/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
*.html
2+
R-version
3+
*.Rds
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
2+
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
3+
on:
4+
push:
5+
branches: [main, master]
6+
tags: ['*']
7+
workflow_dispatch:
8+
9+
name: rogtemplate-gh-pages
10+
11+
jobs:
12+
rogtemplate-gh-pages:
13+
runs-on: ubuntu-latest
14+
env:
15+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
16+
steps:
17+
- uses: actions/checkout@v2
18+
19+
- uses: r-lib/actions/setup-pandoc@v1
20+
21+
- uses: r-lib/actions/setup-r@v1
22+
with:
23+
use-public-rspm: true
24+
25+
- uses: r-lib/actions/setup-r-dependencies@v1
26+
with:
27+
extra-packages: |
28+
magick
29+
ropengov/rogtemplate
30+
31+
needs: website
32+
33+
- name: Build logo if not present and prepare template
34+
run: |
35+
# Check that logo is not present
36+
if (isFALSE(file.exists(file.path("man", "figures", "logo.png")) ||
37+
file.exists(file.path("man", "figures", "logo.png")))) {
38+
rogtemplate::rog_logo()
39+
} else {
40+
41+
message("The package already has a logo")
42+
}
43+
44+
rogtemplate::rog_add_template_pkgdown()
45+
46+
shell: Rscript {0}
47+
48+
- name: Deploy package
49+
run: |
50+
git config --local user.name "$GITHUB_ACTOR"
51+
git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com"
52+
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'

DESCRIPTION

Lines changed: 31 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,49 @@
1-
Package: pxweb
21
Type: Package
2+
Package: pxweb
33
Title: R Interface to PXWEB APIs
44
Version: 0.12.0
55
Date: 2021-10-09
6-
Encoding: UTF-8
76
Authors@R: c(
8-
person("Mans", "Magnusson", email = "mons.magnusson@gmail.com", role = c("aut", "cre")),
9-
person("Markus", "Kainu", role = "aut"),
10-
person("Janne", "Huovari", role = "aut"),
11-
person("Leo", "Lahti", role = "aut", comment = c(ORCID = "0000-0001-5537-637X")),
12-
person("Love" , "Hansson", role = "ctb"),
13-
person("Eydun", "Nielsen", role = "ctb"),
14-
person("Bo", "Werth", role = "ctb"),
15-
person("Thomas", "Runarsson", role = "ctb"),
16-
person("Torbjörn", "Lindquist", role = "ctb"),
17-
person("Palmar", "Thorsteinsson", role = "ctb"),
18-
person("Pyry", "Kantanen", role = "ctb"),
19-
person("Sebastian", "Ankargren", role = "ctb"))
20-
Description: Generic interface for the PX-Web/PC-Axis API. The PX-Web/PC-Axis
21-
API is used by organizations such as Statistics Sweden and Statistics
22-
Finland to disseminate data. The R package can interact with all
23-
PX-Web/PC-Axis APIs to fetch information about the data hierarchy, extract
24-
metadata and extract and parse statistics to R data.frame format. PX-Web is
25-
a solution to disseminate PC-Axis data files in dynamic tables on the web.
26-
Since 2013 PX-Web contains an API to disseminate PC-Axis files.
27-
VignetteBuilder: knitr
28-
URL: https://github.com/rOpenGov/pxweb/
7+
person("Mans", "Magnusson", , "mons.magnusson@gmail.com", role = c("aut", "cre")),
8+
person("Markus", "Kainu", role = "aut"),
9+
person("Janne", "Huovari", role = "aut"),
10+
person("Leo", "Lahti", role = "aut",
11+
comment = c(ORCID = "0000-0001-5537-637X")),
12+
person("Love", "Hansson", role = "ctb"),
13+
person("Eydun", "Nielsen", role = "ctb"),
14+
person("Bo", "Werth", role = "ctb"),
15+
person("Thomas", "Runarsson", role = "ctb"),
16+
person("Torbjörn", "Lindquist", role = "ctb"),
17+
person("Palmar", "Thorsteinsson", role = "ctb"),
18+
person("Pyry", "Kantanen", role = "ctb"),
19+
person("Sebastian", "Ankargren", role = "ctb")
20+
)
21+
Description: Generic interface for the PX-Web/PC-Axis API. The
22+
PX-Web/PC-Axis API is used by organizations such as Statistics Sweden
23+
and Statistics Finland to disseminate data. The R package can interact
24+
with all PX-Web/PC-Axis APIs to fetch information about the data
25+
hierarchy, extract metadata and extract and parse statistics to R
26+
data.frame format. PX-Web is a solution to disseminate PC-Axis data
27+
files in dynamic tables on the web. Since 2013 PX-Web contains an API
28+
to disseminate PC-Axis files.
29+
License: BSD_2_clause + file LICENSE
30+
URL: https://github.com/rOpenGov/pxweb/,
31+
https://ropengov.github.io/pxweb/, https://github.com/rOpenGov/pxweb
2932
BugReports: https://github.com/rOpenGov/pxweb/issues
3033
Depends:
3134
R (>= 3.5.0)
3235
Imports:
3336
checkmate,
3437
httr (>= 1.1),
3538
jsonlite
36-
License: BSD_2_clause + file LICENSE
3739
Suggests:
3840
knitr,
3941
remotes,
4042
rmarkdown,
4143
testthat (>= 0.11)
44+
VignetteBuilder:
45+
knitr
46+
Encoding: UTF-8
4247
RoxygenNote: 7.1.1
48+
X-schema.org-isPartOf: http://ropengov.org/
49+
X-schema.org-keywords: ropengov

README.Rmd

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ knitr::opts_chunk$set(
1111
)
1212
```
1313

14-
<br>
1514

1615
<!-- badges: start -->
16+
[![rOG-badge](https://ropengov.github.io/rogtemplate/reference/figures/ropengov-badge.svg)](http://ropengov.org/)
1717
[![R build status](https://github.com/rOpenGov/pxweb/workflows/R-CMD-check/badge.svg)](https://github.com/rOpenGov/pxweb/actions)
1818
[![Coverage Status](https://coveralls.io/repos/github/rOpenGov/pxweb/badge.svg?branch=master)](https://coveralls.io/github/rOpenGov/pxweb?branch=master)
1919
[![Downloads](http://cranlogs.r-pkg.org/badges/grand-total/pxweb)](https://cran.r-project.org/package=pxweb)
@@ -26,7 +26,7 @@ knitr::opts_chunk$set(
2626

2727
<br>
2828

29-
# R tools to access PX-WEB API - the pxweb R package
29+
# R tools to access PX-WEB API - the pxweb R package <a href='https://ropengov.github.io/rogtemplate/'><img src='man/figures/logo.png' align="right" height="139" /></a>
3030

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

@@ -51,14 +51,14 @@ install.packages('pxweb')
5151

5252
Alternatively, you can get the latest stable development version:
5353

54-
```{r, results='hide', message=FALSE}
54+
```{r, results='hide', message=FALSE, eval=FALSE}
5555
library(remotes)
5656
remotes::install_github('ropengov/pxweb')
5757
```
5858

5959
In some cases, the organization requires manual proxy settings. This can be set as follows:
6060

61-
```{r, results='hide', message=FALSE}
61+
```{r, results='hide', message=FALSE, eval=FALSE}
6262
library(remotes)
6363
library(httr)
6464
set_config(
@@ -69,12 +69,12 @@ remotes::install_github('ropengov/pxweb')
6969

7070
```{r, results='hide', echo=FALSE}
7171
# This resets the config when the README is tested
72-
reset_config()
72+
httr::reset_config()
7373
```
7474

7575
## Using the package
7676

77-
For examples, check the [tutorial/vignette](https://htmlpreview.github.io/?https://github.com/rOpenGov/pxweb/blob/master/vignettes/pxweb.html).
77+
For examples, check the [tutorial/vignette](https://ropengov.github.io/pxweb/articles/pxweb.html).
7878

7979
## Problems?
8080

@@ -92,7 +92,7 @@ You are welcome to contact us:
9292

9393
### Acknowledgements
9494

95-
**Kindly cite this work** as follows: [Måns Magnusson](https://github.com/mansmeg), Markus Kainu, Janne Huovari, and [Leo Lahti](https://github.com/antagomir). Retrieval and analysis of PC Axis data with the pxweb package. R package version `r sessionInfo()$otherPkgs$pxweb$Version`. URL: [http://ropengov.github.io/pxweb](http://ropengov.github.io/pxweb)
95+
**Kindly cite this work** as follows: [Måns Magnusson](https://github.com/mansmeg), Markus Kainu, Janne Huovari, and [Leo Lahti](https://github.com/antagomir). Retrieval and analysis of PC Axis data with the pxweb package. R package version `r sessionInfo()$otherPkgs$pxweb$Version`. URL: <https://ropengov.github.io/pxweb/>
9696

9797
We are grateful to all [contributors](https://github.com/rOpenGov/pxweb/graphs/contributors)! This project is part of [rOpenGov](http://ropengov.github.io).
9898

README.md

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
<br>
2-
31
<!-- badges: start -->
42

3+
[![rOG-badge](https://ropengov.github.io/rogtemplate/reference/figures/ropengov-badge.svg)](http://ropengov.org/)
54
[![R build
65
status](https://github.com/rOpenGov/pxweb/workflows/R-CMD-check/badge.svg)](https://github.com/rOpenGov/pxweb/actions)
76
[![Coverage
@@ -18,8 +17,7 @@ GitHub](https://img.shields.io/github/stars/ropengov/pxweb.svg?style=social)](ht
1817

1918
<br>
2019

21-
R tools to access PX-WEB API - the pxweb R package
22-
==================================================
20+
# R tools to access PX-WEB API - the pxweb R package <a href='https://ropengov.github.io/rogtemplate/'><img src='man/figures/logo.png' align="right" height="139" /></a>
2321

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

@@ -32,8 +30,7 @@ the PXWEB API.
3230
Many API services are still in their early stages, and data quality is
3331
sometimes compromised. Issue reports are welcome.
3432

35-
Installation
36-
------------
33+
## Installation
3734

3835
The easiest way to use pxweb is to simply install it from CRAN:
3936

@@ -54,21 +51,18 @@ be set as follows:
5451
)
5552
remotes::install_github('ropengov/pxweb')
5653

57-
Using the package
58-
-----------------
54+
## Using the package
5955

6056
For examples, check the
61-
[tutorial/vignette](https://htmlpreview.github.io/?https://github.com/rOpenGov/pxweb/blob/master/vignettes/pxweb.html).
57+
[tutorial/vignette](https://ropengov.github.io/pxweb/articles/pxweb.html).
6258

63-
Problems?
64-
---------
59+
## Problems?
6560

6661
See
6762
[TROUBLESHOOTING.md](https://github.com/rOpenGov/pxweb/blob/master/TROUBLESHOOTING.md)
6863
or [open an issue](https://github.com/ropengov/pxweb/issues).
6964

70-
Contributing
71-
============
65+
# Contributing
7266

7367
You are welcome to contact us:
7468

@@ -85,7 +79,7 @@ You are welcome to contact us:
8579
Magnusson](https://github.com/mansmeg), Markus Kainu, Janne Huovari, and
8680
[Leo Lahti](https://github.com/antagomir). Retrieval and analysis of PC
8781
Axis data with the pxweb package. R package version . URL:
88-
<http://ropengov.github.io/pxweb>
82+
<https://ropengov.github.io/pxweb/>
8983

9084
We are grateful to all
9185
[contributors](https://github.com/rOpenGov/pxweb/graphs/contributors)!

_pkgdown.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
reference:
22
- title: All functions
3-
desc: >
3+
desc: |
44
Listing of functions in the pxweb package
55
contents:
66
- '`pxweb-package`'
@@ -12,7 +12,12 @@ reference:
1212
- '`pxweb_test_api`'
1313
- '`pxweb_validate_query_with_metadata`'
1414
- title: Interactive functions
15-
desc: >
15+
desc: |
1616
Listing of interactive functions
17-
contents:
18-
- '`pxweb_interactive`'
17+
contents: '`pxweb_interactive`'
18+
url: https://ropengov.github.io/pxweb/
19+
template:
20+
package: rogtemplate
21+
opengraph:
22+
twitter:
23+
site: '@rOpenGov'

0 commit comments

Comments
 (0)