Skip to content

Commit

Permalink
docute
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentarelbundock committed Nov 13, 2023
1 parent dc1ab34 commit 8e7910c
Show file tree
Hide file tree
Showing 8 changed files with 132 additions and 172 deletions.
46 changes: 0 additions & 46 deletions altdoc/docsify.html

This file was deleted.

6 changes: 0 additions & 6 deletions altdoc/docsify.md

This file was deleted.

49 changes: 49 additions & 0 deletions altdoc/docute.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>$ALTDOC_PACKAGE_NAME</title>
<link rel="stylesheet" href="https://unpkg.com/docute@4/dist/docute.css">
<!-- Reduce space between sections and subsections -->
<style>
.page-content h2 {
margin-top: 2em;
}
.page-content.has-page-title>h2:first-child {
margin-top: 2em;
}
.page-content h3 {
margin-top: 2em;
}
.page-content.has-page-title>h3:first-child {
margin-top: 2em;
}
</style>
</head>
<body>
<div id="docute"></div>
<script src="https://unpkg.com/docute@4/dist/docute.js"></script>
<script>
new Docute({
target: '#docute',
title: '$ALTDOC_PACKAGE_NAME',
highlight: ['r'],
darkThemeToggler: true,
nav: [
{title: 'Home', link: '/' },
{title: 'GitHub', link: '$ALTDOC_PACKAGE_URL_GITHUB' },
],
sidebar: [
{title: 'Home', link: '/'},
{title: 'Changelog', link: '$ALTDOC_NEWS'},
$ALTDOC_VIGNETTE_BLOCK
$ALTDOC_MAN_BLOCK
{title: 'Code of Conduct', link: '$ALTDOC_CODE_OF_CONDUCT'},
{title: 'License', link: '$ALTDOC_LICENSE'}
],
footer: "<a href='$ALTDOC_PACKAGE_URL'> <code> $ALTDOC_PACKAGE_NAME </code> v. $ALTDOC_PACKAGE_VERSION </a> | Documentation made with <a href='https://altdoc.etiennebacher.com/'> <code> altdoc </code> v. $ALTDOC_VERSION</a>"
})
</script>
</body>
</html>
2 changes: 2 additions & 0 deletions docs/NEWS.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# countrycode 1.5.0.9000

- Important speed-up for detection of country names using regular expressions (Thanks to Etienne Bacher).
- `countryname` gets the `nomatch` argument.
- `countryname` returns NA when the code does not support a given country. (Issue [#336](https://github.com/vincentarelbundock/countrycode/issues/336))
- Improved regex for Italy

## countrycode 1.5.0

Expand Down
17 changes: 0 additions & 17 deletions docs/_sidebar.md

This file was deleted.

30 changes: 15 additions & 15 deletions docs/articles/countrycode.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,22 +65,22 @@ df1
```

cowcodes var1
1 ALG 8
2 ALB 372
3 UKG 377
4 CAN 312
5 USA 115
1 ALG 203
2 ALB 158
3 UKG 157
4 CAN 405
5 USA 110

``` r
df2
```

isocodes var2
1 12 334
2 8 100
3 826 3
4 124 445
5 840 297
1 12 472
2 8 483
3 826 126
4 124 268
5 840 212

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

iso3c cowcodes var1 isocodes var2 country
1 ALB ALB 372 8 100 Albania
2 CAN CAN 312 124 445 Canada
3 DZA ALG 8 12 334 Algeria
4 GBR UKG 377 826 3 United Kingdom
5 USA USA 115 840 297 United States
1 ALB ALB 158 8 483 Albania
2 CAN CAN 405 124 268 Canada
3 DZA ALG 203 12 472 Algeria
4 GBR UKG 157 826 126 United Kingdom
5 USA USA 110 840 212 United States

## Flags

Expand Down
46 changes: 0 additions & 46 deletions docs/docsify.html

This file was deleted.

108 changes: 66 additions & 42 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -1,45 +1,69 @@
<!-- index.html -->

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta charset="UTF-8">
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify@4/themes/vue.css" />
</head>
<body>
<div id="app"></div>
<script>
window.$docsify = {
name: 'countrycode',
loadSidebar: true,
subMaxLevel: 2,
search: {
placeholder: 'Search',
depth: 3,
},
sidebarDisplayLevel: 4,
auto2top: true,
copyCode: {
buttonText : 'Copy',
errorText : 'Error',
successText: 'Copied'
},
plugins: [
function(hook) {
var footer = ["<a href='https://vincentarelbundock.github.io/countrycode/'> <code> countrycode </code> v. 1.5.0.9000 </a> | Documentation made with <a href='https://altdoc.etiennebacher.com/'> <code> altdoc </code> v. 0.2.2.9004</a>"].join('');

hook.afterEach(function(html) {
return html + footer;
});
}
]
}
</script>
<script src="//cdn.jsdelivr.net/npm/docsify@4"></script>
<script src="//cdn.jsdelivr.net/npm/docsify-copy-code"></script>
<script src="//cdn.jsdelivr.net/npm/[email protected]/components/prism-r.js"></script>
<script src="//unpkg.com/docsify/lib/plugins/search.min.js"></script>
</body>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>countrycode</title>
<link rel="stylesheet" href="https://unpkg.com/docute@4/dist/docute.css">
<!-- Reduce space between sections and subsections -->
<style>
.page-content h2 {
margin-top: 2em;
}
.page-content.has-page-title>h2:first-child {
margin-top: 2em;
}
.page-content h3 {
margin-top: 2em;
}
.page-content.has-page-title>h3:first-child {
margin-top: 2em;
}
</style>
</head>
<body>
<div id="docute"></div>
<script src="https://unpkg.com/docute@4/dist/docute.js"></script>
<script>
new Docute({
target: '#docute',
title: 'countrycode',
highlight: ['r'],
darkThemeToggler: true,
nav: [
{title: 'Home', link: '/' },
],
sidebar: [
{title: 'Home', link: '/'},
{title: 'Changelog', link: '/NEWS'},
{
title: 'Articles',
children:
[
{title: 'Contributions', link: '/articles/contributions.md'},
{title: 'Country codes', link: '/articles/countrycode.md'},
{title: 'Country names', link: '/articles/countryname.md'},
{title: 'Custom conversion functions', link: '/articles/custom.md'},
]
},
{
title: 'Reference',
children:
[
{title: 'cldr_examples', link: '/man/cldr_examples.md'},
{title: 'codelist_panel', link: '/man/codelist_panel.md'},
{title: 'codelist', link: '/man/codelist.md'},
{title: 'countrycode-package', link: '/man/countrycode-package.md'},
{title: 'countrycode', link: '/man/countrycode.md'},
{title: 'countryname_dict', link: '/man/countryname_dict.md'},
{title: 'countryname', link: '/man/countryname.md'},
{title: 'get_dictionary', link: '/man/get_dictionary.md'},
{title: 'guess_field', link: '/man/guess_field.md'},
]
},
],
footer: "<a href='https://vincentarelbundock.github.io/countrycode/'> <code> countrycode </code> v. 1.5.0.9001 </a> | Documentation made with <a href='https://altdoc.etiennebacher.com/'> <code> altdoc </code> v. 0.2.2.9004</a>"
})
</script>
</body>
</html>

0 comments on commit 8e7910c

Please sign in to comment.