Releases: pdil/usmap
usmap 1.0.0
Introducing usmap 1.0.0! This week we celebrated 10 years since the first commit to this project. It has been quite a ride and usmap has grown greatly over the years. To everyone who has supported the project in any way, either by reporting issues, contributing code, or just using the package in your work, thank you so much.
I'm happy to announce that with this version we have finally added Puerto Rico! This addition has been years in the making and its now available throughout usmap.
New Features
- Add Puerto Rico support to all
usmapfunctions (where relevant), see Issue #20.- All included map years have been retroactively updated to include Puerto Rico, so any valid value of
data_yearwill include Puerto Rico if desired. - Functions now return Puerto Rico in their data sets and it can be included or excluded just like any state (using FIPS, full name, abbreviation, etc.).
- Puerto Rican municipalities will be shown when using
"county"map variants. - By default, Puerto Rico is not shown when using
plot_usmap()unless it is specifically included with theincludeparameter. This default behavior can be changed by setting the environment variableUSMAP_DEFAULT_EXCLUDE_PR = FALSE. Setting this parameter will include Puerto Rico by default when callingplot_usmap()unless specifically excluded with theexcludeparameter. - Special thanks @dcaud who started this work years ago.
- All included map years have been retroactively updated to include Puerto Rico, so any valid value of
Improvements
- Improve documentation and vignettes.
Full Changelog: v0.8.0...v1.0.0
usmap 0.8.0
New Features
- Add
data_yearparameter tofips(),fips_info(),map_with_data(),plot_usmap(), andus_map(), see Issue #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.
- Going forward, each year will be added to
usmapdata(usmap's data repository) and previous years can be accessed with this parameter. usmapdata v0.4.0or later is required to use this parameter.- If the value provided via
data_yearis 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.
- For example, if data sets 2022 and 2023 are available and the user calls
- Further reading on the impetus for this change: major changes made to Connecticut counties in 2023.
- The old Connecticut counties are available in the 2021 data, 2022 and forward use the new planning regions.
Improvements
- Update package author email.
Full Changelog: v0.7.1...v0.8.0
usmap 0.7.1
Improvements
- Add citation information to README, see Issue #86.
- Update map theme to work with new legend behavior in ggplot2 3.5.0.
- Update provided population and poverty (county & state) data sets, see Issue #88.
- Previous data sets from 2015 and 2014, respectively have been updated to 2022 and 2021 versions, respectively.
- The main change (besides numerical values) is that Connecticut now has the correct FIPS codes in the 2022 county population data set. See this Federal Register document for more information. The 2021 county data does not include CT updates yet since the new FIPS codes were not made effective until 2022. Poverty data for 2022 is not available yet so the most recently available data from 2021 is included for now.
Documentation
- Replace
sizewithlinewidthinplot_usmap()documentation, see Issue #89.
Technical Changes
- Internal
usmapdatafunctions are used for data transformation (i.e.usmap_transform()) values for consistency.- This allows the same values used to create the map to be used when transforming external data.
- Values will now only have to be updated in one place.
usmapdata 0.2.2is now a required dependency because of this change.
- Continue
sf-based map data file migration.- Usage of the
as_sfparameter inusmapdatafunction calls has been removed. - The parameter will be removed from
usmapdatafunctions in the future.
- Usage of the
Full Changelog: v0.7.0...v0.7.1
usmap 0.7.0
This is a major new release for usmap. The data has been modernized to be a simple features (sf) object. This will allow for much greater flexibility in the type of data that can be portrayed on the US map. us_map(), plot_usmap(), and usmap_transform() have been updated to work with these new formats. See the examples in the vignettes and README for more information.
Improvements
- Migrate to new
usmapdata 0.2.0sf-based map data files.- Map data produced by
us_map()is now returned as ansfobject instead of a standard data frame. - Allows for further flexibility in manipulation, easier plotting, and reduced file sizes.
- There should be no visible changes to existing
usmapfunctionality. - If something doesn't look right, please open an issue.
- Map data produced by
- Change the output of
usmap_transform()in accordance with thesfchange mentioned above.- The output data frame now replaces the
lat/loncolumns with a singlegeometrycolumn with the transformed points and can be plotted usingggplot2::geom_sf(). - Review the included examples and
advanced-mappingvignette for more details.
- The output data frame now replaces the
usmap_transform()now acceptssfobjects and automatically transforms itsgeometrycolumn to the projection used by this package.- It is now possible to add any geographical features to the plotted map such as rivers, roads, topographical data, etc. using
usmap_transform()before plotting withggplot2::geom_sf(), see Issue #12. - See the provided vignettes and examples for more information.
- Input can now also be in any coordinate reference system, if it is not standard longitude/latitude, it can be specified with the
crsparameter.
- It is now possible to add any geographical features to the plotted map such as rivers, roads, topographical data, etc. using
- Add
usriversdataset featuring major US rivers.- The dataset is provided in an
sfobject and is ready to be transformed withusmap_transform()and plotted withplot_usmap() + ggplot2::geom_sf().
- The dataset is provided in an
- Add visual snapshot tests for more resilient plots, see Issue #80.
- Add state abbreviation (
abbr) column tocitypopdata set. - Update and standardize documentation throughout the page.
- Includes updates to formatting, links, and language.
- Rename vignettes to make them easier to find and read in order.
Bug Fixes
plot_usmap()warnings have been cleaned up, including a defunct warning that didn't make sense.
Removed
output_namesis no longer required as a parameter tousmap_transform().- It continues to exist for compatibility but produces a warning and may be removed in a future version of
usmap. usmap_transform()will output its transformation using thesfdefault of"geometry"as the column name.
- It continues to exist for compatibility but produces a warning and may be removed in a future version of
usmap 0.6.4
Improvements
- Replace local state and county FIPS files with
usmapdata::fips_data().- Single source of truth for this data is now housed in
usmapdata. - Data will be updated in sync with shapefile updates.
- Single source of truth for this data is now housed in
Bug Fixes
- FIPS file change resolves issue with Valdez-Cordova Census Area in Alaska, see Issue #72.
Technical Changes
- Resolve all code-linting warnings.
- Increase test coverage to 100%.
usmap 0.6.3
- Update package author email and website.
usmap 0.6.2
usmap 0.6.1
usmap 0.6.0
New Features
- Add
input_namesandoutput_namesparameters tousmap_transform, see Issue #33. - Add
sortAndRemoveDuplicatesparameter tofips_info, see Issue #47.- The default (
FALSE) value changes existing behavior, to retain existing behavior, change the parameter value toTRUE.
- The default (
Improvements
- Improve map resolution.
- More polygons are shown, this has a marginal increase on the data set file sizes but it is negligible.
- Add shape file update history, see Issue #30.
- Extract map data frame to external usmapdata package to reduce
usmappackage size, see Issue #39.- All existing functions (including
us_map()) should continue to work as usual.
- All existing functions (including
- Add data format examples for
plot_usmapto "Mapping" vignette, see Issue #42.
Bug Fixes
- Fix CRS warnings, see Issue #40.
- Fix
plot_usmap()issue when provided data has"values"column, see Issue #48 and this Stack Overflow question.
usmap 0.5.2
- Update links in documentation.