Create Interactive Web Maps with the JavaScript 'Leaflet' Library
Overview
Create and customize interactive maps using the 'Leaflet' JavaScript library and the 'htmlwidgets' package. These maps can be used directly from the R console, from 'RStudio', in Shiny applications and R Markdown documents.
{leaflet}is now licensed under the MIT license (was GPL-2) (#958).{leaflet}no longer install{sp}by default and attempts to convert object to sf internally before creating a map and warns when it fails conversion (@olivroy, #942).- The
breweries91,atlStorms2005, andgadmCHEdatasets are now{sf}objects (@olivroy, #944). {leaflet}now requires R 3.5 and above (@olivroy, #944).- Color palette improvements. All color palette functions now support all
{viridisLite}palettes ("magma", "inferno", "plasma", "viridis", "cividis", "rocket", "mako", and "turbo") (@jack-davison, #924). - Updated vignettes to replace
{sp}/{raster}usage with{sf}/{terra}and their corresponding examples. (@jack-davison, #928) - Updated vignettes to replace
{sp}/{raster}usage with{sf}/{terra}and their corresponding examples. (@jack-davison, #928) addProviderTiles()will now error if the chosenproviderdoes not match any currently loaded provider (by default, those inproviders). This behaviour can be toggled off by setting the newcheckargument toFALSE(@jack-davison, #929)
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK14 OK2026-03-10
Documentation
The repository also keeps web-only articles.
- Help pages
- 51 (8 internal)includes a package overview page
- Examples that run
- 69%18 run in a plain check (1 of them under a condition) · 7 only when donttest examples are enabled (R CMD check --as-cran) · 1 never run
- Exported functions with examples
- 54%
- Documented parameters
- 84%
- Return-value docs
- 33%
- Help pages citing references
- 4%
Downloads
Repository
- PRs merged (all time)
- 76%
- Median days to close, 50 most recently updated closed issues
- 18
- Median days to close, 50 most recently updated closed PRs
- 4
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
10 development-tooling and community-health practices detected across 6 families in the upstream repository
Checks run against github.com/rstudio/leaflet on 2026-10-18.
Show all practicesHide 2 practices
This repository shows signs of AI coding tools.
- GitHub Copilotfirst seen 2025-10-08Pull request: opened by its own account
Dependencies
Installing leaflet adds 49 packages (30 with compiled code, 45 MB of source tarballs). Heaviest: sf 9.3 MB, bslib 5.6 MB, sp 4.3 MB.
Show the 48 most downloaded dependentsHide the 48 most downloaded dependents
and 67 more dependents and 122 packages that suggest it on CRAN ↗
Code & Tests
Datasets
People & History
Show 7 more contributorsHide 7 contributors
Previously maintained by Joe Cheng (1.0.0 to 2.2.2).
Show 4 peopleHide 4 people
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- 2.2.3Latest
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- 2.2.2
- 2.2.12023-11-13 · diff ↗
- 2.2.0
- RR 4.3.0 released · 2023-04-21
- 2.1.22023-03-10 · diff ↗
- RR 4.2.0 released · 2022-04-22
- 2.1.12022-03-24 · diff ↗
- 2.1.02022-02-16 · diff ↗
- RR 4.1.0 released · 2021-05-18
- 2.0.4.12021-01-07 · diff ↗
- RR 4.0.0 released · 2020-04-24
- 2.0.3
Show 11 earlier eventsHide 11 earlier events
- RR 3.6.0 released · 2019-04-26
- 2.0.22018-08-27 · diff ↗
- 2.0.1
- RR 3.5.0 released · 2018-04-23
- 2.0.0
- RR 3.4.0 released · 2017-04-21
- 1.1.02017-02-21 · diff ↗ ·
added 34 exports
addAwesomeMarkers, addEasyButton, addEasyButtonBar, addGraticule, addLabelOnlyMarkers, addMeasure, addMiniMap, addScaleBar, addSimpleGraticule, addTerminator, awesomeIconList, awesomeIcons, clearTopoJSON, derivePoints, derivePolygons, easyButton, easyButtonState, evalFormula, expandLimits, expandLimitsBbox, filterNULL, getMapData, highlightOptions, labelOptions, leafletCRS, leafletDependencies, leafletOptions, makeAwesomeIcon, removeMeasure, removeScaleBar and 4 more - RR 3.3.0 released · 2016-05-03
- 1.0.12016-02-27 · diff ↗
- 1.0.02015-06-24
- RR 3.2.0 released · 2015-04-16
Package metadata
- First published
- 2015-06-24
- Total releases
- 15 / 11 yrs
- License
- MIT + file LICENSE OSI · relicensed from GPL-3 in 2.2.3
- Minimum R
- ≥ 3.5
- Bundled data
- 266 KB / 3 files
- Download size
- 1.9 MB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("leaflet")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-20, which the citation names so these numbers can be found later. More on citing and the projects behind them.