All Questions
85
questions
0
votes
1
answer
80
views
How to set an anchor and create polygons from shapefile
I am following up on the example here: How to make small polygons from shapefile and extract coordinates
I am trying to adapt that example to a different shapefile but I am getting errors. The new ...
1
vote
2
answers
227
views
How to make small polygons from shapefile and extract coordinates
I have a small shapefile here: https://login.filesanywhere.com/fs/v.aspx?v=8c6d62865c626fb4a2ab called bay.RDS
library(tmap)
library(leaflet)
library(mapview)
bay <- readRDS('bay.RDS')
mapview(...
1
vote
1
answer
553
views
Add a title to the Leaflet map
I have a simple question but still do not know how to find the answer to it. All I need is to add a title to the leaflet map. I do not need it to me on the map, just above it as in a usual ggplot map.
...
0
votes
0
answers
53
views
Show the aggregate value on markerClusterOptions in R
I want to do a map in R, that will show the points in clusters when you zoom in/zoom out and in the same time show a aggregate value.
Now I have this code:
m <- leaflet(acdt_1, width = "200%&...
0
votes
1
answer
173
views
RShiny display multiple leaflet maps on the same plot
I have a shiny app where the user can select to display a specific leaflet map (on 51 available), or all leaflet maps (the 51 on 11 columns and 5 rows).
To display multiple leaflet maps on the same ...
0
votes
0
answers
163
views
Add Polygon Layers to Leaflet Map (with labels and legends)
I am trying to combine 4 leaflet maps into one, where you can filter the layers using addLayerControl. Each layer has popups when you hover over the polygon with the corresponding variable (numeric) ...
1
vote
1
answer
238
views
Create a map in R and put some coordinates
I have a dataset with three variables related to coordinates: UTMX, UTMY and HUSO.
I'd like to create a map where all the points were shown.
Here an example of the dataframe:
x y huso
...
0
votes
0
answers
40
views
How to reduce incremental zooms in leaflet?
I am making maps in leaflet and cannot change the zoom increment for some reason.
I don't have the option to use
var map = L.map('map', {
zoomSnap: 0.25
});
I also don't have these functions ...
0
votes
2
answers
93
views
R Displaying Points Twice?
I have this code for an interactive map in R:
library(leaflet)
library(inlmisc)
Long = rnorm(1000, -71, 0.5)
Lat = rnorm(1000, 42.3, 0.5)
loc = rep("loc", 1000)
Name = rep("Location&...
0
votes
1
answer
2k
views
Error in UseMethod: no applicable method for 'metaData' applied to an object of class "NULL"
I'm trying to add different icon to the markers which I'm trying to show. I have different category like this
category <- data() %>%
dplyr::select(category) %>%
distinct()
and it looks ...
1
vote
0
answers
695
views
Learning How to Use Shapefiles in R
I am trying to learn more about "shapefiles" and how to plot them in R. Ideally, I would like to make a "leaflet map" (interactive or static) that looks something like this: https:...
1
vote
1
answer
3k
views
How to successfully save leaflet map in a .png image?
Out of geocoordinates, I want to draw simple plain points on a city map and save the output as a .png. I'm on Linux Ubuntu 22.04LTS. For the first part I found a pretty brief and straightforward ...
0
votes
0
answers
53
views
Tiny shiny app to monitor pollinators: leaflet map rendering locally but not rendering online
I work for a biodiversity monitoring project and I am trying to build a shiny app to better organize our fieldwork. I am basically trying to publish a map of our study area overlaid with a grid (our ...
0
votes
1
answer
128
views
R shiny renderLeaflet not rendering
I am trying to create an interactive map that displays locations only in the district chosen by the user in R shiny.
rm(list=ls())
library(readxl)
library(shiny)
library(tidyverse)
library(leaflet)
...
0
votes
0
answers
504
views
Add axis to leaflet map
How can you add an x and y axis to a leaflet map figure -- in the case of a map how to add the longitude and latitude?
For the figure below, how can axis be added please?
library(leaflet)
leaflet() %&...
-1
votes
1
answer
91
views
Trying to create a bubble map of Australia
Name Lat Long
XX -20.6544 150.9149
This is how my data looks like with over 1000 entries
The code I tried is below.
# Library
library(leaflet)
# load example data (Fiji EarthPostcode) + ...
0
votes
1
answer
625
views
Reactive Leaflet Map Not Recognizing 2nd Color Palette
I posted a similar question, but didn't make my example minimal enough, so I tried to pare it down some. So here's the problem:
I am working on a COVID19 project to visualize the spread of the virus ...
0
votes
2
answers
405
views
Chinese province coordinates in r
Does anyone knows how to access the coordinates by regions for China. The code below shows the same thing that I am looking for China. Many thanks in advance
require(maps)
states_map <- map_data(&...
5
votes
2
answers
3k
views
Leaflet not rendering in dynamically generated R markdown html knitr
I've created a R markdown report where the sections and tabsets are dynamically created.
I have an issue where the Leaflet maps are not being generated in the output, but rather a blank white space. ...
1
vote
1
answer
550
views
R Shiny --> FillOpacity Argument in AddCircles Function Ignored
I am working on a R Shiny project to visualize all of the airports in the world. The code included below is a sample of my project. Functionally, the app works as expected - The data table and map ...
0
votes
1
answer
90
views
how to plot a map only with lat, long without group in R
I am having issues with plotting a UK map. Indeed, I have issues plotting because maybe I do not have a group as a variable. This is the type of data I have.
lft_j <- structure(list(journeydate = ...
0
votes
0
answers
727
views
Adding circle markers on leaflet R on to a map already plotted
bins <- c(0,10,20,30,40,50,Inf)
pal <- colorNumeric(
palette = c('Grey', '#C9E1F9', '#BCD2E8', '#86ACC6', '#73A5C6', '#528AAE', '#2E5984', '#1E3F66', '#152B46'),
domain = ar_prov_objetivos$...
0
votes
1
answer
171
views
maps::map() returning region names instead of country names
I am trying to create a pop up for each country on a leaflet map showing the name of the country and a number. I have though come upon a similar problem in stack exchange here.
country <- c("...
0
votes
1
answer
487
views
R-Leaflet : Merged Shapefile and Excel appeared successful, but highlight label reveals that the 31 polygons are only filled w/ 4 repeating values
I am working on a map for my internship. I have the shapefile of the city of Villeneuve d'Ascq's subdivisions (referred to as "IRIS" in France) that I am mapping, and separate CSVs with various ...
0
votes
1
answer
229
views
I cannot get slider inputs to modify a map in shiny
I cannot get the map to react with the sliders. THe data was from https://www.kaggle.com/nasa/meteorite-landings/data#
when i move the sliders the map "refreshes" like it resets itself as if something ...
1
vote
1
answer
1k
views
How to retrieve point location data from a WMS leaflet layer?
I am very new to working with maps and was given a task to collect data on points from this website: https://mapadefosas.mjusticia.es/exovi_externo/CargarMapaFosas.htm#
So far I have managed to ...
0
votes
1
answer
2k
views
Get longitude and latitude from a shapefile with Leaflet in R
I've been trying to map with leaflet to add addCircles() but my shapefile doesn't seem to have the latitude lat and longitude lng parameters so I got the centroids for each city as is the code below ...
1
vote
0
answers
91
views
Map Australia - no oultine
Got code from here:
Map Australian cities - R spatial
But when I run it, it gives the map shown:
library(maps)
df <- world.cities[world.cities$country.etc == "Australia",]
library(leaflet)
## ...
12
votes
2
answers
10k
views
How can I plot individual data points in a map using R/ leaflet?
I am trying to show the individual points in a given place, like a map equivalent of dot plot. I tried with leaflet library in R, but I am only able to map the size of the marker to the continuous ...
0
votes
1
answer
471
views
Wrapping the dropdownButton in an absolutePanel in R Shiny
I'm building an interactive map with Shiny and I'm currently trying to hide my UI elements in a dropdownButton from the shinyWidgets pkg.
My problem is that so far I can either have the ...