This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#' Add custom circle legend to leaflet map | |
#' | |
#' To be used alongside \code{leaflet::addCircleMarkers} | |
#' | |
#' @param map a leaflet map | |
#' @param title title of the legend | |
#' @param range vector of numeric values you want to scale the legend to (same vector used with addCircleMarkers) | |
#' @param scaling_fun the scaling function used with addCircleMarkers to scale circle radii appropriately for leaflet | |
#' @param color stroke color | |
#' @param weight stroke width in pixels |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(leaflet) | |
library(sf) | |
library(rmapshaper) | |
library(dplyr, warn.conflicts = FALSE) | |
library(smoothr) | |
library(shiny) | |
u <- httr::GET('https://www.data.gouv.fr/api/1/datasets/5e7e104ace2080d9162b61d8/') | |
url_search <- httr::content(u)$resources |
OlderNewer