Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflow-resources/release-pr-body.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

### 📝 Pre-release checklist
- [ ] Review automated changes
- [ ] Review reverse dependency checks (see `release` workflow artifacts)
- [ ] Review reverse dependency checks (see [workflow artifacts]({{ .artifacts_url }}))
- [ ] Review check and test results
- [ ] Verify `DESCRIPTION` and `NEWS.md` are accurate
- [ ] Update `cran-comments.md` if necessary
Expand Down
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: usmap
Version: 0.7.1.9000
Version: 0.8.0.9000
Title: US Maps Including Alaska and Hawaii
Description: Obtain United States map data frames of varying region types (e.g. county,
state). The map data frames include Alaska and Hawaii conveniently placed to the
Expand Down
7 changes: 5 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# [unreleased]

# usmap 0.8.0
Released Wednesday, May 28, 2025.

### New Features
* Add `data_year` parameter to `fips()`, `fips_info()`, `map_with_data()`, `plot_usmap()`, and `us_map()`, see [Issue #110](https://github.com/pdil/usmapdata/issues/110).
* Add `data_year` parameter to `fips()`, `fips_info()`, `map_with_data()`, `plot_usmap()`, and `us_map()`, see [Issue #110](https://github.com/pdil/usmap/issues/110).
* Allows user to select the year for which to plot US map.
* This will allow the user to match the map that is provided to the data they are using.
* To start with, 2021, 2022, 2023, and 2024 maps are included.
Expand All @@ -10,7 +13,7 @@
* If the value provided via `data_year` is not available, the package will select the next year for which data exists.
* For example, if data sets 2022 and 2023 are available and the user calls `us_map(data_year = 2019)`, 2022 will be used.
* A warning is presented when this occurs to alert the user.
* Further reading on the impetus for this change: [major changes made to Connecticut counties in 2023](https://www.ctinsider.com/projects/2023/ct-planning-regions/).
* Further reading on the impetus for this change: [major changes made to Connecticut counties in 2023](https://www.ctinsider.com/projects/2023/ct-planning-regions).
* The old Connecticut counties are available in the 2021 data, 2022 and forward use the new planning regions.

### Improvements
Expand Down
8 changes: 4 additions & 4 deletions R/data.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#' @references
#' \itemize{
#' \item \url{https://www.census.gov/programs-surveys/popest.html}
#' \item \url{https://www.ers.usda.gov/data-products/county-level-data-sets/}
#' \item \url{https://www.ers.usda.gov/data-products/county-level-data-sets}
#' }
#' @keywords data
"countypop"
Expand All @@ -47,7 +47,7 @@
#' @references
#' \itemize{
#' \item \url{https://www.census.gov/programs-surveys/popest.html}
#' \item \url{https://www.ers.usda.gov/data-products/county-level-data-sets/}
#' \item \url{https://www.ers.usda.gov/data-products/county-level-data-sets}
#' }
#' @keywords data
"statepop"
Expand All @@ -74,7 +74,7 @@
#' @references
#' \itemize{
#' \item \url{https://www.census.gov/topics/income-poverty/poverty.html}
#' \item \url{https://www.ers.usda.gov/data-products/county-level-data-sets/}
#' \item \url{https://www.ers.usda.gov/data-products/county-level-data-sets}
#' }
#' @keywords data
"countypov"
Expand All @@ -101,7 +101,7 @@
#' @references
#' \itemize{
#' \item \url{https://www.census.gov/topics/income-poverty/poverty.html}
#' \item \url{https://www.ers.usda.gov/data-products/county-level-data-sets/}
#' \item \url{https://www.ers.usda.gov/data-products/county-level-data-sets}
#' }
#' @keywords data
"statepov"
Expand Down
15 changes: 8 additions & 7 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ west_county_citypop_map <-

# Population by state with labels ####
state_pop_map_labeled <-
plot_usmap(data = statepop, values = "pop_2022", labels = TRUE) +
plot_usmap(data = statepop, values = "pop_2022", labels = TRUE, data_year = 2022) +
scale_fill_continuous(low = "white", high = "red", guide = "none")

# Blank county map (Alaska) ####
Expand All @@ -58,13 +58,13 @@ ak_county_map <-

# Poverty by county (South) ####
south_pov_map <-
plot_usmap("counties", data = countypov, values = "pct_pov_2021",
plot_usmap("counties", data = countypov, values = "pct_pov_2021", data_year = 2021,
include = .south_region, color = "white", size = 0) +
scale_fill_continuous(low = "darkgreen", high = "yellow", guide = "none")

# Poverty percentage by county ####
county_pov_map <-
plot_usmap(data = countypov, values = "pct_pov_2021", size = 0.2) +
plot_usmap(data = countypov, values = "pct_pov_2021", data_year = 2021, size = 0.2) +
scale_fill_continuous(low = "blue", high = "yellow", guide = "none")

# Rivers map ####
Expand Down Expand Up @@ -106,7 +106,7 @@ stored in `usmapdata`, updates are no longer tied to `usmap` versions.

| Date | Available Years |
|------|:---------------:|
| ??? | [2021](https://www.census.gov/geographies/mapping-files/time-series/geo/cartographic-boundary.2021.html), [2022](https://www.census.gov/geographies/mapping-files/time-series/geo/cartographic-boundary.2022.html), [2023](https://www.census.gov/geographies/mapping-files/time-series/geo/cartographic-boundary.2023.html), [2024](https://www.census.gov/geographies/mapping-files/time-series/geo/cartographic-boundary.2024.html) |
| May 28, 2025 | [2021](https://www.census.gov/geographies/mapping-files/time-series/geo/cartographic-boundary.2021.html), [2022](https://www.census.gov/geographies/mapping-files/time-series/geo/cartographic-boundary.2022.html), [2023](https://www.census.gov/geographies/mapping-files/time-series/geo/cartographic-boundary.2023.html), [2024](https://www.census.gov/geographies/mapping-files/time-series/geo/cartographic-boundary.2024.html) |

Prior to `usmap v0.8.0`:

Expand Down Expand Up @@ -179,10 +179,10 @@ library(ggplot2)

mt <- plot_usmap("states", include = .mountain, labels = TRUE)

fl <- plot_usmap("counties", data = countypov, values = "pct_pov_2021", include = "FL") +
fl <- plot_usmap("counties", data = countypov, values = "pct_pov_2021", include = "FL", data_year = 2021) +
scale_fill_continuous(low = "green", high = "red", guide = "none")

ne <- plot_usmap("counties", data = countypop, values = "pop_2022", include = .new_england) +
ne <- plot_usmap("counties", data = countypop, values = "pop_2022", include = .new_england, data_year = 2022) +
scale_fill_continuous(low = "blue", high = "yellow", guide = "none")

cowplot::plot_grid(mt, fl, ne, nrow = 1)
Expand All @@ -202,7 +202,8 @@ river_map <- plot_usmap("counties", color = "gray80") +
scale_linewidth_continuous(range = c(0.3, 1.5), guide = "none")

# Transform included `earthquakes` data set
eq_transformed <- usmap_transform(earthquakes)
earthquakes_above_mag_3 <- earthquakes[earthquakes$mag > 3, ]
eq_transformed <- usmap_transform(earthquakes_above_mag_3)

earthquake_map <- plot_usmap() +
geom_sf(data = eq_transformed, aes(size = mag), color = "red", alpha = 0.25) +
Expand Down
21 changes: 9 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Since data is now stored in `usmapdata`, updates are no longer tied to

| Date | Available Years |
|----|:--:|
| ??? | [2021](https://www.census.gov/geographies/mapping-files/time-series/geo/cartographic-boundary.2021.html), [2022](https://www.census.gov/geographies/mapping-files/time-series/geo/cartographic-boundary.2022.html), [2023](https://www.census.gov/geographies/mapping-files/time-series/geo/cartographic-boundary.2023.html), [2024](https://www.census.gov/geographies/mapping-files/time-series/geo/cartographic-boundary.2024.html) |
| May 28, 2025 | [2021](https://www.census.gov/geographies/mapping-files/time-series/geo/cartographic-boundary.2021.html), [2022](https://www.census.gov/geographies/mapping-files/time-series/geo/cartographic-boundary.2022.html), [2023](https://www.census.gov/geographies/mapping-files/time-series/geo/cartographic-boundary.2023.html), [2024](https://www.census.gov/geographies/mapping-files/time-series/geo/cartographic-boundary.2024.html) |

Prior to `usmap v0.8.0`:

Expand Down Expand Up @@ -121,10 +121,10 @@ library(ggplot2)

mt <- plot_usmap("states", include = .mountain, labels = TRUE)

fl <- plot_usmap("counties", data = countypov, values = "pct_pov_2021", include = "FL") +
fl <- plot_usmap("counties", data = countypov, values = "pct_pov_2021", include = "FL", data_year = 2021) +
scale_fill_continuous(low = "green", high = "red", guide = "none")

ne <- plot_usmap("counties", data = countypop, values = "pop_2022", include = .new_england) +
ne <- plot_usmap("counties", data = countypop, values = "pop_2022", include = .new_england, data_year = 2022) +
scale_fill_continuous(low = "blue", high = "yellow", guide = "none")

cowplot::plot_grid(mt, fl, ne, nrow = 1)
Expand All @@ -145,7 +145,8 @@ river_map <- plot_usmap("counties", color = "gray80") +
scale_linewidth_continuous(range = c(0.3, 1.5), guide = "none")

# Transform included `earthquakes` data set
eq_transformed <- usmap_transform(earthquakes)
earthquakes_above_mag_3 <- earthquakes[earthquakes$mag > 3, ]
eq_transformed <- usmap_transform(earthquakes_above_mag_3)

earthquake_map <- plot_usmap() +
geom_sf(data = eq_transformed, aes(size = mag), color = "red", alpha = 0.25) +
Expand Down Expand Up @@ -280,20 +281,16 @@ required!), you may do so in the following way:
citation("usmap")
#> To cite package 'usmap' in publications use:
#>
#> Di Lorenzo P (2024). _usmap: US Maps Including Alaska and Hawaii_.
#> doi:10.32614/CRAN.package.usmap
#> <https://doi.org/10.32614/CRAN.package.usmap>, R package version
#> 0.7.1, <https://CRAN.R-project.org/package=usmap>.
#> Di Lorenzo P (2025). _usmap: US Maps Including Alaska and Hawaii_. R
#> package version 0.8.0, <https://usmap.dev>.
#>
#> A BibTeX entry for LaTeX users is
#>
#> @Manual{,
#> title = {usmap: US Maps Including Alaska and Hawaii},
#> author = {Paolo {Di Lorenzo}},
#> year = {2024},
#> note = {R package version 0.7.1},
#> url = {https://CRAN.R-project.org/package=usmap},
#> doi = {10.32614/CRAN.package.usmap},
#> note = {R package version 0.8.0},
#> url = {https://usmap.dev},
#> }
```

Expand Down
12 changes: 8 additions & 4 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@

This is a re-submission to fix URL issues caught by the automated checks.

## Test environments
* local macOS install, R 4.3.2
* local macOS install, R 4.5.0

#### On Github Actions
* macOS-latest (release), R 4.3.2
* windows-latest (release), R 4.3.2
* ubuntu-22.04 (oldrel, devel, release), R 4.3.2
* macOS-latest (release), R 4.5.0
* windows-latest (release), R 4.5.0
* ubuntu-22.04 (oldrel, devel, release), R 4.5.0

## R CMD check results

Expand All @@ -18,3 +20,5 @@ R CMD check has been run on the following downstream dependencies of usmap:
* cpsvote
* ecocomDP
* PracTools
* RcensusPkg
* sugarglider
2 changes: 1 addition & 1 deletion inst/WORDLIST
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
Albers
Bartholemew
CRS
Cordova
DCW
Esri
Expand All @@ -20,6 +19,7 @@ Vectorize
choropleth
choropleths
codecov
crs
expandability
fips
ggplot
Expand Down
2 changes: 1 addition & 1 deletion man/countypop.Rd

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

2 changes: 1 addition & 1 deletion man/countypov.Rd

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

Binary file modified man/figures/README-header-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-more_plots-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-sf_plot-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion man/statepop.Rd

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

2 changes: 1 addition & 1 deletion man/statepov.Rd

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

7 changes: 0 additions & 7 deletions revdep/.gitignore

This file was deleted.

24 changes: 0 additions & 24 deletions revdep/README.md

This file was deleted.

7 changes: 0 additions & 7 deletions revdep/cran.md

This file was deleted.

1 change: 0 additions & 1 deletion revdep/failures.md

This file was deleted.

1 change: 0 additions & 1 deletion revdep/problems.md

This file was deleted.