Skip to main content

All Questions

Tagged with
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 ...
Salvador's user avatar
  • 1,467
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(...
Salvador's user avatar
  • 1,467
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. ...
Polina Ermolaeva's user avatar
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%&...
Mary Nastase's user avatar
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 ...
Chika's user avatar
  • 1,487
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) ...
Cloudberries's user avatar
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 ...
Enrique's user avatar
  • 81
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 ...
ASHooper93's user avatar
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&...
stats_noob's user avatar
  • 5,689
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 ...
Siddhant Singh's user avatar
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:...
stats_noob's user avatar
  • 5,689
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 ...
jay.sf's user avatar
  • 70.8k
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 ...
Julian Wittische's user avatar
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) ...
Dulguun314's user avatar
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() %&...
user2957945's user avatar
  • 2,393
-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) + ...
BeeLady's user avatar
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 ...
user2813606's user avatar
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(&...
Seyma Kalay's user avatar
  • 2,763
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. ...
Jonathan West's user avatar
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 ...
user2813606's user avatar
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 = ...
GaB's user avatar
  • 1,114
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$...
Sebastian's user avatar
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("...
Nick's user avatar
  • 401
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 ...
lowwasteluau's user avatar
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 ...
Mathemagician's user avatar
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 ...
Ted's user avatar
  • 72
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 ...
cdcarrion's user avatar
  • 576
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) ## ...
chris's user avatar
  • 155
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 ...
karthik2k2's user avatar
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 ...
Ziemowit Bućko's user avatar

15 30 50 per page