{"id":13505547,"url":"https://github.com/ropensci/geojsonio","last_synced_at":"2025-04-04T08:09:52.881Z","repository":{"id":15601704,"uuid":"18337862","full_name":"ropensci/geojsonio","owner":"ropensci","description":"Convert many data formats to \u0026 from GeoJSON \u0026 TopoJSON","archived":false,"fork":false,"pushed_at":"2023-10-25T15:12:42.000Z","size":4936,"stargazers_count":151,"open_issues_count":9,"forks_count":59,"subscribers_count":13,"default_branch":"main","last_synced_at":"2025-03-28T07:09:22.739Z","etag":null,"topics":["geojson","io","r","r-package","rstats","topojson"],"latest_commit_sha":null,"homepage":"https://docs.ropensci.org/geojsonio","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/ropensci.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2014-04-01T17:20:23.000Z","updated_at":"2025-02-04T12:56:37.000Z","dependencies_parsed_at":"2023-02-18T09:16:08.549Z","dependency_job_id":"a6be9d1a-9a89-4d15-bd55-b4323ea77ee9","html_url":"https://github.com/ropensci/geojsonio","commit_stats":{"total_commits":825,"total_committers":21,"mean_commits":"39.285714285714285","dds":0.3478787878787879,"last_synced_commit":"321c679057e2dde282e564f3c845dea7f280ccf9"},"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ropensci%2Fgeojsonio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ropensci%2Fgeojsonio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ropensci%2Fgeojsonio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ropensci%2Fgeojsonio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ropensci","download_url":"https://codeload.github.com/ropensci/geojsonio/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247142074,"owners_count":20890653,"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":["geojson","io","r","r-package","rstats","topojson"],"created_at":"2024-08-01T00:01:09.704Z","updated_at":"2025-04-04T08:09:52.860Z","avatar_url":"https://github.com/ropensci.png","language":"R","funding_links":[],"categories":["Data conversion tools","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)\n```\n\n# geojsonio\n\n\u003c!-- badges: start --\u003e\n[![R-CMD-check](https://github.com/ropensci/geojsonio/workflows/R-CMD-check/badge.svg)](https://github.com/ropensci/geojsonio/actions?query=workflow%3AR-CMD-check)\n[![cran checks](https://badges.cranchecks.info/worst/geojsonio.svg)](https://cran.r-project.org/web/checks/check_results_geojsonio.html)\n[![codecov.io](https://codecov.io/github/ropensci/geojsonio/coverage.svg)](https://app.codecov.io/github/ropensci/geojsonio?branch=main)\n[![rstudio mirror downloads](https://cranlogs.r-pkg.org/badges/geojsonio)](https://github.com/r-hub/cranlogs.app)\n[![cran version](https://www.r-pkg.org/badges/version/geojsonio)](https://cran.r-project.org/package=geojsonio)\n[![Project Status: Inactive – The project has reached a stable, usable state but is no longer being actively developed; support/maintenance will be provided as time allows.](https://www.repostatus.org/badges/latest/inactive.svg)](https://www.repostatus.org/#inactive)\n\u003c!-- badges: end --\u003e\n\n```{r echo=FALSE}\nlibrary(\"knitr\")\nhook_output \u003c- knitr::knit_hooks$get(\"output\")\nknitr::knit_hooks$set(output = function(x, options) {\n   lines \u003c- options$output.lines\n   if (is.null(lines)) {\n     return(hook_output(x, options))  # pass to default hook\n   }\n   x \u003c- unlist(strsplit(x, \"\\n\"))\n   more \u003c- \"...\"\n   if (length(lines)==1) {        # first n lines\n     if (length(x) \u003e lines) {\n       # truncate the output, but add ....\n       x \u003c- c(head(x, lines), more)\n     }\n   } else {\n     x \u003c- c(if (abs(lines[1])\u003e1) more else NULL,\n            x[lines],\n            if (length(x)\u003elines[abs(length(lines))]) more else NULL\n           )\n   }\n   # paste these lines together\n   x \u003c- paste(c(x, \"\"), collapse = \"\\n\")\n   hook_output(x, options)\n })\n\nknitr::opts_chunk$set(\n  comment = \"#\u003e\",\n  collapse = TRUE,\n  warning = FALSE,\n  message = FALSE,\n  eval = FALSE\n)\n```\n\n\n__Convert various data formats to GeoJSON or TopoJSON__\n\nThis package is a utility to convert geographic data to GeoJSON and TopoJSON formats. Nothing else. We hope to do this one job very well, and handle all reasonable use cases.\n\nFunctions in this package are organized first around what you're working with or want to get, GeoJSON or TopoJSON, then convert to or read from various formats:\n\n* `geojson_list()`/`topojson_list()` - convert to GeoJSON/TopoJSON as R list format\n* `geojson_json()`/`topojson_json()` - convert to GeoJSON/TopoJSON as JSON\n* `geojson_sp()` - convert output of `geojson_list()` or `geojson_json()` to `sp` spatial objects\n* `geojson_sf()` - convert output of `geojson_list()` or `geojson_json()` to `sf` objects\n* `geojson_read()`/`topojson_read()` - read a GeoJSON/TopoJSON file from file path or URL\n* `geojson_write()`/`topojson_write()` - write a GeoJSON/TopoJSON file locally\n\nEach of the above functions have methods for various objects/classes, including `numeric`, `data.frame`, `list`, `SpatialPolygons`, `SpatialLines`, `SpatialPoints`, etc.\n\nAdditional functions:\n\n* `map_gist()` - push up a GeoJSON or topojson file as a GitHub gist (renders as an interactive map)\n* `map_leaf()` - create a local interactive map using the `leaflet` package\n\n## \\*json Info\n\n* GeoJSON - [spec](https://www.rfc-editor.org/rfc/rfc7946)\n* [GeoJSON lint](https://geojsonlint.com/)\n* TopoJSON - [spec](https://github.com/topojson/topojson-specification/blob/master/README.md)\n\n\n## Install\n\n_Mac_\n\nInstall `GDAL` on the command line first, e.g., using `homebrew`\n\n```\nbrew install gdal\n```\n\n_Linux_\n\nGet deps first\n\n```{r}\n#| echo: true\n#| eval: true\nremotes::system_requirements(\"ubuntu\", \"20.04\", package = \"geojsonio\")\n```\n\n\n__Install geojsonio__\n\nStable version from CRAN\n\n```{r}\ninstall.packages(\"geojsonio\")\n```\n\nOr development version from GitHub\n\n```{r}\ninstall.packages(\"remotes\")\nremotes::install_github(\"ropensci/geojsonio\")\n```\n\n```{r}\nlibrary(\"geojsonio\")\n```\n\n## What's the future of geojsonio?\n\ngeojsonio is stable and we expect it to stay on CRAN. The package is a \ndependency for a number of other packages and is downloaded tens of thousands\nof times per month; moving forward the priority with this package is to make \nsure that those packages and users are able to keep using the package.\n\nThat said, we do not anticipate much further development; there will not likely\nbe many major new features added or new interfaces developed. We'll avoid \nmaking breaking changes as much as possible.\n\nIf you find bugs in geojsonio or want to contribute new features: please feel\nfree to submit PRs! So long as the existing interface stays intact, we'd be\nmore than happy to make the package more useful for you. That said, we don't \nanticipate being particularly responsive to feature requests \n(without a matching PR) moving forward.\n\n## Meta\n\n* Please [report any issues or bugs](https://github.com/ropensci/geojsonio/issues).\n* License: MIT\n* Get citation information for `geojsonio` in R doing `citation(package = 'geojsonio')`\n* Please note that this package is released with a [Contributor Code of Conduct](https://ropensci.org/code-of-conduct/). By contributing to this project, you agree to abide by its terms.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fropensci%2Fgeojsonio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fropensci%2Fgeojsonio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fropensci%2Fgeojsonio/lists"}