Skip to content

Commit

Permalink
Update description and readme.
Browse files Browse the repository at this point in the history
  • Loading branch information
darrennorris committed Jul 2, 2024
1 parent f43266b commit f9df404
Show file tree
Hide file tree
Showing 5 changed files with 131 additions and 9 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

name: R-CMD-check

permissions: read-all

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: macos-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
needs: check

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Package: testmap
Title: What the Package Does (One Line, Title Case)
Title: Population projection maps for the Yellow-spotted River Turtle
Version: 0.0.0.9000
Authors@R:
person("First", "Last", , "first.last@example.com", role = c("aut", "cre"),
comment = c(ORCID = "YOUR-ORCID-ID"))
person("Darren", "Norris", , "dnorris75@gmail.com", role = c("aut", "cre"),
comment = c(ORCID = "0000-0003-0015-8214"))
Description: What the package does (one paragraph).
License: GPL (>= 3)
Encoding: UTF-8
Expand Down
24 changes: 22 additions & 2 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,26 @@ knitr::opts_chunk$set(
# testmap

<!-- badges: start -->
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![pkgdown](https://github.com/darrennorris/testmap/workflows/pkgdown/badge.svg)](https://github.com/darrennorris/eprdados/actions)
[![R-CMD-check](https://github.com/darrennorris/testmap/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/darrennorris/testmap/actions/workflows/R-CMD-check.yaml)
<!-- badges: end -->

The goal of testmap is to ...
The goal of testmap is to present projected future population changes of
**Podocnemis unifilis**.

Maps of the projected future changes can be found online.

- 3 generation.
Predicted changes after 42 years: https://darrennorris.github.io/testmap/articles/Interactive-map.html

## Installation

You can install the development version of testmap like so:

``` r
# FILL THIS IN! HOW CAN PEOPLE INSTALL YOUR DEV PACKAGE?
install.packages("remotes")
remotes::install_github("darrennorris/testmap")
```

## Example
Expand All @@ -52,3 +62,13 @@ plot(pressure)
```

In that case, don't forget to commit and push the resulting figure files, so they display on GitHub and CRAN.

Package developed and built using the following guides:

* Fan Wang: https://fanwangecon.github.io/PkgTestR/articles/ffv_pkgdown_github.html
and

* Emil Hvitfeldt: https://emilhvitfeldt.com/post/2018-09-02-usethis-workflow-for-package-development/
and

* Saskia O: https://www.marinedatascience.co/blog/2020/01/09/checklist-for-r-package-re-submissions-on-cran/
30 changes: 28 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,29 @@
# testmap

<!-- badges: start -->

[![Lifecycle:
experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![pkgdown](https://github.com/darrennorris/testmap/workflows/pkgdown/badge.svg)](https://github.com/darrennorris/eprdados/actions)
[![R-CMD-check](https://github.com/darrennorris/testmap/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/darrennorris/testmap/actions/workflows/R-CMD-check.yaml)
<!-- badges: end -->

The goal of testmap is to …
The goal of testmap is to present projected future population changes of
**Podocnemis unifilis**.

Maps of the projected future changes can be found online.

- 3 generation.
Predicted changes after 42 years:
<https://darrennorris.github.io/testmap/articles/Interactive-map.html>

## Installation

You can install the development version of testmap like so:

``` r
# FILL THIS IN! HOW CAN PEOPLE INSTALL YOUR DEV PACKAGE?
install.packages("remotes")
remotes::install_github("darrennorris/testmap")
```

## Example
Expand Down Expand Up @@ -48,3 +61,16 @@ You can also embed plots, for example:

In that case, don’t forget to commit and push the resulting figure
files, so they display on GitHub and CRAN.

Package developed and built using the following guides:

- Fan Wang:
<https://fanwangecon.github.io/PkgTestR/articles/ffv_pkgdown_github.html>
and

- Emil Hvitfeldt:
<https://emilhvitfeldt.com/post/2018-09-02-usethis-workflow-for-package-development/>
and

- Saskia O:
<https://www.marinedatascience.co/blog/2020/01/09/checklist-for-r-package-re-submissions-on-cran/>
28 changes: 26 additions & 2 deletions vignettes/Interactive-map.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ knitr::opts_chunk$set(
)
```

```{r setup}
```{r setup, echo=FALSE}
library(testmap)
```

Expand All @@ -38,7 +38,31 @@ pal <- colorFactor(
palette = c("#7274C1", "#A3720E"),
domain = points_bau4326$flag_50_42y
)
# basemap with tile control. not working.
basemap <- leaflet::leaflet() %>%
# add different provider tiles
addProviderTiles(
"OpenStreetMap",
# give the layer a name
group = "OpenStreetMap"
) %>%
addProviderTiles(
"Stamen.Terrain",
group = "Stamen.Terrain"
) %>%
addProviderTiles(
"Esri.WorldImagery",
group = "Esri.WorldImagery"
) %>%
# add a layers control
addLayersControl(
baseGroups = c(
"OpenStreetMap", "Stamen.Terrain", "Esri.WorldImagery"
),
# position it on the topleft
position = "topleft"
)
# interactive map
leaflet::leaflet(data = points_bau4326) |>
addTiles() |>
Expand Down

0 comments on commit f9df404

Please sign in to comment.