Questions tagged [usmap]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
14 views

Correlation of city population and show on the map

I am new to R and plotting. I have a dataset of US cities with their coordinates and populations. I formed the correlation matrix of the population growth of these cities. Is there a way that I can ...
0
votes
2answers
33 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 ...
2
votes
1answer
24 views

How to remove the borders in usmap plot

I am trying to make a US election map based on the package 'usmap'. The thing is it seems like the package can only do a white background. If I changed the background colour it would show borders. I ...
1
vote
1answer
26 views

Map of New York State counties with binned colors and legend

I am trying to make a county-level map of the state of New York. I would like to color each county based on their level of unionization. I need the map and legend to have four discrete colors of ...
1
vote
1answer
49 views

Putting Values on a County Map in R

I am using an excel sheet for data. One column has FIPS numbers for GA counties and the other is labeled Count with numbers 1 - 5. I have made a map with these values using the following code: library(...
1
vote
1answer
97 views

How to specify bin colors for plot_usmap?

I'm looking to create a heat map with a little more control over the color scale, specifically I want to have bins for ranges of values that will correspond to a specific color. Below I provide some ...
1
vote
1answer
146 views

R:How to display city level data on map and how to ZOOM it on one specific region of the map

I am using usmap and ggplot to plot population on a map. My data has two columns - population and zipcodes. Question: How can I display data on city level using the same libraries or if you know ...
0
votes
0answers
40 views

R Plot_usmap: Want a Continuous Scale (1-250) and set all variables less than 1 to a single color?

Hello StackOF Community, Thanks to anyone who has a look, your help is much appreciated. I am somewhat new to R, and have spent a few days trying to develop a plot that has a continuous scale for all ...
0
votes
1answer
73 views

code issue: Error in `[.data.frame`(result, , c(setdiff(names(result), names(data)), : undefined columns selected

Hi I created a usmap using plot_usmap(regions="counties",data=big.covid,values = "density")+ labs(title="Unweighted Density by County")+ theme(panel.background = element_rect(color="black"))+ ...
0
votes
1answer
222 views

Discrete values in US map legend using plot_usmap

I am plotting a group of "treatment" counties, using usmap::plot_usmap(), such that treatment=1 for the identified counties an 0 otherwise. I would like the legend to reflect the fact that the ...
0
votes
0answers
65 views

Trouble using plot_usmap() function in usmap package

I have decided to brush up on my map making skills and am using the publicly available COVID data from: https://www.kaggle.com/sudalairajkumar/covid19-in-usa Below is my code: USdata <- ...
0
votes
0answers
53 views

Rotating a map using plot_usmap and ggplot2 in R

I am trying to create a map which shows a gradient in area of protected areas (ha) in counties across Tennessee. I was able to create the map using the following code: protectmap<- plot_usmap("...
0
votes
0answers
85 views

Removing county boundaries with usmap function

I am using the usmap package in R to create a heat map of the United States. My data are at the county/fips level. I have successfully rendered them into a map but would like to remove the county ...
2
votes
1answer
193 views

How do I change state or counties label sizes in R with the function usmap?

I am trying to map New Mexico with each county labeled, but the label size is always much larger than desired. Here is the code I have used so far. plot_usmap("counties", include=("NM"), labels=TRUE,...
1
vote
1answer
21 views

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 ...

15 30 50 per page