Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
dieghernan committed Jun 7, 2023
1 parent 8ed9f62 commit f392c17
Show file tree
Hide file tree
Showing 15 changed files with 69 additions and 730 deletions.
15 changes: 5 additions & 10 deletions .github/workflows/pkgdown-gh-pages-clean.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,8 @@ jobs:
any::reactable
needs: website

- name: Build site
run: Rscript -e 'pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE, clean = TRUE)'

- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@v4.4.2
with:
clean: true
branch: gh-pages
folder: docs
- name: Deploy package
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'
15 changes: 5 additions & 10 deletions .github/workflows/pkgdown-gh-pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,8 @@ jobs:
any::reactable
needs: website

- name: Build site
run: Rscript -e 'pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE, clean = TRUE)'

- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@v4.4.2
with:
clean: true
branch: gh-pages
folder: docs
- name: Deploy package
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'
10 changes: 10 additions & 0 deletions .github/workflows/wipe-cache.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Clear GHA caches manually
on:
workflow_dispatch:

jobs:
cache-clear:
runs-on: ubuntu-latest

steps:
- uses: easimon/wipe-cache@main
1 change: 1 addition & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ references:
volume: '57'
issue: '3'
year: '2020'
doi: 10.1177/0022343319881175
start: 492-503
- type: software
title: 'R: A Language and Environment for Statistical Computing'
Expand Down
674 changes: 0 additions & 674 deletions LICENSE

This file was deleted.

Binary file modified R/sysdata.rda
Binary file not shown.
7 changes: 5 additions & 2 deletions codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"name": "R",
"url": "https://r-project.org"
},
"runtimePlatform": "R version 4.3.0 (2023-04-21)",
"runtimePlatform": "R version 4.3.0 (2023-04-21 ucrt)",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
Expand Down Expand Up @@ -135,7 +135,7 @@
"SystemRequirements": null
},
"keywords": ["R", "IGO", "CorrelatesofWar", "IntergovernmentalOrganisations", "r-package", "igo", "correlates-of-war", "intergovernmental-organizations", "r", "rstats", "cran"],
"fileSize": "1152.806KB",
"fileSize": "1990.181KB",
"citation": [
{
"@type": "SoftwareSourceCode",
Expand Down Expand Up @@ -179,7 +179,10 @@
}
],
"name": "Tracking organizations in the world: The Correlates of War {IGO} Version 3.0 datasets",
"identifier": "10.1177/0022343319881175",
"pagination": "492-503",
"@id": "https://doi.org/10.1177/0022343319881175",
"sameAs": "https://doi.org/10.1177/0022343319881175",
"isPartOf": {
"@type": "PublicationIssue",
"issueNumber": "3",
Expand Down
Binary file modified data/states2016.rda
Binary file not shown.
3 changes: 2 additions & 1 deletion inst/CITATION
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,6 @@ bibentry("Article",
volume = 57,
number = 3,
pages = "492-503",
year = 2020
year = 2020,
doi = "10.1177/0022343319881175"
)
1 change: 0 additions & 1 deletion inst/WORDLIST
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ Hernangomez
IGO
IGOs
ISuC
InterGovermental
Intl
Jamison
Lifecycle
Expand Down
Binary file modified vignettes/AustShared-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified vignettes/NAShared-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified vignettes/UNMaps-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
60 changes: 34 additions & 26 deletions vignettes/mapping.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,10 @@ vignette: >
%\VignetteEncoding{UTF-8}
---



Maps are a powerful tool to show data. As the scope of `igoR` are the
InterGovermental Organizations, mapping and IGOs are a perfect match.
Intergovernmental Organizations, mapping and IGOs are a perfect match.

This vignette provides some geospatial visualizations using the IGO datasets
This vignette provides some geospatial visualizations using the IGO data sets
[@pevehouse2020] included in this package. Specific packages used for geospatial
data:

Expand All @@ -27,8 +25,7 @@ data:
Also `countrycode` is a very handy package for translating between coding
schemes (CoW, ISO3, NUTS, FIPS) and country names.


```r
``` r
library(igoR)

# Helper packages
Expand All @@ -47,8 +44,7 @@ United Nations.

First we should extract the data:


```r
``` r
# Extract shapes

world <- gisco_get_countries(year = "2010")
Expand Down Expand Up @@ -101,8 +97,7 @@ Germany are not included.

Now we are ready to plot with `ggplot2`:


```r
``` r
ggplot(UN_all) +
geom_sf(aes(fill = orgname), color = NA, show.legend = FALSE) +
# Robinson
Expand All @@ -123,10 +118,15 @@ ggplot(UN_all) +
theme(plot.caption = element_text(face = "italic"))
```

<div class="figure">
<img src="./UNMaps-1.png" alt="plot of chunk UNMaps" width="100%" />
<p class="caption">plot of chunk UNMaps</p>
</div>
::: figure
<img src="./UNMaps-1.png" alt="Evolution of the composition of members of the UN" width="100%"/>

<p class="caption">

Evolution of the composition of members of the UN

</p>
:::

## Number of shared memberships

Expand All @@ -135,8 +135,7 @@ Shared memberships are useful for identifying regional patterns.
The following code produces a map showing the number of full memberships shared
with Australia for each country on the world:


```r
``` r
## Number of igos shared - 2014

# Countries alive in 2014
Expand Down Expand Up @@ -215,19 +214,23 @@ ggplot(sharedmap) +
)
```

<div class="figure">
<img src="./AustShared-1.png" alt="plot of chunk AustShared" width="100%" />
<p class="caption">plot of chunk AustShared</p>
</div>
::: figure
<img src="./AustShared-1.png" alt="Australia and the World: Shared memberships on IGOs (2014)" width="100%"/>

<p class="caption">

Australia and the World: Shared memberships on IGOs (2014)

</p>
:::

## Cross-shared memberships

The following map shows how the relationships between the countries of North
America has flourished on the last 90 years, using a year as representative of
each decade.


```r
``` r
# Get shapes
countries.sf <- gisco_get_countries(country = c("USA", "MEX", "CAN"))

Expand Down Expand Up @@ -290,9 +293,14 @@ ggplot(map) +
)
```

<div class="figure">
<img src="./NAShared-1.png" alt="plot of chunk NAShared" width="100%" />
<p class="caption">plot of chunk NAShared</p>
</div>
::: figure
<img src="./NAShared-1.png" alt="Evolution of shared memberships between countries of North America (1930 - 2010)" width="100%"/>

<p class="caption">

Evolution of shared memberships between countries of North America (1930 - 2010)

</p>
:::

## References
13 changes: 7 additions & 6 deletions vignettes/mapping.Rmd.orig
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ knitr::opts_chunk$set(
message = FALSE,
tidy = "styler",
dev = "ragg_png",
dpi = 150,
dpi = 300,
fig.path = "./",
out.width = "100%"
)
```

Maps are a powerful tool to show data. As the scope of `igoR` are the
InterGovermental Organizations, mapping and IGOs are a perfect match.
Intergovernmental Organizations, mapping and IGOs are a perfect match.

This vignette provides some geospatial visualizations using the IGO datasets
This vignette provides some geospatial visualizations using the IGO data sets
[@pevehouse2020] included in this package. Specific packages used for geospatial
data:

Expand Down Expand Up @@ -114,7 +114,7 @@ Germany are not included.

Now we are ready to plot with `ggplot2`:

```{r UNMaps, fig.asp=1.5}
```{r UNMaps, fig.asp=1.5, fig.cap="Evolution of the composition of members of the UN"}

ggplot(UN_all) +
geom_sf(aes(fill = orgname), color = NA, show.legend = FALSE) +
Expand Down Expand Up @@ -143,7 +143,7 @@ Shared memberships are useful for identifying regional patterns.
The following code produces a map showing the number of full memberships shared
with Australia for each country on the world:

```{r AustShared, fig.asp=0.8}
```{r AustShared, fig.asp=0.8, fig.cap="Australia and the World: Shared memberships on IGOs (2014)"}

## Number of igos shared - 2014

Expand Down Expand Up @@ -229,7 +229,7 @@ The following map shows how the relationships between the countries of North
America has flourished on the last 90 years, using a year as representative of
each decade.

```{r NAShared}
```{r NAShared, fig.cap="Evolution of shared memberships between countries of North America (1930 - 2010)"}

# Get shapes
countries.sf <- gisco_get_countries(country = c("USA", "MEX", "CAN"))
Expand Down Expand Up @@ -291,6 +291,7 @@ ggplot(map) +
legend.title = element_text(size = 8),
strip.background = element_rect(fill = "grey90", colour = NA)
)

```

## References

0 comments on commit f392c17

Please sign in to comment.