Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [shiny]

Web Application Framework for R

0
votes
1answer
25 views

Input points shapefile in shiny app

The application I created allows me to import a polygon shapefile into my Leaflet map. However, I would like to set up a point shapefile import on the same button. I tried several attempts, especially ...
0
votes
0answers
10 views

Why does an Error occur when Publishing Leaflet with Shapefile to ShinyApps.io?

This shiny leaflet works in rStudio, but when I publish to shinyapps.io, I get this error. This is the R code for this : ##Sheridan County library(shiny) library (leaflet) library(readr) library (...
1
vote
0answers
25 views

Reset / Clear button, upload shapefile on R Shiny

I would like to create a button that would allow me to reset a fileinput, and delete the previously imported shapefile. Here is my code: server.r: library(shiny) library(shinydashboard) library(...
0
votes
0answers
9 views

Is there a way to get coordinates from a map using Leaflet on a Shiny app in R by clicking, but without a marker?

In this example I have some polygons and I click on the centroids (variable centroides) to get values from a raster (variable s). server <- function(input, output, session) { points <- ...
0
votes
0answers
57 views

Use clickEvents in shiny with tmap

You can use clickEvents for the tmap package in shiny as in this example for leaflet in shiny. However, I don't know how to acces the click events. On each click an Id is given, but where is this id ...
0
votes
0answers
235 views

How to create a single multi-option Leaflet filter from multiple columns of R data frame in Shiny?

I am creating a Shiny Leaflet app in R where am trying to display locations (markers) that correspond to a multiple dropdown filter. The data I have has many columns, but basically looks something ...
1
vote
0answers
281 views

Selecting and deselecting markers in leaflet under R shiny?

I would like to write a script that selects a marker on the map whenever I click on it and then deselect it when I click/select another marker (that is, so that no more that one marker is selected on ...
0
votes
1answer
343 views

Conditionally adding markers to map in R leaflet and shiny

I am trying to add some markers to a leaflet map in R based on conditions that I select from an selectInput command. The selectInput command lets the user choose three different numbers (1, 2 or 4). ...
1
vote
0answers
466 views

How to add a text on a Leaflet map

Each day I need to draw a path on a map and add a text (like 4, 5 or 8 min) indicating how long it takes by car from the starting point to the destination (see the figure below). I thought it would ...
1
vote
0answers
215 views

Shiny leaflet map renders twice on switching input

I'm trying to produce a Shiny app with Leaflet that renders a choropleth map based on different input criteria. The map displays incidents of different types (input$type) and backgrounds (input$...
3
votes
1answer
2k views

Using R Shiny to create a plot with a shapefile and a raster

I just wanted to upload a shapefile and a raster in a RShiny app and then execute a script. What I have wrote is the following; library(shiny) library(raster) library(rgdal) ui=shinyUI(fluidPage(...
1
vote
0answers
2k views

Dynamic leaflet scale / zoom / bounds in R Shiny Applications

I've dug into a few older stack exchanges on this topic, but am at a standstill. I am attempting to let leaflet dynamically resize in a large shiny app when the application is resized. I'm doing that ...
2
votes
1answer
334 views

Reusing leaflet map elements in custom functions in Shiny/R

I have an application that reuses several leaflet elements, so I'm trying to build functions to streamline my code. All of my logical attempts failed, so I utilized an example I was familiar with ...
1
vote
0answers
419 views

R Shiny / leaflet map: Projection problem in creating map in Plate Carree projection

I'm trying to create an R Shiny map using the leaflet package to display input layers in the Plate Carree projection rather than the default Spherical Mercator projection. I've input OSM and WMS tile ...
1
vote
1answer
2k views

Using .shp files in R with leaflet and shiny

I'd like to use the following .shp file to plot area development outlines for KY using leaflet in a shiny app. I use the code below, but I get an error that ".prj file is missing." Also, no outline ...
5
votes
2answers
716 views

Adding a linestring by st_read in Shiny/Leaflet

I have a large shapefile. For a better perfomance I try to load data with st_read() from sf package. The official documentation states that it should be very easy to integrate the shapefile into ...
3
votes
1answer
2k views

Leaflet: tool for multiple marker selection and computation of summary

Let's suppose that we've got a leaflet map with some markers and another layer, a raster image let's say. Is there a tool, or a way to create one, that allows one to select with an area, a subset of ...
5
votes
1answer
475 views

How do I tile raster input to speed up display in R Shiny programs?

Disclaimer: I have very little GIS experience I've been working on a project in R that involves displaying large raster maps in an R Shiny interface. I am using the leaflet package for display. The ...
2
votes
1answer
3k views

Removing specific Circle Markers in Leaflet Shiny

I have a layer of CircleMarkers and I am trying to remove only the markers that have a certain layerId. The id's for these circle markers are in a dataframe. In reality I have millions of id's whose ...
3
votes
1answer
700 views

LeafletCRS projection issues

I am trying to get a map in the Dutch Rijksdriehoekstelsel coordinates in a Leaflet map in R that is going in a Shiny app later. I am going to have to add polygons later, and changing their X and Y ...
4
votes
1answer
979 views

Why does Leaflet with provider tiles not draw markers as expected?

I'm working with Leaflet maps in Shiny for R. I'm producing a map with some markers on it. When I use addTiles () for my base map, everything works as expected. However with addProviderTiles (), the ...
1
vote
1answer
1k views

Changing the line width/weight in Leafletr addPolylines function depending on an attribute

I would like to display flow lines (OD-lines) using leaflet in Shiny and sofar I can successfully map all the lines I want. But I also want to change the line width so that each line will have a ...
3
votes
2answers
2k views

Disable double click zoom event in Leaflet for R

Is there a way to disable the double click zoom in Leaflet for R? I've created a Shiny app that changes polygon styles when a country's region is clicked on/off. If you select and immediately ...
1
vote
1answer
579 views

Problems transforming polygon projections inside Shiny app

I've just recently started attempting to build mapping apps with leaflet and shiny in R. I'm currently stumped by an issue with projecting polygons inside shiny. Here is the shapefile to reproduce ...
4
votes
1answer
5k views

Changing the style of a polygon with a click event in a Shiny/Leaflet app

I'm attempting to create my first Shiny app using Leaflet. I'm currently trying to figure out how observers work together to update the map when something is clicked. Here is the example that I've ...