Skip to main content

Questions tagged [usmap]

An R package to support the creation of US maps in the R language.

usmap
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. (...
porathjb's user avatar
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 ...
Rine's user avatar
  • 11
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 &...
Eff's user avatar
  • 155
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 ...
Eff's user avatar
  • 155
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 = &...
Katie Worrall's user avatar
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 ...
Anupam Ghosh's user avatar
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) + ...
Dai's user avatar
  • 65
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 ...
M3Lba's user avatar
  • 119
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 ...
Elizabeth Breen's user avatar
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, ...
duckmayr's user avatar
  • 16.7k
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 ...
Sam's user avatar
  • 11
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 ...
Patrick Stephenson's user avatar
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 ...
M--'s user avatar
  • 27.9k
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 ...
Sabrina M's user avatar
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-...
Sabrina M's user avatar

15 30 50 per page
1
2 3 4 5