Skip to main content

All Questions

Tagged with
0 votes
0 answers
55 views

Why are my leaflet points stuck to the map edge?

I try to plot transit stops on a leaflet map, indicating local clustering ("LISA"), based on Moran's I. The map is embedded in an R markdown file. I've successfully done that with polygon ...
fluegelrad's user avatar
0 votes
0 answers
87 views

Multipage flexdashboard leaflet map issues

I have created a multipage flexdashboard app (.Rmd) in R using shiny runtime. One of the pages is a leaflet map with a large polygon layer. The map initially draws as it should but after I browse ...
jaykay's user avatar
  • 95
0 votes
1 answer
1k views

How to include a leaflet map (html widget) into a Word or PowerPoint document?

I teach Leaflet to my students to map and analyze spatial data. I would like them to present some of their work in PowerPoint, Word, and/or PDF while maintaining the interactive features of the ...
Max's user avatar
  • 13
0 votes
2 answers
278 views

How to change css in rmarkdown cell & shiny?

I am relatively new in r and creating leaflet plot for which I need a white background instead of grey. I came across this SO post for same: blank, white background for leaflet map & tried: Plot ...
ViSa's user avatar
  • 1,717
0 votes
0 answers
88 views

How to change color of leaflet map around the polygon shape in r? [duplicate]

I am using a shape file in leaflet plot & would like to have white color space external to the outer boundary of polygon shape instead of default greyish color background like color but unable to ...
ViSa's user avatar
  • 1,717
0 votes
0 answers
219 views

Embedded Shiny Error in R Markdown : object params not found

I am attempting to embed a choropleth graph using leaflet & shiny within a R Markdown document. The code worked fine as a chunk, but produces an error when ran altogether. Everything else in the R ...
Amara Alexander's user avatar
0 votes
1 answer
42 views

Mapping San Antonio City Park boundaries

I'm trying to create an interactive Markdown webpage in R-studio. I need to use the leaflet package to complete this assignment. I want my map to display polygon shapes that display park boundaries in ...
Brock J's user avatar
0 votes
1 answer
559 views

For Leaflet in R, can you add a button that adds and removes polygons for each map layer?

If we just take a standard leaflet map like the one below: library(leaflet) library(maps) mapStates = map("state", fill = TRUE, plot = FALSE) leaflet(data = mapStates) %>% addTiles() %&...
Christian's user avatar
  • 139
0 votes
1 answer
128 views

Error message in my R-markdown file (post-knit)

I'm using a markdown file to build a leaflet map in R, and after I've knitted my document, I get this error message in my rmd file: ## although coordinates are longitude/latitude, st_union assumes ...
Hibyetree's user avatar
0 votes
0 answers
588 views

Static leaflet map markers cut off when knit to PDF in R markdown

I am trying to produce a static map via the leaflet package so I can knit it to a PDF using markdown but the circle markers on the map keep getting cut off and I can't for the life of me figure out ...
Oscar Henry's user avatar
1 vote
1 answer
188 views

Browser inconsistency with the leaflet::addMapPane() function

I have a problem integrating leaflet maps in my blogdown website whenever using the addMapPane() function to create different panes. The problem is that, when using Safari, everything works fine, but ...
J.P. Le Cavalier's user avatar
1 vote
0 answers
108 views

Leaflet not generating properly in dynamic R markdown document

I have asked this question before here. Initially the focus was on a point map, which the answer fixed. However looking at clustered and heatmaps, the issue persists. Point generates fine (fixed via ...
Jonathan West's user avatar
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
0 votes
1 answer
1k views

How to fix distorted interactive popup of ggplot figure in leaflet map

Need help/advice on fixing distortion with the popup plots in html file. Changing the shape/size options within leaflet don't help. I suppose making this a ShinyApp might work better, but I prefer to ...
Matt L.'s user avatar
  • 2,883
0 votes
1 answer
771 views

Flexdashboard not loading when using Leaflet

I have recently discovered the leaflet package and Flexdashboard and have no troubles using them separately. However when I try to integrate a leaflet map into my Flexdashboard, nothing happens when I ...
PHNM's user avatar
  • 25
4 votes
0 answers
494 views

Can R's htmltools::includeHTML not handle leaflet maps?

I try to use the concept from here in an automated way, but maps are not displayed. The included html looks ok: Minimal reproducible example: For the generation of the html see below or. --- title: "...
Christoph's user avatar
  • 7,013
5 votes
3 answers
1k views

How to automate nested sections in Rmds which include text, maps and tables

I found several examples (How to extract the content of SQL-Files using R, Use loop to generate section of text in rmarkdown, Automating the generation of preformated text in Rmarkdown using R), but ...
Christoph's user avatar
  • 7,013
2 votes
2 answers
1k views

Leaflet maps not appearing in tabbed HTML document output from Rmarkdown

I've used R Markdown to create a HTML document with tabbed sections and each tab should include one Leaflet map. When I run the code, the Leaflet maps only appear in the first two tabs of the HTML ...
RaBe's user avatar
  • 53
2 votes
0 answers
238 views

RMarkdown cyrillic encoding of leaflet popup

On my windows machine I got this encoding problems. I'm making an interactive map using leaflet and rmarkdown. The point is, that map title and popup should be in Russian. When I'm just creating a ...
atsyplenkov's user avatar
  • 1,259
1 vote
1 answer
1k views

Improving Performance of a leaflet

I am trying to plot a map using Leaflet on Flexdashboard, output : html. I have a 50,000 data points i needed to plot. i tried using addCircleMarker(lng,lat) and it works in Base R but when the output ...
Prabesh Kc's user avatar
7 votes
1 answer
2k views

Center leaflet in a rmarkdown document

I want to create an html document with a centered leaflet widget inside it. --- title: "Exemple" author: "Antoine Bichat" date: "31/08/2018" output: html_document --- ```{r leaflet, fig.align="...
abichat's user avatar
  • 2,406
0 votes
0 answers
432 views

Have R script automatically create and update leaflet map/Rpubs or shiny app

I'm tracking birds with satellite telemetry units, and I'm visualizing/sharing the data using a leaflet map and RPubs. I download the telemetry data 1-2 times per week, run the code below to create a ...
Jason's user avatar
  • 912
1 vote
1 answer
463 views

Leaflet in ioslides_presentation puts unnecessary white space in box to toggle layers. Way to reduce size of box?

I'm making a presentation using ioslides_presentation and am embedding an interactive map using Leaflet. The white box used to toggle different layers has a lot of unnecessary white space. This is not ...
Rob Marty's user avatar
  • 398
6 votes
1 answer
2k views

How to render leaflet-maps in loops in RMDs with knitr

I am currently fighting trying to get knitr to render my leaflet maps, taken from a collection to appear correctly in a rendered RMD html-output. I'm already aware about some potential problems when ...
phabi's user avatar
  • 372
0 votes
1 answer
2k views

How to change circle colours in leaflet based on a variable?

For a certain online course, I made a quick interactive map using leaflet in Rmarkdown and published it to Rpubs. The data is about world cities and their population. I was trying to make colour ...
Grammilo's user avatar
  • 1,339
0 votes
0 answers
1k views

R looks in the wrong place for html dependency

I am trying to knit a flexdashboard to an html file. My flexdashboard includes leaflet maps. The knit.md file compiles correctly. At the last stage, converting the knit.md to an html file, I get an ...
Adrian Martin's user avatar
2 votes
1 answer
2k views

Leaflet map won't render in browser

I have a map using Leaflet which works in the html output of r markdown, but the map won't render when I open the html in Google or IE. Ggmap works fine, but I'd prefer an interactive map. Any ideas? ...
Zeus's user avatar
  • 1,560
2 votes
1 answer
370 views

Leaflet map tiles not visible in reveal.js presentation within R?

Intro: I am trying to embed a leaflet map into a revealjs presentation within an RMarkdown file. My example below is pretty close, but it is (1) missing tiles, (2) the popups are not displaying, and ...
philiporlando's user avatar
0 votes
2 answers
2k views

How can I insert HTML widget objects (Leaflet map or HTML table) in an HTML markdown document?

I have tried a number of things including print(leafletMap) and just calling the object itself. Is there a specific function that I am to wrap my object in in order to get it to render in the document?...
gvan's user avatar
  • 503
3 votes
1 answer
832 views

shiny app with downloadable md report, error: "pandoc: Could not find data file" when run by shiny-server

I created a shiny app that provides a download button. When pressed, a markdown report is created in html-format. Here is the app: server <- function(input, output) { output$report <- ...
Christoph Scholz's user avatar
4 votes
1 answer
573 views

Leaflet causing an error in with R Markdown

When I try to use R Markdown (in R Studio) along with Leaflet I get an error and it fails. Here is a simple R Markdown script along with the error I am getting. I have tried everything I can think of ...
David Wilkes's user avatar
7 votes
2 answers
6k views

How to arrange HTML Widgets inside of a RMarkdown Document (PDF, HTML)

I'm working in a R notebook and would like use it to create two ouptuts: an HTML document and PDF document. My analysis includes leaflet maps (html widgets), which is causing problems when I knit the ...
Tiernan's user avatar
  • 848
3 votes
0 answers
265 views

R Leaflet map not being created inside for loop in flexdashboard

Leaflet maps can be manually duplicated within the same section, but they do not appear when being called from inside a for loop (or a while loop). Below is an minimal example. Using htmltools::...
Youppi3's user avatar
  • 66
4 votes
2 answers
2k views

Sync two leaftlet maps on different tabs in RMarkdown with Shiny

Running into issues syncing two leaflet maps on different tabs. After looking at previous entries (Synchronizing two leaflet maps in R / Rmarkdown), the solution provided by @TimSalabim does not ...
jpf5046's user avatar
  • 797
3 votes
2 answers
2k views

Synchronizing two leaflet maps in R / Rmarkdown

JS leaflet allows two maps to be synchronized. See an example of synchronized leaflet maps here. I would like to implement synchronized leaflet maps in R and more specifially in Rmarkdown/knitr. ...
chamaoskurumi's user avatar
8 votes
1 answer
873 views

Incorporate Leaflet map in revealjs presentation within R

I'm trying to add a Leaflet map with tiles to a revealjs_presentation created in R. This map renders fine in ioslide or html format, but not in the revealjs_presentation format (main problems: all ...
Derek Darves's user avatar
6 votes
1 answer
8k views

how to include Leaflet (for R)-output into RMarkdown presentation?

According to the documentation, Leaflet output created with the "leaflet" package for R can be included into RMarkdown. This works when the RMarkdown output is html: --- title: "Rmarkdown HTML ...
Uden VH's user avatar
  • 177
6 votes
1 answer
2k views

render leaflet plots as raster in R?

I realize that this largely defeats the purpose of using an interactive leaflet map, but I'm writing a traditional paper book and I want to show how the leaflet package for R works. I'm writing the ...
beanumber's user avatar
  • 777
8 votes
2 answers
2k views

Q: Create leaflet map in for loop in rmarkdown html

I am trying to create a leaflet map with a for-loop in an rmarkdown file. Here is a minimal example: --- title: "Test" output: html_document --- ```{r quakes, echo=F} data(quakes) library(leaflet) ...
Afoy's user avatar
  • 137
1 vote
2 answers
190 views

Leaflet running fine on the console but not able to publish rmd document

I have this error when trying to deploy an rmd document. My code chunk runs ok and in console and the whole document looks good but when publishing i get this error "Error cannot open connection". ```...
Blas's user avatar
  • 575
0 votes
1 answer
1k views

How to suppress message of package leaflet?

I am using 'leaflet' package by R-studio to plot my geo-data. I am creating Rmarkdown file for the same. Everything works fine. But I get following message in the beginning in Rmarkdown output file: ...
Mithilesh Kumar's user avatar