Skip to content

Commit

Permalink
Deploying to gh-pages from @ ecf0013 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
cjyetman committed Sep 27, 2024
1 parent a42e99d commit 1f159b3
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 55 deletions.
24 changes: 5 additions & 19 deletions CITATION.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,9 @@
# Citation

```verbatim
To cite countrycode in publications use:

Arel-Bundock V, Enevoldsen N, Yetman C (2018). “countrycode: An R
package to convert country names and country codes.” _Journal of Open
Source Software_, *3*(28), 848.
<https://doi.org/10.21105/joss.00848>.
A BibTeX entry for LaTeX users is
@Article{,
title = {countrycode: An R package to convert country names and country codes},
author = {Vincent Arel-Bundock and Nils Enevoldsen and CJ Yetman},
journal = {Journal of Open Source Software},
year = {2018},
volume = {3},
number = {28},
pages = {848},
url = {https://doi.org/10.21105/joss.00848},
}
```
<p>Arel-Bundock V, Enevoldsen N, Yetman C (2018).
&ldquo;countrycode: An R package to convert country names and country codes.&rdquo;
<em>Journal of Open Source Software</em>, <b>3</b>(28), 848.
<a href="https://doi.org/10.21105/joss.00848">https://doi.org/10.21105/joss.00848</a>.
</p>
Binary file modified freeze.rds
Binary file not shown.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
},
plugins: [
function(hook) {
var footer = ["<a href='https://vincentarelbundock.github.io/countrycode/'> <code> countrycode </code> v. 1.6.0.9000 </a> | Documentation made with <a href='https://altdoc.etiennebacher.com/'> <code> altdoc </code> v. 0.3.0</a>"].join('');
var footer = ["<a href='https://vincentarelbundock.github.io/countrycode/'> <code> countrycode </code> v. 1.6.0.9000 </a> | Documentation made with <a href='https://altdoc.etiennebacher.com/'> <code> altdoc </code> v. 0.4.0</a>"].join('');

hook.afterEach(function(html) {
return html + footer;
Expand Down
18 changes: 9 additions & 9 deletions man/countrycode.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ belongs.
<table>
<tr>
<td style="white-space: nowrap; font-family: monospace; vertical-align: top">
<code id="countrycode_:_sourcevar">sourcevar</code>
<code id="sourcevar">sourcevar</code>
</td>
<td>
Vector which contains the codes or country names to be converted
Expand All @@ -40,7 +40,7 @@ Vector which contains the codes or country names to be converted
</tr>
<tr>
<td style="white-space: nowrap; font-family: monospace; vertical-align: top">
<code id="countrycode_:_origin">origin</code>
<code id="origin">origin</code>
</td>
<td>
A string which identifies the coding scheme of origin (e.g.,
Expand All @@ -50,7 +50,7 @@ codes.
</tr>
<tr>
<td style="white-space: nowrap; font-family: monospace; vertical-align: top">
<code id="countrycode_:_destination">destination</code>
<code id="destination">destination</code>
</td>
<td>
A string or vector of strings which identify the coding scheme of
Expand All @@ -63,15 +63,15 @@ destination code in the vector.
</tr>
<tr>
<td style="white-space: nowrap; font-family: monospace; vertical-align: top">
<code id="countrycode_:_warn">warn</code>
<code id="warn">warn</code>
</td>
<td>
Prints unique elements from sourcevar for which no match was found
</td>
</tr>
<tr>
<td style="white-space: nowrap; font-family: monospace; vertical-align: top">
<code id="countrycode_:_nomatch">nomatch</code>
<code id="nomatch">nomatch</code>
</td>
<td>
When countrycode fails to find a match for the code of origin, it
Expand All @@ -85,7 +85,7 @@ of the same length as <code>sourcevar</code>.
</tr>
<tr>
<td style="white-space: nowrap; font-family: monospace; vertical-align: top">
<code id="countrycode_:_custom_dict">custom_dict</code>
<code id="custom_dict">custom_dict</code>
</td>
<td>

Expand Down Expand Up @@ -113,7 +113,7 @@ that are accepted as valid origin codes.
</tr>
<tr>
<td style="white-space: nowrap; font-family: monospace; vertical-align: top">
<code id="countrycode_:_custom_match">custom_match</code>
<code id="custom_match">custom_match</code>
</td>
<td>
A named vector which supplies custom origin and destination matches that
Expand All @@ -124,7 +124,7 @@ used as the destination code.
</tr>
<tr>
<td style="white-space: nowrap; font-family: monospace; vertical-align: top">
<code id="countrycode_:_origin_regex">origin_regex</code>
<code id="origin_regex">origin_regex</code>
</td>
<td>
NULL or Logical: When using a custom dictionary, if TRUE then the origin
Expand Down Expand Up @@ -159,7 +159,7 @@ datasets which use different codes.
## Examples

``` r
library(countrycode)
library("countrycode")

library(countrycode)

Expand Down
10 changes: 5 additions & 5 deletions man/countryname.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ characters. Please see the Github page for examples.
<table>
<tr>
<td style="white-space: nowrap; font-family: monospace; vertical-align: top">
<code id="countryname_:_sourcevar">sourcevar</code>
<code id="sourcevar">sourcevar</code>
</td>
<td>
Vector which contains the codes or country names to be converted
Expand All @@ -42,7 +42,7 @@ Vector which contains the codes or country names to be converted
</tr>
<tr>
<td style="white-space: nowrap; font-family: monospace; vertical-align: top">
<code id="countryname_:_destination">destination</code>
<code id="destination">destination</code>
</td>
<td>
Coding scheme of destination (string such as "iso3c" enclosed in quotes
Expand All @@ -51,7 +51,7 @@ Coding scheme of destination (string such as "iso3c" enclosed in quotes
</tr>
<tr>
<td style="white-space: nowrap; font-family: monospace; vertical-align: top">
<code id="countryname_:_nomatch">nomatch</code>
<code id="nomatch">nomatch</code>
</td>
<td>
When countrycode fails to find a match for the code of origin, it
Expand All @@ -65,7 +65,7 @@ of the same length as <code>sourcevar</code>.
</tr>
<tr>
<td style="white-space: nowrap; font-family: monospace; vertical-align: top">
<code id="countryname_:_warn">warn</code>
<code id="warn">warn</code>
</td>
<td>
Prints unique elements from sourcevar for which no match was found
Expand All @@ -76,7 +76,7 @@ Prints unique elements from sourcevar for which no match was found
## Examples

``` r
library(countrycode)
library("countrycode")

x <- c('Afaganisitani', 'Barbadas', 'Sverige', 'UK')
countryname(x)
Expand Down
4 changes: 2 additions & 2 deletions man/get_dictionary.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ argument of <code>countrycode()</code>
<table>
<tr>
<td style="white-space: nowrap; font-family: monospace; vertical-align: top">
<code id="get_dictionary_:_dictionary">dictionary</code>
<code id="dictionary">dictionary</code>
</td>
<td>
A character string that specifies the dictionary to be retrieved. It
Expand All @@ -39,7 +39,7 @@ specified, the function will stop and throw an error message.
## Examples

``` r
library(countrycode)
library("countrycode")

cd <- get_dictionary("us_states")
countrycode::countrycode(c("MO", "MN"), origin = "state.abb", "state.name", custom_dict = cd)
Expand Down
6 changes: 3 additions & 3 deletions man/guess_field.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ between a user-supplied vector and all the codes included in the
<table>
<tr>
<td style="white-space: nowrap; font-family: monospace; vertical-align: top">
<code id="guess_field_:_codes">codes</code>
<code id="codes">codes</code>
</td>
<td>
a vector of country codes or country names
</td>
</tr>
<tr>
<td style="white-space: nowrap; font-family: monospace; vertical-align: top">
<code id="guess_field_:_min_similarity">min_similarity</code>
<code id="min_similarity">min_similarity</code>
</td>
<td>
the function returns all field names where over than
Expand All @@ -42,7 +42,7 @@ vector and the <code>countrycode</code> dictionary.
## Examples

``` r
library(countrycode)
library("countrycode")

# Guess ISO codes
guess_field(c('DZA', 'CAN', 'DEU'))
Expand Down
32 changes: 16 additions & 16 deletions vignettes/countrycode.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,22 +66,22 @@ df1
```

cowcodes var1
1 ALG 81
2 ALB 52
3 UKG 177
4 CAN 132
5 USA 432
1 ALG 492
2 ALB 349
3 UKG 159
4 CAN 388
5 USA 100

``` r
df2
```

isocodes var2
1 12 82
2 8 269
3 826 40
4 124 10
5 840 238
1 12 240
2 8 407
3 826 186
4 124 356
5 840 141

Create a common variable with the iso3c code in each data frame, merge
the data, and create a country identifier:
Expand All @@ -95,11 +95,11 @@ df3
```

iso3c cowcodes var1 isocodes var2 country
1 ALB ALB 52 8 269 Albania
2 CAN CAN 132 124 10 Canada
3 DZA ALG 81 12 82 Algeria
4 GBR UKG 177 826 40 United Kingdom
5 USA USA 432 840 238 United States
1 ALB ALB 349 8 407 Albania
2 CAN CAN 388 124 356 Canada
3 DZA ALG 492 12 240 Algeria
4 GBR UKG 159 826 186 United Kingdom
5 USA USA 100 840 141 United States

## Flags

Expand Down Expand Up @@ -363,7 +363,7 @@ library(countrycode)
df <- eurostat::get_eurostat("nama_10_lp_ulc")
```

Table nama_10_lp_ulc cached at /tmp/RtmpXlN36I/eurostat/e01ff93cc27e3b104a78cc1fe65bef94.rds
Table nama_10_lp_ulc cached at /tmp/RtmpbH9YfW/eurostat/4bd62e4c0347bec11a5d7dd2bdc9542b.rds

``` r
custom_match <- c(EL = 'Greece', UK = 'United Kingdom')
Expand Down

0 comments on commit 1f159b3

Please sign in to comment.