{"id":24645542,"url":"https://github.com/crazycapivara/mapboxer","last_synced_at":"2025-05-12T20:27:12.850Z","repository":{"id":39084929,"uuid":"273180444","full_name":"crazycapivara/mapboxer","owner":"crazycapivara","description":"An R Interface to Mapbox GL JS","archived":false,"fork":false,"pushed_at":"2024-01-04T22:17:16.000Z","size":2603,"stargazers_count":55,"open_issues_count":59,"forks_count":7,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-15T21:41:57.979Z","etag":null,"topics":["htmlwidgets","mapbox-gl-js","r","spatial","webgl"],"latest_commit_sha":null,"homepage":"https://crazycapivara.github.io/mapboxer/","language":"R","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/crazycapivara.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-06-18T08:14:48.000Z","updated_at":"2024-11-03T18:23:36.000Z","dependencies_parsed_at":"2023-02-07T22:30:56.291Z","dependency_job_id":null,"html_url":"https://github.com/crazycapivara/mapboxer","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crazycapivara%2Fmapboxer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crazycapivara%2Fmapboxer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crazycapivara%2Fmapboxer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crazycapivara%2Fmapboxer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crazycapivara","download_url":"https://codeload.github.com/crazycapivara/mapboxer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253815783,"owners_count":21968689,"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":["htmlwidgets","mapbox-gl-js","r","spatial","webgl"],"created_at":"2025-01-25T14:15:45.635Z","updated_at":"2025-05-12T20:27:12.779Z","avatar_url":"https://github.com/crazycapivara.png","language":"R","readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n# mapboxer: An R Interface to Mapbox GL JS\n\n\u003c!-- badges: start --\u003e\n[![CRAN status](https://www.r-pkg.org/badges/version/mapboxer)](https://CRAN.R-project.org/package=mapboxer)\n[![github_status_badge](https://img.shields.io/badge/github-0.4.2-blue.svg)](https://github.com/crazycapivara/mapboxer/releases/latest)\n[![Travis-CI Build Status](https://travis-ci.org/crazycapivara/mapboxer.svg?branch=master)](https://travis-ci.org/crazycapivara/mapboxer)\n[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)\n\u003c!-- badges: end --\u003e\n\n`mapboxer` makes [Mapbox GL JS](https://docs.mapbox.com/mapbox-gl-js/api/),\nan open source JavaScript library that uses WebGL to render interactive maps,\navailable within R via the [htmlwidgets](https://www.htmlwidgets.org/) package.\n\n![persons-in-manhatten](man/figures/README-persons-in-manhatten.png)\n\n## Note\n\n`mapboxer` provides bindings to v1.x.x of Mapbox GL JS, which is under the 3-Clause BSD license. See also [breaking changes in Mapbox GL JS v2.0.0](https://github.com/mapbox/mapbox-gl-js/releases/tag/v2.0.0).\n\n## Installation\n\nInstall the release version from [CRAN](https://cran.r-project.org/) with:\n\n```r\ninstall.packages(\"mapboxer\")\n```\n\nInstall the development version from [GitHub](https://github.com/) with:\n\n```r\n# install.packages(\"remotes\")\nremotes::install_github(\"crazycapivara/mapboxer\")\n```\n\n## Usage\n\n```{r examples}\nlibrary(mapboxer)\n\nmap \u003c- motor_vehicle_collisions_nyc %\u003e%\n  dplyr::mutate(\n    color = ifelse(injured == 0, \"yellow\", \"red\")\n  ) %\u003e%\n  as_mapbox_source() %\u003e%\n  mapboxer(\n    center = c(-73.9165, 40.7114),\n    zoom = 10\n  ) %\u003e%\n  add_navigation_control() %\u003e%\n  add_circle_layer(\n    circle_color = c(\"get\", \"color\"),\n    circle_blur = 1,\n    circle_stroke_color = \"red\",\n    circle_stroke_width = 1,\n    popup = \"\u003cp\u003e{{date}} {{time}}\u003c/p\u003e\u003cp\u003eNumber of persons injured: {{injured}}\u003c/p\u003e\"\n  )\n\nif (interactive()) map\n```\n\nBy default mapboxer uses [Carto vector styles](https://github.com/CartoDB/basemap-styles)\nas basemaps. It is also possible to use raster tiles or a background color.\n\nIf you want to use styles from [Mapbox](https://www.mapbox.com/maps) it is recommended that you store your API token in an environment vatiable called `MAPBOX_API_TOKEN`.\n\n## Documentation\n\n- [Get Started](https://crazycapivara.github.io/mapboxer/articles/mapboxer.html)\n- [API Reference](https://crazycapivara.github.io/mapboxer/reference/)\n- [Examples](https://github.com/crazycapivara/mapboxer/tree/master/examples)\n- [Showcase](https://crazycapivara.github.io/mapboxer/articles/examples/showcase.html)\n\n## Development\n\nAll JavaScript code of mapboxer is located in `javascript/src`.\n\nInstall dependencies and build the library with:\n\n```bash\nnpm install\nnpm run build\n```\n\nThe module is written to `inst/htmlwidgets`.\n\nSpin up the dev server with:\n\n```bash\nnpm run start\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrazycapivara%2Fmapboxer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrazycapivara%2Fmapboxer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrazycapivara%2Fmapboxer/lists"}