Adding a responsive sidebar to a Leaflet application in R - r

I am building a Leaflet application in R. I want polygons in my map to be clickable. A side bar should then show additional information about the clicked element.
The only solution I could find are in Javascript, such as this one:
https://github.com/turbo87/leaflet-sidebar/
I only use R and don't know how/if I can combine that with Javascript

Related

How create an Interactive map on wordpress/elementor page

I am on a project that I have a section where there is an interactive map as the image below, I am looking for a plugin or somehow I can build this. Basically, when you hover the points on the map it will change the point colour and show on the left side the location information.
If someone knows some plugin that I can build something similar or how I can build that.
Thanks
Leaflet with OpenStreetMap Data.
Bit of simple Javascript and HTML
https://leafletjs.com/

R Leaflet does not show legend when embedded in Shiny Dashboard

The map above renders perfectly fine in the following scenarios:
List item
RStudio Viewer
Shiny app
Shiny app using a minimal Shiny dashboard sceleton
When including the map in an existing, pretty complex Shiny dashboard, the looks as follows:
Obviously, the legend is missing. On top of that, the "reset view" action button has no effect.
Without posting the complete code of the complex shiny dashbboard, I would like make the following comments:
I have disabled all custom JS code and CSS
I use a bare "renderLeaflet" function without additional arguments
I have also tried to display the leaflet in a bare dashboard box without any further arguments
Any obvious culprit anyone could think of causing this issue? Anyone observed similar issues?
I wonder if you solved the issue. I noticed the legend of a raster layer disappears when using the function d3heatmap, for instance d3heatmap(mtcars, scale="column", colors="Blues"). When the line with the heatmap is commented out the dashboard knites just fine -even when the library d3heatmap is loaded. I used the code from this example. Oh I just noticed this has been addressed and solved in other questions, for example here.

Create a Menu inside a Menu in flexdashboard - R

I'm creating a Dashboard in R with flexdashboard. I have a drop down menu (See Image 1). I want to create a menu inside the menu (See Image 2). It is possible with this library?
Unfortunately, there is no easy way to do this just with the regular flexdashboard commands. The only alternatives I see:
Shiny + Flexdashboard
You can combine Flexdashboard with Shiny in order to add this submenus (consider this possibility).
Tabsets
If you don't need to show so many charts/plots in this sub-submenu's pages, a possibility that might suit you is combining the dropdown menu option with tab-panels in the main page. Please check Flexdashboard Layout documentation (btw, it's also possible with shiny)
Editing Flexdashboard CSS/HTML code
I am not really sure about it but, as you can change the color or resize the text editing the CSS-HTML code, you should be able to do what it (remember you can add your own custom CSS file). Try to look for web page front-end solutions to what you are looking for and try to edit the code by your own. Maybe this would help you
Sorry for this poorly edited answer, this is my first answer in stackoverflow.

Selecting image sections in R GUI?

I'm trying to write an R function that allows a user to select a rectangle within a displayed image. The selection could then be used for zooming, copying or other manipulation. The gwidgets package appears to provide this functionality for many of its widgets, but not for images. Does anyone have a suggestion for where to turn next?
Thanks!

Altering The Sorting Arrows In an R Shiny tabPanel

I didn't see anything here or in http://shiny.rstudio.com/reference/shiny that seems to hit on this problem.
In an R Shiny tabPanel output, the sorting arrows align with the right side of the search fields at the bottom of the page.
Here's a pretty good example:
http://shiny.rstudio.com/gallery/datatables-options.html
Is there a way to make them align just to the right of the column name text up top?
Alternatively (or possibly both), is there a way to change the color of the arrows?
The default greyish doesn't really stand out. Bonus points to make the up and down arrows different colors.
Doing it directly in RShiny is best, but I could muddle my way through .js or .css if needed.
I'm trying to head off imminent support requests of "the column is sorting wrong" and "I can't see the arrows" before I push into production.
At the bottom of that shiny example you showed they show that you can pass in through the options parameter options to the rendering for the DataTable table, via the shiny::renderDataTable() function.
Hopefully the http://datatables.net/ site has documentation on what you want if it's indeed possible
If you look at Developer Tools on the http://shiny.rstudio.com/gallery/datatables-options.html page maybe you can see what element would need to be changed.

Resources