All Questions
25
questions
0
votes
1
answer
596
views
Multiple layers on TMAP
I have a dataframe looking like this:
dataframe
Id is the zip code and the columns go from 2015 to 2019.
Link to download the database (with the .shp file needed to execute this program)
library(...
0
votes
1
answer
378
views
Update to "reverse order in R leaflet continuous legend"?
I have exactly the same question as this one from 5 years ago. I want to invert the scale of a continuous color scale in a leaflet choropleth created from R. I'm hoping that there is a better answer ...
1
vote
1
answer
297
views
Plot choropleth from data.frame containing coordinates/zip code and id
I'm analysing real-estate sales for some N. American cities and am using k-means clustering on the data. I have seven clusters and for each observation in the cluster I have the latitude, longitude, ...
1
vote
0
answers
129
views
How to plot choropleth map using zip codes?
I want to plot a dataset into a chloropleth map using the zip codes.
The score represents the density of the desired chloropleth map regions
ZIP.CODE score
1 10000 5.400
2 10001 88....
2
votes
0
answers
498
views
Time series chloropleth in R Shiny / Leaflet
How do you animate a choropleth in RShiny over time using leaflet? I would like to animate the color of choropleths over time in Shiny according to their numeric value.
Below is what I have tried, but ...
0
votes
2
answers
271
views
Deal with missing regions which provoke NAs in choropleth map
I have the dataframe below for which I want to create a chorpleth map. I downloaded the germany shapefile from here and then I use this code to create the map. As you can see the map is created but ...
0
votes
0
answers
107
views
Can I create an embed code for an interactive choropleth map made using the leaflet package in R?
I'm new to R. I've just made a basic interactive choropleth map using the leaflet package in R:
leaflet() %>%
addProviderTiles("CartoDB.Positron") %>%
setView(-2, 55, zoom = 5) %&...
3
votes
1
answer
799
views
How to Properly Store ShapeFiles when Deploying R Shiny App
I am working on an R Shiny project to visualize the spread of COVID19 around the world. When I run the app locally, it works just fine, but when I try to deploy the app, it runs into issues which I ...
1
vote
0
answers
884
views
How to change the transparency of shapefile in tmap_leaflet
I am using tmap_leaflet function to make a map and I like the result, however, I would like to slightly change the transparency of the shapefile such that I am able to see a bit of the tiles google ...
2
votes
1
answer
2k
views
How to create a leaflet choropleth map of US counties
With the code below I get my dataframe with US county data
library(raster)
library(leaflet)
library(tidyverse)
# Get USA polygon data
USA <- getData("GADM", country = "usa", level = 2)
### Get ...
2
votes
1
answer
5k
views
Shiny reactive value with radiobutton
I am creating a Shiny app meant to display a choropleth map.
I would like to change reactivly the values to show on my map with radiobuttons.
It worked fine with normal button, but i am struggling ...
0
votes
1
answer
840
views
Is it possible to create a choropleth leaflet map without having the state coordinates?
I was wondering if it is possible to create a chorolpleth map with leaflet if you do not have lat and long data but either the full state name or the short name like 'AL' from Alabama etc. I use a ...
0
votes
1
answer
215
views
Why is my choropleth gradient in Leaflet inaccurate?
I am trying to plot a choropleth using shape files and leaflet. I merged a population column to the shape file data frame, and used that column to base the gradient on. The merge was successful in ...
2
votes
2
answers
509
views
Only the first polygon is showing up in Leaflet 2.0.1 choropleth plot
My leaflet choropleth plot in my Shiny App is only showing the first polygon after the recent package update to Leaflet 2.0.1.
I had adapted the code from the Leaflet for R webpage and it used to ...
1
vote
1
answer
311
views
Matching up data with a list of SpatialPolygonsDataFrame objects to run a choropleth map in leaflet
I'm teaching myself how to use mapping tools in R, and in this case I'm looking to set up a choropleth map of various countries at the respective regional levels based on the results from the mydata ...