Interactive maps using leaflet in R - r

I rendered a map using leaflet library in R, so can we make it interactive using R (which identifies a location on click on the map like google maps)

Related

Converting json to geojson

I'm quite new to R and I was trying to make an interactive map showing coronavirus cases.
I was planning to use leaflet for R to create the map and using this source (https://covid.ourworldindata.org/data/owid-covid-data.json) for the data.
However, leaflet requires the data to be in .geojson.
How do I convert the data to the .geojson format?

leafletjs map Interactive Choropleth Map

i'm using leaflet js Choropleth map :
https://leafletjs.com/examples/choropleth/
what i'm trying to do on click at (california ) area load form databeas all loaction (lat,long) that in same area ??
Since the Choropleth Map is a GeoJson with a collection of polygons, I would go about and use this library https://github.com/hayeswise/Leaflet.PointInPolygon to determine if a given location is in the given polygon or not.

Exporting an existing leaflet map as KML/KMZ format in R

I have written a script in R to draw a dynamic map that users can interact with using the leaflet package. I need to submit this map as a KML/KMZ format for it to be acceptable according to the journal's requirements.
Is there an function in R that I can save the map as one of these format so that it can be compatible with google earth?

Creating an interactive choropleth map using R

Does anyone have some sample code I can look at that creates an interactive map in R/Shiny? I would like to be able to have the map zoom in to a specific US State based on the user selection in a drop down

Custom background image with ggmap

I'm using R and ggmap to analyse some geographic data. I would like to use my own background map (a tif file) instead of the ones provided by ggmap (google maps, osm, stamen, etc.).
Is there a way to load my own raster file and display it using ggmap ? I really want to keep ggmap as most of my analysis use ggmap's functions (geom_density2d, geom_tile, etc.). For example a wrapper that transform a raster file reads by the raster package to a ggmap get_map object ?
Thanks

Resources