Questions tagged [usmap]

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

57 questions
0
votes
1 answer

How to integrate a map plot on a R shiny dashboards

I'd like to integrate a map plot on my R shiny dashboard. The code for the map is this : library(tidyverse) library(ggplot2) library(usmap) load("hatecrime.RData") df <- hatecrime %>% count(State) %>% rename(state = State) plot_usmap(data = df,…
0
votes
1 answer

us states plot in R with election results

I have plotted a figure of the US states in R. Here is the very simple code: library(usmap) library(ggplot2) plot_usmap(region = 'states') And here is the resulting figure: Figure of US states in R - states are not colored Furthermore, I have a…
Mahsa Z
  • 3
  • 3
0
votes
1 answer

usmaps R: Use ggplot2 to set bins and manually color

I am using the usmaps() package in R to create a map of the US. I have data set up like so: Ces_State_Only: State 1990 Alabama 0.2 Alaska 0.31 Arizona 0.40 I want to create a chloropleth map. I would like to bin my data into the…
gbg
  • 69
  • 5
0
votes
1 answer

Newsignature US Map: Change state fill when hovering any state

I am working on an Interactive US map using this plugin, On initial load one state(FL) will fill with Hover color by default which works great. I need to remove those default (fill) color from the state(FL) when mouser hover in any state. Here is my…
0
votes
1 answer

R vector for mainland US states

I wrote a vector for all the mainland US states when creating maps, so that nobody has to do this manually again. This is important for packages like Tigris if one is only trying to map mainland US. Please see below. Is there a more efficient way to…
0
votes
1 answer

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 of other libraries that can do the job. Question:…
bp41
  • 137
  • 13
0
votes
0 answers

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 boarders and leave in the state boarders. Does…
Matt
  • 1
  • 1
0
votes
1 answer

Cannot find centroid of path

I have an issue with d3.js. I cannot understand how to work with some functions. I need help. index.html