Questions tagged [usmap]
An R package to support the creation of US maps in the R language.
usmap
62
questions
0
votes
1
answer
31
views
Error when using usmap package with geom_point
I'm trying to plot the locations of various stations across the U.S. with color of the point corresponding to a certain category. Some of these locations are outside of the continental U.S. (...
0
votes
0
answers
37
views
Interactive R maps that work well on mobile, with inset AK and HI?
Issue: I need an interactive choropleth map of the US that will work well on mobile (ideally pinch-zoom), has a pop-up on tap/click, and has AK and HI set below. Plotly isn't it as you have to tap the ...
1
vote
1
answer
51
views
Plotting old Connecticut county regions in USMAP
Recently, the American Census Bureau changed the geographical entities reported in the state of Connecticut, as discussed here. Previously, data was reported in the following 8 counties:
CT_counties &...
0
votes
2
answers
48
views
Drawing state boundaries in county map in recent version
Using usmap, I have made a plot of values by US counties from some values stored in a variable county. Before I recently updated R and all my packages, I could easily create a county map with thick ...
1
vote
2
answers
286
views
Error when running code examples from usmap r package
I have updated my R to the newest version. Cleared my R environment. I am trying to run this simple code using the usmap package, but keep getting this error.
plot_usmap(data = statepop, values = &...
0
votes
1
answer
113
views
Is there a way in which I can overlay state boundaries with county maps in the usmap R package?
I am trying to have the state boundaries clearly demarcated along with the county wise heat maps. But the state boundaries do not seem prominent. I have tried a couple of different code chunks but ...
0
votes
2
answers
62
views
geom_facet with scales = 'free_y' generates y-axis texts in empty plots
I have a following ggplot2 R code that creates state-specific plot using geofacet package:
ggplot(plotdf, aes(x = year, y = value)) +
geom_line(aes(color = group1), linewidth = 0.6) +
...
1
vote
1
answer
97
views
Error message when converting usmap object to sf object
I am attempting to create a map with county level data in several US states. Since I'm including Alaska, I cannot use the maps::map() function and have elected to use the usmap::us_map() function. The ...
0
votes
1
answer
36
views
Why is plot_usmap not displaying properly on secure server?
I wrote a script to show the number of events in a given county. On my local machine, it displays properly and looks great! But when I run the exact same code on the exact same dataset on a secure ...
1
vote
1
answer
554
views
How can I draw a boundary line around multiple states in a US map in R? [duplicate]
The R package {usmap} provides a convenient way to create maps of the United States using {ggplot2}.
You can easily draw borders around state boundary lines or even county boundary lines.
For example, ...
1
vote
1
answer
361
views
In R use plot_usmap with color and geom_scatterpie together
I want to make a map that has color for each state represent an variable. At same time, I want to add a pie chart for each state while keep the color in the last step.
So far, I can make the colored ...
0
votes
1
answer
53
views
ggplot2 not printing the colours specified inthe dataframe and set as factor levels
I am trying to reproduce a map from W.E.B DuBois with the original colors and values with thin black arrows in each state starting at the bottom right corner of the state polygon and pointing to the ...
2
votes
1
answer
670
views
Using a custom gradient fill based on two different columns
I am trying to have two different fill colors for each US state based on two different columns of my dataset. For this, I am using the counties and coloring half of them which are below the state ...
0
votes
1
answer
83
views
Map Details in R
I have a two-part question:
I am struggling to figure out how to make the Northeast United States' abbreviations on my map smaller so they actually fit in the state boundaries, or if I could make ...
0
votes
1
answer
2k
views
How to add state abbreviations to a map in R
I am attempting to add a layer with state abbreviations to this map:
US Map-- user locations represented by heat plot; no state name abbreviations
I have a list of users from a suvery whose self-...