Releases: pdil/usmap
Releases · pdil/usmap
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
size
withlinewidth
inplot_usmap()
documentation, see Issue #89.
Technical Changes
- Internal
usmapdata
functions 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.2
is now a required dependency because of this change.
- Continue
sf
-based map data file migration.- Usage of the
as_sf
parameter inusmapdata
function calls has been removed. - The parameter will be removed from
usmapdata
functions 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.0
sf
-based map data files.- Map data produced by
us_map()
is now returned as ansf
object 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
usmap
functionality. - If something doesn't look right, please open an issue.
- Map data produced by
- Change the output of
usmap_transform()
in accordance with thesf
change mentioned above.- The output data frame now replaces the
lat
/lon
columns with a singlegeometry
column with the transformed points and can be plotted usingggplot2::geom_sf()
. - Review the included examples and
advanced-mapping
vignette for more details.
- The output data frame now replaces the
usmap_transform()
now acceptssf
objects and automatically transforms itsgeometry
column 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
crs
parameter.
- It is now possible to add any geographical features to the plotted map such as rivers, roads, topographical data, etc. using
- Add
usrivers
dataset featuring major US rivers.- The dataset is provided in an
sf
object 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 tocitypop
data 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_names
is 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 thesf
default 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_names
andoutput_names
parameters tousmap_transform
, see Issue #33. - Add
sortAndRemoveDuplicates
parameter 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
usmap
package 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_usmap
to "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.
usmap 0.5.1
- New website for the package: https://usmap.dev
- Lightweight landing page containing useful information, links, and examples of usmap usage.
state
can now be omitted when usingfips()
. In this case, all available FIPS codes are returned, sorted by state abbreviation, see Issue #28.fips
can now be omitted when usingfips_info()
. In this case, all available states are returned, sorted by state abbreviation, see Issue #28.- Fix duplicate coordinates from being removed during
usmap_transform
(if value columns differ), see Issue #32. - Prevent warnings introduced by
ggplot2
v3.3.0, see Issue #35. - Set minimum R version to 3.5.0. Versions lower than this do not support the latest version of the
rgdal
package.
usmap 0.5.0
New Features
- Ability to include county name labels on county maps, see Issue #14.
- They currently work the same as state labels except they include the full county name (excluding the word "County").
- Ability to pass
ggplot2::geom_polygon()
parameters toplot_usmap()
, see Issue #15.- This is a breaking change and removes the
lines
parameter. The previous defaults ofcolor="black"
,fill="white"
, andsize=0.4
are maintained and will be used for any of those parameters that are omitted. - Refer to the
ggplot2::geom_polygon()
documentation for more information. - The following aesthetics are supported:
alpha
,colour
/color
,fill
,linetype
,size
- This feature provides more direct control over the appearance of plots.
- This is a breaking change and removes the
- Ability to exclude counties and states with new
exclude
parameter inus_map
,map_with_data
, andplot_usmap
, see Issue #19. - New function (
usmap_transform
) to transform longitude/latitude point data frames into coordinate reference system that matches the plotted map, see Issue #21.- Also includes
usmap_crs()
to easily access the coordinate reference system used by the package.
- Also includes
Improvements
- In the data frames provided by
us_map()
,long
andlat
have been renamed tox
andy
, respectively, see Issue #16.- This should not affect the behavior of
plot_usmap()
but will be a breaking change for any code that relies onus_map()
.
- This should not affect the behavior of
- Added contributing guidelines and templates, see Issue #24.
- These can be see in the .github folder.