-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fda5f4b
commit 5ec4c26
Showing
11 changed files
with
121 additions
and
607 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,5 @@ | |
^pkgdown$ | ||
^\.github$ | ||
^README\.Rmd$ | ||
^cran-comments\.md$ | ||
^data-raw$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# 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 | ||
|
||
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@v2 | ||
|
||
- 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,16 +5,21 @@ Authors@R: c( | |
person("Cory", "McCartan", email = "[email protected]", role = "aut"), | ||
person("Christopher T.", "Kenny", email = "[email protected]", role = c("aut", "cre"))) | ||
Description: What the package does (one paragraph). | ||
License: GPL (>= 3) | ||
Encoding: UTF-8 | ||
Roxygen: list(markdown = TRUE) | ||
RoxygenNote: 7.1.2 | ||
Depends: | ||
R (>= 2.10) | ||
Imports: | ||
ggplot2, | ||
scales | ||
URL: https://github.com/alarm-redist/ggredist, | ||
https://alarm-redist.github.io/ggredist | ||
BugReports: https://github.com/alarm-redist/ggredist/issues | ||
Suggests: | ||
sf, | ||
redist, | ||
testthat (>= 3.0.0) | ||
License: MIT + file LICENSE | ||
Encoding: UTF-8 | ||
Roxygen: list(markdown = TRUE) | ||
RoxygenNote: 7.1.2 | ||
URL: https://github.com/alarm-redist/ggredist, | ||
https://alarm-redist.github.io/ggredist/ | ||
BugReports: https://github.com/alarm-redist/ggredist/issues | ||
Config/testthat/edition: 3 | ||
LazyData: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
YEAR: 2022 | ||
COPYRIGHT HOLDER: Cory McCartan and Christopher T. Kenny |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
url: https://alarm-redist.github.io/ggredist | ||
url: https://alarm-redist.github.io/ggredist/ | ||
template: | ||
bootstrap: 5 | ||
bootswatch: yeti | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
## R CMD check results | ||
|
||
0 errors | 0 warnings | 1 note | ||
|
||
* This is a new release. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
library(alarmdata) | ||
library(redist) | ||
library(sf) | ||
library(dplyr) | ||
library(stringr) | ||
|
||
or_map = alarm_50state_map("OR") | ||
|
||
oregon = or_map %>% | ||
as_tibble() %>% | ||
st_as_sf() %>% | ||
filter(area_water / (area_land + area_water) < 0.95) %>% | ||
`attr<-`("analysis_name", NULL) %>% | ||
`attr<-`("pop_col", NULL) %>% | ||
`attr<-`("adj_col", NULL) %>% | ||
`attr<-`("existing_col", NULL) %>% | ||
`attr<-`("pop_bounds", NULL) %>% | ||
mutate(across(pop:pop_black, as.integer), | ||
tract = str_sub(GEOID, 3)) %>% | ||
select(GEOID, county, cd_2020, pop, pop_white, ndv, nrv, geometry) %>% | ||
rmapshaper::ms_simplify(keep=0.03, weighting=0.5, keep_shapes=TRUE) | ||
|
||
usethis::use_data(oregon, overwrite = TRUE, compress="xz") |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters