All Questions
27
questions
0
votes
1
answer
64
views
can we popop the name of the place when we use addGeoJson in R
I'm using addgeoJson function for the india map. I have data that I got it from here
https://gadm.org/download_country.html
for example I'm using this data
This is a json file and I read that json ...
3
votes
1
answer
2k
views
Map background colour/transparency within R leaflet
I'm using a geojson file to produce a map with leaflet on R. I would like to change the background colour to the white, or make the background transparent if it is possible (this is actually really ...
1
vote
1
answer
295
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, ...
3
votes
1
answer
700
views
Converting geojson into sf for a clotopleth map
I have recently been wrapping my head around the leaflet package and have gotten around the basics of adding markers, reading/plotting shapefiles from local source and displaying the final outputs in ...
1
vote
2
answers
171
views
Plotting native-land.ca json in R
I am new to working with JSON files so not sure how to go about this. I am trying to plot from the json file for the indigenous territories available from native-lands.ca. I can read the file as JSON ...
0
votes
1
answer
44
views
Cannot visualize geojson in R using leaflet package
I would like to visualize municipalities in R using Leaflet.
This is my code:
library(leaflet)
library(jsonlite)
geojson <- readLines("https://cartomap.github.io/nl/wgs84/gemeente_2020.geojson", ...
0
votes
1
answer
398
views
Cannot load valid json/us-states.geojson for Chropleths map using Leaflet and R. Loving R and Leaflet but stuck
Learning R for mapping with Leaflet.
Seems like a great guide here, but I’m stuck with a Chropleths map.
https://rstudio.github.io/leaflet/choropleths.html
Download the USA geoson file. It’s in my ...
0
votes
1
answer
2k
views
Leaflet (R) addPopups: coordinates/properties
I'm fairly new to handling spatial data and leaflet in general. I'm having difficulty creating a popup for my map. Basically what I want in the popup is the coordinates of my polygon and one of the ...
6
votes
3
answers
2k
views
Subsetting geojson data with R
I have a geojson file of state boundaries that I obtained from here. In particular I'm using the 20m US States Data
I'm trying to subset the data so that I can use leaflet to map only certain states. ...
0
votes
1
answer
661
views
Unable to use GeoJSON using leaflet package in R
I am trying to plot the GeoJSON in R using Leaflet package. Below is the code and the error.
library(geojsonio)
library(leaflet)
library(data.table)
library(plyr)
library(rgdal)
...
1
vote
0
answers
131
views
Map (with geojson) instead of Leaflet map
I am doing a poster for class. Everything was ok, I created a descent map for showing some data in New York, using Leaflet.
jpal <- colorRampPalette(c("#03B9FF", "#801515"))
# qpal <- ...
1
vote
1
answer
1k
views
How to download NY state all County data in R for leaflet map
# From http://eric.clst.org/Stuff/USGeoJSON and
# https://en.wikipedia.org/wiki/List_of_United_States_counties_and_county_equivalents
nycounties <- geojsonio::geojson_read("json/nycounties.geojson",...
4
votes
1
answer
2k
views
How to download geojson data and read it to R
# From http://leafletjs.com/examples/choropleth/us-states.js
states <- geojsonio::geojson_read("json/us-states.geojson", what = "sp")
bins <- c(0, 10, 20, 50, 100, 200, 500, 1000, Inf)
pal <-...
5
votes
2
answers
874
views
Use strings of geoJSON with leaflet
I have a dataframe where my first columns is geojson strings and the second is a metric for that location. The string in the first column renders properly if pasted into https://geojson.io/
I want to ...
5
votes
1
answer
742
views
Leaflet polygons losing colour when R Shiny app opened in web browser
I'm building a map using leaflet in R, to be deployed as a Shiny app. The Shiny app is working fine within RStudio, but when I open it in a web browser the polygons lose their colour. Everything else ...