{"id":13857395,"url":"https://github.com/wmgeolab/rgeoboundaries","last_synced_at":"2025-10-22T04:18:48.740Z","repository":{"id":43259287,"uuid":"260269375","full_name":"wmgeolab/rgeoboundaries","owner":"wmgeolab","description":"R client to geoBoundaries: A Political Administrative Boundaries Dataset  -","archived":false,"fork":false,"pushed_at":"2024-11-19T02:25:18.000Z","size":16846,"stargazers_count":67,"open_issues_count":7,"forks_count":9,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-19T03:25:24.819Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/wmgeolab/rgeoboundaries","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/wmgeolab.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-30T17:02:02.000Z","updated_at":"2024-11-19T02:25:22.000Z","dependencies_parsed_at":"2024-11-19T03:32:57.678Z","dependency_job_id":null,"html_url":"https://github.com/wmgeolab/rgeoboundaries","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wmgeolab%2Frgeoboundaries","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wmgeolab%2Frgeoboundaries/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wmgeolab%2Frgeoboundaries/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wmgeolab%2Frgeoboundaries/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wmgeolab","download_url":"https://codeload.github.com/wmgeolab/rgeoboundaries/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225920317,"owners_count":17545470,"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-05T03:01:35.490Z","updated_at":"2025-10-22T04:18:43.691Z","avatar_url":"https://github.com/wmgeolab.png","language":"R","funding_links":[],"categories":["R"],"sub_categories":[],"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  dev = \"svg\"\n)\n```\n\n# rgeoboundaries \u003cimg src=\"man/figures/hex-rgeoboundaries.png\" align=\"right\" height=\"139\" /\u003e\n\n\u003c!-- badges: start --\u003e\n\n[![GitLab CI Build Status](https://gitlab.com/dickoa/rgeoboundaries/badges/master/pipeline.svg)](https://gitlab.com/dickoa/rgeoboundaries/pipelines)\n[![AppVeyor build status](https://ci.appveyor.com/api/projects/status/gitlab/dickoa/rgeoboundaries?branch=master\u0026svg=true)](https://ci.appveyor.com/project/dickoa/rgeoboundaries)\n[![Codecov Code Coverage](https://codecov.io/gl/dickoa/rgeoboundaries/branch/master/graph/badge.svg)](https://codecov.io/gl/dickoa/rgeoboundaries)\n[![CRAN status](https://www.r-pkg.org/badges/version/rgeoboundaries)](https://cran.r-project.org/package=rgeoboundaries)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n`rgeoboundaries` is an R client for the [geoBoundaries API](https://www.geoboundaries.org/), providing country political administrative boundaries.\n\n\u003c!-- badges: end --\u003e\n\n## Installation\n\nYou can install the development version of rgeoboundaries using the `remotes` package:\n\n``` {r, eval = FALSE}\n# install.packages(\"remotes\")\nremotes::install_gitlab(\"dickoa/rgeoboundaries\")\nremotes::install_github(\"wmgeolab/rgeoboundaries\")\n```\n\n## Access administrative boundaries using rgeoboundaries\n\nThis is a basic example which shows you how get Mali and Senegal boundaries and plot it\n\n```{r plot, cache = TRUE}\nlibrary(rgeoboundaries)\nlibrary(sf)\nmli_sen \u003c- gb_adm0(c(\"mali\", \"senegal\"), type = \"sscgs\")\nplot(st_geometry(mli_sen))\n```\n\nWe can also get the first administrative division of all countries in the world and use ISO3 code too\n\n```{r plot_egy, cache = TRUE}\negy \u003c- gb_adm1(\"EGY\")\nplot(st_geometry(egy),\n     col = rgb(red = 1, green = 0, blue = 0, alpha = 0.5),\n     axes = TRUE, graticule = TRUE)\n```\n\nIn order to access the global administrative zones, you just need to skip the country argument (i.e set it to `NULL`) or specify `type = \"CGAZ\"`.\n\n\n```{r plot_world, cache = TRUE}\nworld \u003c- gb_adm1()\nworld_lambert \u003c- st_transform(world, \"+proj=laea +x_0=0 +y_0=0 +lon_0=0 +lat_0=0\")\npar(bty = \"n\")\nplot(st_geometry(world_lambert),\n     col = \"#E39d57\",\n     graticule = TRUE, lwd = 0.3)\n```\n\nFinally, metadata for each country and administrative level are also available.\n\n```{r, metadata}\nknitr::kable(gb_metadata(c(\"mali\", \"senegal\"), \"adm1\"))\n```\n\n## How to to cite\n\nIf you are using this package in your analysis, please cite the original `geoBoundaries` work:\n\n\u003e Runfola D, Anderson A, Baier H, Crittenden M, Dowker E, Fuhrig S, et al. (2020) geoBoundaries: A global database of political administrative boundaries. PLoS ONE 15(4): e0231866. https://doi.org/10.1371/journal.pone.0231866\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwmgeolab%2Frgeoboundaries","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwmgeolab%2Frgeoboundaries","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwmgeolab%2Frgeoboundaries/lists"}