{"id":13572741,"url":"https://github.com/r-spatial/leafem","last_synced_at":"2025-04-04T11:30:38.694Z","repository":{"id":34839268,"uuid":"181556932","full_name":"r-spatial/leafem","owner":"r-spatial","description":"leaflet extensions for mapview","archived":false,"fork":false,"pushed_at":"2025-02-27T11:17:28.000Z","size":19220,"stargazers_count":108,"open_issues_count":19,"forks_count":30,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-03-31T15:24:53.165Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://r-spatial.github.io/leafem/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/r-spatial.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-04-15T20:01:03.000Z","updated_at":"2025-02-27T11:13:35.000Z","dependencies_parsed_at":"2023-02-13T21:16:10.594Z","dependency_job_id":"fc71820d-7a7a-4e6e-b39a-a9e08a8c193b","html_url":"https://github.com/r-spatial/leafem","commit_stats":{"total_commits":400,"total_committers":17,"mean_commits":"23.529411764705884","dds":"0.38249999999999995","last_synced_commit":"541e2a6fa4991b9a81aadc0631205237bc2fcc37"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r-spatial%2Fleafem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r-spatial%2Fleafem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r-spatial%2Fleafem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r-spatial%2Fleafem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/r-spatial","download_url":"https://codeload.github.com/r-spatial/leafem/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247169847,"owners_count":20895361,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T15:00:18.748Z","updated_at":"2025-04-04T11:30:33.687Z","avatar_url":"https://github.com/r-spatial.png","language":"JavaScript","funding_links":[],"categories":["R","JavaScript","Leaflet Functions"],"sub_categories":["Map Preview"],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r setup, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  eval = FALSE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n\n# leafem - leaflet extensions for mapview\n\n\u003c!-- badges: start --\u003e\n[![R-CMD-check](https://github.com/r-spatial/leafem/workflows/R-CMD-check/badge.svg)](https://github.com/r-spatial/leafem/actions)\n[![cran checks](https://badges.cranchecks.info/worst/leafem.svg)](https://cran.r-project.org/web/checks/check_results_leafem.html)\n![monthly](http://cranlogs.r-pkg.org/badges/leafem)\n![total](http://cranlogs.r-pkg.org/badges/grand-total/leafem)\n[![CRAN](http://www.r-pkg.org/badges/version/leafem?color=009999)](https://cran.r-project.org/package=leafem)\n\u003c!-- badges: end --\u003e\n\n`leafem` provides extensions for package `leaflet` many of which are used by package `mapview`. The intention of this package is to enhance `leaflet` functionality to provide a more GIS-like feeling when plotting spatial data interactively.\n\n## Installation\n\nYou can install the released version of leafem from [CRAN](https://CRAN.R-project.org) with:\n\n```{r install}\ninstall.packages(\"leafem\")\n```\n\n## Extensions\n\n#### addFeatures\n\n```{r features}\nlibrary(leaflet)\n\nleaflet() %\u003e% addProviderTiles(\"OpenStreetMap\") %\u003e% addFeatures(data = breweries91)\n```\n\n![](figures/README-features.png)\n\n#### addMouseCoordinates\n\n```{r mousecoords}\nleaflet() %\u003e%\n  addProviderTiles(\"OpenStreetMap\") %\u003e%\n  addMouseCoordinates()\n```\n\n![](figures/README-garnish.png)\n\n#### garnishMap\n\n```{r garnish}\nlibrary(leaflet)\n\nm \u003c- leaflet() %\u003e% addProviderTiles(\"OpenStreetMap\")\ngarnishMap(m, addMouseCoordinates)\n```\n\n![](figures/README-garnish.png)\n\n#### addHomeButton\n\n```{r home}\nlibrary(leaflet)\nlibrary(raster)\n\nm \u003c- leaflet() %\u003e%\n  addProviderTiles(\"OpenStreetMap\") %\u003e%\n  addCircleMarkers(data = breweries91) %\u003e%\n  addHomeButton(extent(breweries91), \"breweries91\")\nm\n```\n\n![](figures/README-home.png)\n\n#### addImageQuery\n\n```{r query}\nlibrary(leaflet)\nlibrary(plainview)\n\nleaflet() %\u003e%\n  addProviderTiles(\"OpenStreetMap\") %\u003e%\n  addRasterImage(poppendorf[[1]], project = TRUE, group = \"poppendorf\",\n                 layerId = \"poppendorf\") %\u003e%\n  addImageQuery(poppendorf[[1]], project = TRUE,\n                layerId = \"poppendorf\") %\u003e%\n  addLayersControl(overlayGroups = \"poppendorf\")\n```\n\n![](figures/README-query.png)\n\n#### addLogo\n\n```{r logo}\nimg \u003c- \"https://www.r-project.org/logo/Rlogo.svg\"\n\nleaflet() %\u003e% addTiles() %\u003e% addLogo(img, url = \"https://www.r-project.org/logo/\")\n```\n\n![](figures/README-logo.png)\n\n### Code of Conduct\n\nPlease note that the 'leafem' project is released with a [Contributor Code of Conduct](https://github.com/r-spatial/leafem/blob/master/CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr-spatial%2Fleafem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fr-spatial%2Fleafem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr-spatial%2Fleafem/lists"}