Skip to content

Commit

Permalink
update docs + minor patches (#82)
Browse files Browse the repository at this point in the history
- Update DESCRIPTION with _prepr_ package information.
- Update README with Chromium dependencies.
- Update global example global processing script with increased precision.
- Update vignette to be compatible with changes to GADM website.
- Fix issue with tests leaving left-over junk in temporary directories.
  • Loading branch information
jeffreyhanson committed May 11, 2024
1 parent a05ce92 commit 8d08bfa
Show file tree
Hide file tree
Showing 31 changed files with 273 additions and 222 deletions.
9 changes: 5 additions & 4 deletions DESCRIPTION
@@ -1,14 +1,14 @@
Package: wdpar
Type: Package
Version: 1.3.7.2
Version: 1.3.7.3
Title: Interface to the World Database on Protected Areas
Description: Fetch and clean data from the World Database on Protected
Areas (WDPA) and the World Database on Other Effective Area-Based
Conservation Measures (WDOECM). Data is obtained from Protected Planet
<https://www.protectedplanet.net/en>. To augment data cleaning procedures,
users can install the 'prepr' R package (available at
<https://github.com/dickoa/prepr>). For more information on this package,
see Hanson (2022) <doi:10.21105/joss.04594>.
<https://github.com/prioritizr/prepr>). For more information on this
package, see Hanson (2022) <doi:10.21105/joss.04594>.
Authors@R: c(person(c('Jeffrey', 'O'), 'Hanson',
email='jeffrey.hanson@uqconnect.edu.au', role = c('aut', 'cre')))
Imports:
Expand All @@ -24,7 +24,8 @@ Imports:
lwgeom (>= 0.2-1),
tibble (>= 2.1.3),
pingr (>= 1.1.2),
rappdirs (>= 0.3.1)
rappdirs (>= 0.3.1),
withr (>= 3.0.0)
Suggests:
testthat (>= 2.0.1),
knitr (>= 1.2.0),
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -96,7 +96,7 @@ paper_case_study:
mv case-study.Rout paper/case-study.Rout
rm -f Rplots.pdf

wdpa_global: install
wdpa_global:
R CMD BATCH --no-restore --no-save inst/scripts/global-example-script.R

.PHONY: initc vigns clean data docs readme site test check checkwb build install man spellcheck examples wdpa_global paper purl_vigns paper_case_study
1 change: 1 addition & 0 deletions NAMESPACE
Expand Up @@ -10,3 +10,4 @@ export(wdpa_read)
export(wdpa_url)
import(sf)
importFrom(rappdirs,user_data_dir)
importFrom(withr,defer)
12 changes: 11 additions & 1 deletion NEWS.md
@@ -1,7 +1,17 @@
# wdpar 1.3.7.3

- Fix issues with `wdpa_fetch()` and `wdpa_read()` on MacOS.
Thanks to Jason Everett (@jaseeverett) for code contribution.
- Update DESCRIPTION with _prepr_ package information.
- Update README with Chromium dependencies.
- Update global example global processing script with increased precision.
- Update vignette to be compatible with changes to GADM website.
- Fix issue with tests leaving left-over junk in temporary directories.

# wdpar 1.3.7.2

- Update `wdpa_fetch()` to use the _chromote_ package to handle web scrapping
(instead of _webdriver_).
(instead of the _webdriver_ package).
- Update `wdpa_fetch()` so that it can download country-level data in either
shapefile or file geodatabase format (using the new `datatype` parameter).
Since file geodatabase data appears to be more robust, `wdpa_fetch()`
Expand Down
1 change: 1 addition & 0 deletions R/package.R
Expand Up @@ -38,4 +38,5 @@ NULL

# avoid false positive NOTEs during CRAN checks
#' @importFrom rappdirs user_data_dir
#' @importFrom withr defer
NULL
11 changes: 6 additions & 5 deletions README.Rmd
Expand Up @@ -61,30 +61,31 @@ Note that the _prepr R_ package has system dependencies that need to be installe

##### _Windows_

The [Rtools](https://cran.r-project.org/bin/windows/Rtools/) software needs to be installed to install the _prepr R_ package package from source. This software provides system requirements from [rwinlib](https://github.com/rwinlib/).
A Chromium-based web browser to be installed (e.g., Google Chrome, Chromium, Brave). Also, the [Rtools](https://cran.r-project.org/bin/windows/Rtools/) software needs to be installed to install the _prepr R_ package package from source. This software provides system requirements from [rwinlib](https://github.com/rwinlib/).

##### _Ubuntu_

The `gmp`, `mpfr`, and several spatial libraries need to be installed. For recent versions of Ubuntu (18.04 and later), these libraries are available through official repositories. They can be installed using the following system commands:
A Chromium-based web browser to be installed (e.g., Google Chrome, Chromium, Brave). Also, the `gmp`, `mpfr`, and several spatial libraries need to be installed. For recent versions of Ubuntu (18.04 and later), these libraries are available through official repositories. They can be installed using the following system commands:

```
apt-get -y update
apt-get install -y libgmp3-dev libmpfr-dev libudunits2-dev libgdal-dev libgeos-dev libproj-dev
apt-get install -y libgmp3-dev libmpfr-dev libudunits2-dev libgdal-dev libgeos-dev libproj-dev chromium-browser
```

##### _Linux_

For Unix-alikes, `gmp` (>= 4.2.3), `mpfr` (>= 3.0.0), and `gdal` (>= 3.2.2) are required.
For Unix-alikes, a Chromium-based web browser (e.g., Google Chrome, Chromium, Brave), `gmp` (>= 4.2.3), `mpfr` (>= 3.0.0), and `gdal` (>= 3.2.2) are required.

##### _macOS_

The `gmp`, `mpfr`, and `gdal` libraries are required. The easiest way to install these libraries is using [HomeBrew](https://brew.sh/). After installing HomeBrew, these libraries can be installed using the following commands in the system terminal:
A Chromium-based web browser to be installed (e.g., Google Chrome, Chromium, Brave). Also, the `gmp`, `mpfr`, and `gdal` libraries are required. The easiest way to install these libraries is using [HomeBrew](https://brew.sh/). After installing HomeBrew, these libraries can be installed using the following commands in the system terminal:

```
brew install pkg-config
brew install gmp
brew install mpfr
brew install gdal
brew install --cask chromium
```

### Usage
Expand Down
38 changes: 22 additions & 16 deletions README.md
Expand Up @@ -93,37 +93,43 @@ platform-specific instructions).

##### *Windows*

The [Rtools](https://cran.r-project.org/bin/windows/Rtools/) software
needs to be installed to install the *prepr R* package package from
source. This software provides system requirements from
A Chromium-based web browser to be installed (e.g., Google Chrome,
Chromium, Brave). Also, the
[Rtools](https://cran.r-project.org/bin/windows/Rtools/) software needs
to be installed to install the *prepr R* package package from source.
This software provides system requirements from
[rwinlib](https://github.com/rwinlib/).

##### *Ubuntu*

The `gmp`, `mpfr`, and several spatial libraries need to be installed.
For recent versions of Ubuntu (18.04 and later), these libraries are
available through official repositories. They can be installed using the
following system commands:
A Chromium-based web browser to be installed (e.g., Google Chrome,
Chromium, Brave). Also, the `gmp`, `mpfr`, and several spatial libraries
need to be installed. For recent versions of Ubuntu (18.04 and later),
these libraries are available through official repositories. They can be
installed using the following system commands:

apt-get -y update
apt-get install -y libgmp3-dev libmpfr-dev libudunits2-dev libgdal-dev libgeos-dev libproj-dev
apt-get install -y libgmp3-dev libmpfr-dev libudunits2-dev libgdal-dev libgeos-dev libproj-dev chromium-browser

##### *Linux*

For Unix-alikes, `gmp` (&gt;= 4.2.3), `mpfr` (&gt;= 3.0.0), and `gdal`
For Unix-alikes, a Chromium-based web browser (e.g., Google Chrome,
Chromium, Brave), `gmp` (&gt;= 4.2.3), `mpfr` (&gt;= 3.0.0), and `gdal`
(&gt;= 3.2.2) are required.

##### *macOS*

The `gmp`, `mpfr`, and `gdal` libraries are required. The easiest way to
install these libraries is using [HomeBrew](https://brew.sh/). After
installing HomeBrew, these libraries can be installed using the
following commands in the system terminal:
A Chromium-based web browser to be installed (e.g., Google Chrome,
Chromium, Brave). Also, the `gmp`, `mpfr`, and `gdal` libraries are
required. The easiest way to install these libraries is using
[HomeBrew](https://brew.sh/). After installing HomeBrew, these libraries
can be installed using the following commands in the system terminal:

brew install pkg-config
brew install gmp
brew install mpfr
brew install gdal
brew install --cask chromium

### Usage

Expand Down Expand Up @@ -178,7 +184,7 @@ head(mlt_pa_data)
## Simple feature collection with 6 features and 32 fields
## Geometry type: MULTIPOLYGON
## Dimension: XY
## Bounding box: xmin: 1382584 ymin: 4280853 xmax: 1394227 ymax: 4299615
## Bounding box: xmin: 1382584 ymin: 4280853 xmax: 1390560 ymax: 4299615
## Projected CRS: +proj=cea +lon_0=0 +lat_ts=30 +x_0=0 +y_0=0 +datum=WGS84 +ellps=WGS84 +units=m +no_defs
## Precision: 1500
## # A tibble: 6 × 33
Expand All @@ -188,8 +194,8 @@ head(mlt_pa_data)
## 2 194420 194420 PA Filf… Filfla Rise… Nature R… National Ia
## 3 555588631 555588631 PA Il-M… Il-Majji… Park… National… National II
## 4 174758 174758 PA Bidn… Bidnija,… List… List of … National III
## 5 194415 194415 PA 'Il-… 'Il-Ġonn… List… List of … National III
## 6 194418 194418 PA Il-B… Il-Ballu… List… List of … National III
## 5 194418 194418 PA Il-B… Il-Ballu… List… List of … National III
## 6 194417 194417 PA 'Il-… 'Il-Wied… List… List of … National III
## # ℹ 24 more variables: INT_CRIT <chr>, MARINE <chr>, REP_M_AREA <dbl>,
## # GIS_M_AREA <dbl>, REP_AREA <dbl>, GIS_AREA <dbl>, NO_TAKE <chr>,
## # NO_TK_AREA <dbl>, STATUS <chr>, STATUS_YR <dbl>, GOV_TYPE <chr>,
Expand Down
2 changes: 1 addition & 1 deletion docs/404.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/CONTRIBUTING.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/LICENSE-text.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/articles/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8d08bfa

Please sign in to comment.