Skip to main content

Questions tagged [usmap]

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

usmap
3 votes
2 answers
836 views

How merge specific states together by group with one label in ggplot2 in R?

I want to plot Electric grid map for U.S. So I need to merge specific states together . I want to plot border for those state together but it not working. Also just one label per each group. This is ...
Arwen's user avatar
  • 87
7 votes
2 answers
10k views

Add points to usmap with ggplot in r

I was able to create a US map with this tutorial. When I tried to add additional points to it they all ended up in South Dakota, no matter what I input for data. library(ggplot2) library(usmap) ...
MikeF's user avatar
  • 915
3 votes
2 answers
3k views

How to label numbers instead of names using usmap?

I know usmap has an option label in plot_usmap(). Instead of state names, I want to label some numbers. I guess there should be data related to the coordinate of the state centroids in usmap but I am ...
Dan's user avatar
  • 103
3 votes
1 answer
211 views

Tmap: Cannot create school district map for national level

I want to plot school districts on a national map in R using the library Tmap. I used a shapefile from the official website, the National Center for Education Statistics, for school district ...
Kob's user avatar
  • 167
2 votes
1 answer
680 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
  • 28.1k
1 vote
1 answer
5k views

Defining the scale of the legend for a plot_usmap in R

I am plotting the state-level market-shares of a firm, "SB", in the US using usmap::plot_usmap(). I would like to obtain two comparable plots, one for year 2005 and one for 2013, but I also need them ...
Elsa's user avatar
  • 49