-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update documentation and templates (#96)
* Added separate package documentation file to standardize with `usmapdata`. * `usethis::use_package_doc()` was utilized * Updated issue and pull request templates. * Set explanatory notes to be commented so they don't appear in the body of the issue/pull request.
- Loading branch information
Showing
15 changed files
with
84 additions
and
67 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
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 was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
### Changes | ||
<!-- List the changes made by the pull request and rationale where applicable --> | ||
* | ||
* | ||
* | ||
|
||
### Notes | ||
<!-- | ||
List any other related notes, | ||
e.g. how to test the changes or any known issues | ||
--> | ||
* | ||
* | ||
* | ||
|
||
<!-- Include the issue number here if applicable --> | ||
resolves # | ||
|
||
@pdil |
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#' Retrieve US map data | ||
#' | ||
#' @param regions The region breakdown for the map, can be one of | ||
#' (\code{"states"}, \code{"state"}, \code{"counties"}, \code{"county"}). | ||
#' The default is \code{"states"}. | ||
#' @param include The regions to include in the resulting map. If \code{regions} is | ||
#' \code{"states"}/\code{"state"}, the value can be either a state name, abbreviation or FIPS code. | ||
#' For counties, the FIPS must be provided as there can be multiple counties with the | ||
#' same name. If states are provided in the county map, only counties in the included states | ||
#' will be returned. | ||
#' @param exclude The regions to exclude in the resulting map. If \code{regions} is | ||
#' \code{"states"}/\code{"state"}, the value can be either a state name, abbreviation or FIPS code. | ||
#' For counties, the FIPS must be provided as there can be multiple counties with the | ||
#' same name. The regions listed in the \code{include} parameter are applied first and the | ||
#' \code{exclude} regions are then removed from the resulting map. Any excluded regions | ||
#' not present in the included regions will be ignored. | ||
#' | ||
#' @seealso [usmapdata::us_map()] of which this function is a wrapper for. | ||
#' | ||
#' @return A data frame of US map coordinates divided by the desired \code{regions}. | ||
#' | ||
#' @examples | ||
#' str(us_map()) | ||
#' | ||
#' df <- us_map(regions = "counties") | ||
#' west_coast <- us_map(include = c("CA", "OR", "WA")) | ||
#' | ||
#' south_atl_excl_FL <- us_map(include = .south_atlantic, exclude = "FL") | ||
#' @export | ||
us_map <- function(regions = c("states", "state", "counties", "county"), | ||
include = c(), | ||
exclude = c()) { | ||
usmapdata::us_map(regions = regions, include = include, exclude = exclude) | ||
} |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
|
||
test_that("all states returned when no FIPS specified", { | ||
expect_equal(fips_info()$fips, fips()) | ||
}) | ||
|
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
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,3 @@ | ||
|
||
test_that("dependencies are verified", { | ||
expect_package_error("ggplot2", plot_usmap()) | ||
}) | ||
|
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,3 @@ | ||
|
||
test_that("state data frame is returned", { | ||
data <- us_map() | ||
|
||
|