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