An R package to support the creation of US maps in the R language.
Questions tagged [usmap]
57 questions
1
vote
1 answer
How do I map us-states just by names? In R
In R I have a dataframe that looks like this:
head(map)
mapstates mapdelay
1 Alabama 457
2 Alaska 374
3 Arizona 2852
4 Arkansas 339
5 California 11609
6 Colorado 3298 …

a.henrietty
- 55
- 1
- 1
- 8
1
vote
1 answer
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 to be comparable in terms of color scales. For…

Elsa
- 49
- 1
- 6
0
votes
1 answer
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 server (where I have to be able to run the script in…
0
votes
0 answers
Create upright state map using usmap in R
I have little experience creating maps and trouble understanding all the help documentation. I would like to use usmaps to create a map of counties in New York State only, with data plotted by county, such as the example…
0
votes
0 answers
Having difficulty calculating centroid of US States and calculating angle relative to "Georgia" centroid
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 centroid of the state. here is a picture of the…

Patrick Stephenson
- 88
- 5
0
votes
1 answer
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 centroid of the state. I have 2 issues 1) ggplot2…

Patrick Stephenson
- 88
- 5
0
votes
0 answers
usmap_transform , transforming lat lon leads to "CRS object has comment, which is lost in output"
I upload a list of lat lon coordinates via a csv. I then transformed them before plotting the coordinates within an US map. The Csv is solely a list of lat long coordinates.
It has worked before but now leads to…
0
votes
1 answer
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 those lines that point to the state. My apologies, I…

Sabrina M
- 1
- 1
0
votes
1 answer
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-reported location I mapped to determine the most…

Sabrina M
- 1
- 1
0
votes
0 answers
Plotting points using usmap and ggplot2
I currently have to an excel datasheet of longitudes, latitudes, and a third category called "quarter" and here's how I'm plotting it:
plot_usmap("states")+
labs(title="US Property Deletions by Quarter")+
geom_point(data = long_lats,
…

Ily
- 1
- 1
0
votes
0 answers
ggplot how to plot pie charts on USA map with plot_usmap package or geom_polygon
I want to plot my data over US map and also add pie charts on the map. I used geom_polygon and also plot_usmap with geom_scatterpie but none of them worked. This my data https://iastate.box.com/s/rllzhkfmab475zr4ywur56cd31jhwl8g
f1<-ggplot() +…

Arwen
- 77
- 4
0
votes
1 answer
Problem with plot_usmap package to plot in R
I want to plot my data over US map and I used plot_usmap package but it not working.
this is my data:
dt<- data.frame(fips = c("CA", "AL", "NY","IA", "TX","CA", "AL", "NY","IA", "TX"),
value = c(25, 45, 45, 60, 75,15, 65, 75, 20,…

Arwen
- 77
- 4
0
votes
1 answer
How to make census region border thicker on usmap packake R?
I am looking to display county level data on a US map, but also include those state borders that delimit the census regions (Northeast, Midwest, West and South) to be thicker. In this way, I am trying to make the map represent both the county level…

Agustín Indaco
- 550
- 5
- 17
0
votes
0 answers
how to color code borders of states based on a column in usmap r
Hi i am trying highlight the states that are part of the program in a different color. This information is present in the data as "tag" column. Is it possible to do this in plot_usmap?
The following is currently the code i am using;
…

krishna
- 31
- 1
- 1
0
votes
0 answers
Mapping Amount of Executions per State in R
I am currently working on a project regarding the amount of executions happening in each U.S. state. I am working with the dataset from :https://deathpenaltyinfo.org/executions/execution-database. I used the usmap package from R to generate a map…

PythonG
- 1