Questions tagged [shiny]

Web Application Framework for R

Filter by
Sorted by
Tagged with
0 votes
1 answer
254 views

Using tmap r package to plot a map in a shiny app, the tooltip remains the value in the left-most column of my data no matter what tooltop.vars I set

I am trying to set the tooltip that is shown when the user hovers over a feature in my map displayed in a shiny app. I am using tmap package to display the map in view (interactive) mode. Below is a ...
Faustin Gashakamba's user avatar
0 votes
0 answers
37 views

Query Oracle for new data based on properties of visible markers?

I'm very new to R/Shiny/Leaflet. I have a barebones working example where I can display points on map based on their lat/long in a table I pull from Oracle: siteData <- conn %>% tbl(in_schema(&...
Eddie Rowe's user avatar
0 votes
0 answers
236 views

R Shiny input$map_click from observeEvent to create polygon output NULL until clicked

I have a code to calculate distance isochrones. Two inputs needed are starting location (lon,lat) and distance. My goal is to have the user select price input using slider input (which then outputs ...
Farrah's user avatar
  • 1
1 vote
1 answer
37 views

Error while trying to calculate zonal statistics in RShiny

I am trying to create a web-map app in RShiny where the user draws a polygon or other geometry on a raster and the app calculates the zonal statistics. The app runs OK until after I have created a ...
Konstantinos Sideris's user avatar
0 votes
1 answer
37 views

Coordinates by hodometric position [closed]

I have a vector which is an oil line, it is georreferenced, but this line, as you can imagine, isn't straight. What I need is to find a way to get a coordinate point by it's hodometric position. eg.: ...
Diogo Bichon's user avatar
1 vote
1 answer
1k views

How can I add size parameters in an uiOutput element for a R "shiny" application?

I'm developing an R "shiny" application where it is necessary to pass size parameters (width and height) different to the corresponding defaults, for a leaflet map, for avoiding issues with ...
xunilk's user avatar
  • 29.9k
1 vote
1 answer
89 views

How to prepare RStudio environment so that my local variable of the attributes table of shapefile can be adequately taken by shinyapps.io?

Following code uses shiny and rgdal libraries for developing a shiny application in RStudio. This app displays a sidebarPanel with choices options of selectInput taken arbitrarily from ls("...
xunilk's user avatar
  • 29.9k
0 votes
1 answer
2k views

Keep selected layers and map position after filtering dataset using R, Leaflet and Shiny

I'm working a dashboard in R using Shiny and leaflet. It is basically a map that changes when you select a date. What I want to do is to keep the "groups" selected in the same map position ...
eddieA's user avatar
  • 1
1 vote
1 answer
576 views

Leaflet Shiny and polygons across the dateline

I have a Shiny app which maps country characteristics to their SF polygons (from rnaturalearth) using Leaflet. I'm having trouble displaying the polygons around the dateline (antemeridian) in the ...
HDK's user avatar
  • 41
2 votes
1 answer
230 views

An error occurred when using the terrain function in the production of Shiny dashboard

I am new to the 'shiny' package. I just try to produce an aspect map from the existing DEM data using the Shiny dashboard for training purposes. However, I faced the below warning in R and error in ...
Alihan Teke's user avatar
2 votes
0 answers
1k views

Plot "large" raster with leaflet in R

I have a geotiff that is around 26MB on my hard drive. I would like to use leaflet to plot it within a shiny application. However, it just doesn't load. When I use mapview just to plot it locally it ...
Lenn's user avatar
  • 1,273
1 vote
0 answers
196 views

Leaflet in R Shiny -- Custom Color Ramp for Tiled Data?

I have large-ish grids (roughly 9000 x 9000 cells) of model results in single-band GeoTIFFs (re-projected from raw outputs in FLT in a different coordinate system). I am displaying them over a tiled ...
TomEvans's user avatar
1 vote
1 answer
219 views

Read gdb into shiny app

I want to access a feature class inside a geodatabase (gdb) from inside my shinyapp. I can access the fc class once I provide the gdb path: gdb_data = arcgisbinding::arc.open(gdb) but how do I get ...
radfael's user avatar
  • 13
1 vote
2 answers
478 views

Adding Corine WMS to Shiny Leaflet

I'm trying to add Corine land cover data to a shiny leaflet map. However, I'm struggling to decipher the WMS XML data so that I can include the appropriate server URL and layer. The WMS information ...
Simon's user avatar
  • 259
1 vote
1 answer
1k views

Filter Leaflet markers by input selectionin R Flexdashboard

I am trying to filter the markers that are drawn on a Leaflet map based on what is selected in a user defined date range. The below codes is returning an error that it is unable to find hfxLoc object. ...
Ryan Garnett's user avatar
  • 9,479
0 votes
1 answer
623 views

Programmatic way of accessing mapbox tileset from leaflet WITHOUT studio

I have a R shiny app that successfully uses leaflet to interact with a custom mapbox studio style. mapbox_url = "https://api.mapbox.com/styles/v1/bweinstein/ck94nmzn20an31imrz6ffplun/tiles/256/{z}...
bw4sz's user avatar
  • 363
2 votes
0 answers
212 views

GetFeatureInfo with leaflet.extras2 and Shiny

I am building an R Shiny App that utilizes the following WMS. However, the GetFeatureInfo capabilities for click-enabled popup (leaflet.extras2 functionality) returns a summary of the GetCapabilities. ...
bnahk's user avatar
  • 21
1 vote
0 answers
274 views

Using WMS getFeatureInfo() in shiny and leaflet

I like to get the getFeatureInfo by a click like it is mentioned in this post so that the information is shown in a popup window. I tried trevis solution but it is not working for me. If I use addWMS()...
Moemen's user avatar
  • 11
1 vote
1 answer
558 views

Mapbox Tileset turns blank at high zoom in Shiny using Leaflet, but not in MapBox Studio

I uploaded a large (~8GB) geotiff to mapbox using the CLI. mapbox upload bweinstein.6thBridge_03182020 6thBridge_03182020.tif Everything appears fine in mapbox studio. Max Zoom is 22 and you can ...
bw4sz's user avatar
  • 363
2 votes
1 answer
303 views

Struggling to find a shiny workaround to flush data from $finished while using EditMod in the mapEdit package

This is a crosspost from the mapedit issues github page here. I am attempting to build a shiny app that allows a user to plot a subset of data after selecting polygons using the mapedit package. While ...
Michael Owen's user avatar
3 votes
1 answer
669 views

MapBox studio distorts and removes polygons in tileset

I'm having an issue uploading a large polygon tileset to mapbox studio from an R simple features object. From R i've projected my simple features to web mercator and i've tried saving either as shp (...
bw4sz's user avatar
  • 363
2 votes
0 answers
222 views

tmap max categories being weirdly combined

I am trying to plot homeless numbers in the UK using tmap. However, I am coming into some problems with the max.categories for tmap_options. Data EnglandWales <- geojson_read("https://opendata....
Nathanael Peter Sheehan's user avatar
1 vote
0 answers
649 views

How to add the mapview layers in Leaflet maps in r shiny app?

server <- function(input, output){ output$map <-renderLeaflet({ df_data <- uploadshapefile() ... df_data <- as.data.frame(df_data) df_data@data$ id <- nrow(df_data) lm....
Karthik's user avatar
  • 21
1 vote
0 answers
647 views

Bounding box in Leaflet

I am currently writing a app in R / Shiny where I use Leaflet. Background layers are WMS and it works fine for most services without specifying any projection anywhere. When using fiddler I see that ...
helges's user avatar
  • 11
5 votes
1 answer
2k views

Shiny leaflet click-event returns NULL when clicked again

When leafletProxy() is used, the click event of leaflet returns NULL when a polygone is clicked for the second time. How can I prevent it from doing so? Example code: library(shiny) library(...
JdP's user avatar
  • 187
1 vote
1 answer
1k views

No applicable method for 'metaData' applied to an object of class "NULL" with Leaflet map

I'm putting together a Shiny app that involves a Leaflet map. Unfortunately, whenever I run it, it produces this error: "no applicable method for 'metaData' applied to an object of class "NULL"". I'm ...
gooponyagrinch's user avatar
1 vote
0 answers
1k views

Setting up leaflet map in R using if/else if/else filtering

I'm trying to put together a map for work. Right now, the script looks as such (The shape file data can be downloaded here): library(tigris) library(mapview) library(leaflet) library(sf) library(...
LeTigris's user avatar
1 vote
2 answers
555 views

getMapData returns NULL in R

I'm trying to use the getMapData function inside an R shiny app, but the function returns NULL whenever I call it. library(leaflet) # works m <- leaflet() %>% addTiles() %>% setView(-80,30,...
Gopal Penny's user avatar
1 vote
1 answer
655 views

Error while rendering Leaflet map on Shiny

I have been trying to reproduce a Leaflet map on a Shiny webpage. I have made this code so far: library(shiny) library(shinydashboard) library(leaflet) library(rgdal) library(dplyr) library(DT) Map &...
Hayley's user avatar
  • 11
0 votes
1 answer
692 views

R Shiny Openstreetmaps - lock map within a set of upper and lower bounds

I am using Openstreetmaps with R/Shiny. I am trying to restrict map display to a given range of coordinates, i.e.xmin, ymin, xmax, ymax so that the users of the map won't be able to look other parts ...
Elías De La Rosa's user avatar
0 votes
0 answers
458 views

Auto zoom when uploading shapefile R / Leaflet

I would like to configure an automatic zoom at the canvas of the shapefile layer that I upload. For that it would be necessary that a function automatically detects the latitude and the longitude of ...
Grits's user avatar
  • 25
1 vote
1 answer
1k views

Using R with Leaflet and Shiny to produce WMS?

I've have been using R with Leaflet and Shiny to produce a web map that is accessible to the public online. It is a real-time air temperature map of Tasmania, Australia based on current Bureau or ...
Mat W's user avatar
  • 85
1 vote
1 answer
199 views

Save a shapefile in a temporary file

I would like to add a line after the transformation of my shapefile in order to save it in a temporary file. uploadShpfile <- reactive({ if (!is.null(input$shp)) { inFile <- input$...
Grits's user avatar
  • 25
1 vote
1 answer
1k 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 ...
Grits's user avatar
  • 25
5 votes
0 answers
2k 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 ...
Denys D.'s user avatar
2 votes
1 answer
5k 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). ...
redshoe's user avatar
  • 427
2 votes
0 answers
3k 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 ...
BRCN's user avatar
  • 121
2 votes
0 answers
581 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$...
cjb's user avatar
  • 29
7 votes
3 answers
6k 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(...
Ka_Papa's user avatar
  • 447
1 vote
0 answers
4k 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 ...
Mike Dolan Fliss's user avatar
4 votes
1 answer
1k 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 ...
Lauren's user avatar
  • 1,902
2 votes
0 answers
838 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 ...
Richard's user avatar
  • 39
1 vote
1 answer
7k 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 ...
Pareto's user avatar
  • 13
7 votes
2 answers
5k 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 ...
user60856839's user avatar
3 votes
1 answer
4k 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 ...
Miguel M.'s user avatar
  • 285
8 votes
1 answer
2k 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 ...
zach's user avatar
  • 183
7 votes
1 answer
7k 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 ...
DS501's user avatar
  • 107
3 votes
1 answer
3k 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 ...
DS501's user avatar
  • 107
4 votes
1 answer
2k 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 ...
karpfen's user avatar
  • 2,307
2 votes
1 answer
4k 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 ...
geoda's user avatar
  • 21