{"id":13857284,"url":"https://github.com/dieghernan/nominatimlite","last_synced_at":"2025-03-16T20:30:18.844Z","repository":{"id":41936023,"uuid":"385600933","full_name":"dieghernan/nominatimlite","owner":"dieghernan","description":"Lite interface for getting data from OSM geocoder service.","archived":false,"fork":false,"pushed_at":"2025-02-06T14:20:55.000Z","size":61133,"stargazers_count":20,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-27T12:45:28.605Z","etag":null,"topics":["address","api","geocoding","gis","nominatim","openstreetmap","r","r-package","reverse-geocoding","rstats","shapefile","spatial"],"latest_commit_sha":null,"homepage":"https://dieghernan.github.io/nominatimlite/","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/dieghernan.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":"codemeta.json"},"funding":{"github":"dieghernan","patreon":null,"open_collective":null,"ko_fi":"dieghernan","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":null,"thanks_dev":null,"custom":null}},"created_at":"2021-07-13T12:45:30.000Z","updated_at":"2025-02-06T14:17:23.000Z","dependencies_parsed_at":"2023-10-14T19:57:04.307Z","dependency_job_id":"448db212-d3c7-4af3-a078-93c3202d5697","html_url":"https://github.com/dieghernan/nominatimlite","commit_stats":{"total_commits":354,"total_committers":8,"mean_commits":44.25,"dds":0.2005649717514124,"last_synced_commit":"bacce0b7c27b449521398e1f85ef98406178c819"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dieghernan%2Fnominatimlite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dieghernan%2Fnominatimlite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dieghernan%2Fnominatimlite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dieghernan%2Fnominatimlite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dieghernan","download_url":"https://codeload.github.com/dieghernan/nominatimlite/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243826798,"owners_count":20354221,"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":["address","api","geocoding","gis","nominatim","openstreetmap","r","r-package","reverse-geocoding","rstats","shapefile","spatial"],"created_at":"2024-08-05T03:01:32.427Z","updated_at":"2025-03-16T20:30:18.819Z","avatar_url":"https://github.com/dieghernan.png","language":"R","funding_links":["https://github.com/sponsors/dieghernan","https://ko-fi.com/dieghernan"],"categories":["R"],"sub_categories":[],"readme":"---\noutput: github_document\nbibliography: inst/REFERENCES.bib\nlink-citations: true\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  warning = FALSE,\n  message = FALSE,\n  dev = \"ragg_png\",\n  tidy = \"styler\",\n  fig.path = \"man/figures/README-\",\n  dpi = 90,\n  out.width = \"100%\"\n)\n```\n\n# nominatimlite \u003ca href='https://dieghernan.github.io/nominatimlite/'\u003e\u003cimg src=\"man/figures/logo.png\" align=\"right\" height=\"139\"/\u003e\u003c/a\u003e\n\n\u003c!-- badges: start --\u003e\n\n[![CRAN\nstatus](https://www.r-pkg.org/badges/version/nominatimlite)](https://CRAN.R-project.org/package=nominatimlite)\n[![CRAN\nresults](https://badges.cranchecks.info/worst/nominatimlite.svg)](https://cran.r-project.org/web/checks/check_results_nominatimlite.html)\n[![Downloads](https://cranlogs.r-pkg.org/badges/nominatimlite)](https://CRAN.R-project.org/package=nominatimlite)\n[![Nominatim-version](https://img.shields.io/badge/Nominatim-%E2%89%A5_4.4.0-blue)](https://nominatim.org/release-docs/develop/api/Overview/)\n[![R-CMD-check](https://github.com/dieghernan/nominatimlite/actions/workflows/check-full.yaml/badge.svg)](https://github.com/dieghernan/nominatimlite/actions/workflows/check-full.yaml)\n[![R-hub](https://github.com/dieghernan/nominatimlite/actions/workflows/rhub.yaml/badge.svg)](https://github.com/dieghernan/nominatimlite/actions/workflows/rhub.yaml)\n[![codecov](https://codecov.io/gh/dieghernan/nominatimlite/branch/main/graph/badge.svg?token=jSZ4RIsj91)](https://app.codecov.io/gh/dieghernan/nominatimlite)\n[![CodeFactor](https://www.codefactor.io/repository/github/dieghernan/nominatimlite/badge)](https://www.codefactor.io/repository/github/dieghernan/nominatimlite)\n[![r-universe](https://dieghernan.r-universe.dev/badges/nominatimlite)](https://dieghernan.r-universe.dev/nominatimlite)\n[![Project Status: Active -- The project has reached a stable, usable state and\nis being actively\ndeveloped.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)\n[![DOI](https://img.shields.io/badge/DOI-10.32614/CRAN.package.nominatimlite-blue)](https://doi.org/10.32614/CRAN.package.nominatimlite)\n[![status](https://tinyverse.netlify.app/status/nominatimlite)](https://CRAN.R-project.org/package=nominatimlite)\n\n\u003c!-- badges: end --\u003e\n\nThe goal of **nominatimlite** is to provide a light interface for geocoding\naddresses, based on the [Nominatim\nAPI](https://nominatim.org/release-docs/latest/). It also allows to load spatial\nobjects using the **sf** package.\n\nFull site with examples and vignettes on\n\u003chttps://dieghernan.github.io/nominatimlite/\u003e\n\n## What is Nominatim?\n\n**Nominatim** is a tool to search\n[OpenStreetMap](https://www.openstreetmap.org/) data by name and address\n([geocoding](https://wiki.openstreetmap.org/wiki/Geocoding \"Geocoding\")) and to\ngenerate synthetic addresses of OSM points (reverse geocoding).\n\n## Why **nominatimlite**?\n\nThe main goal of **nominatimlite** is to access the Nominatim API avoiding the\ndependency on **curl**. In some situations, **curl** may not be available or\naccessible, so **nominatimlite** uses base functions to overcome this\nlimitation.\n\n## Recommended packages\n\nThere are other packages much more complete and mature than **nominatimlite**,\nthat presents similar features:\n\n-   [**tidygeocoder**](https://jessecambon.github.io/tidygeocoder/)\n    [@R-tidygeocoder]: Allows to interface with Nominatim, Google, TomTom,\n    Mapbox, etc. for geocoding and reverse geocoding.\n-   [**osmdata**](https://docs.ropensci.org/osmdata/) [@R-osmdata]: Great for\n    downloading spatial data from OpenStreetMap, via the [Overpass\n    API](https://wiki.openstreetmap.org/wiki/Overpass_API).\n-   [**arcgeocoder**](https://dieghernan.github.io/arcgeocoder/)\n    [@R-arcgeocoder]: Lite interface for geocoding with the ArcGIS REST API\n    Service.\n\n## Installation\n\nInstall **nominatimlite** from\n[**CRAN**](https://CRAN.R-project.org/package=nominatimlite):\n\n```{r, eval=FALSE}\ninstall.packages(\"nominatimlite\")\n```\n\nYou can install the developing version of **nominatimlite** with:\n\n```{r, eval=FALSE}\nremotes::install_github(\"dieghernan/nominatimlite\")\n```\n\nAlternatively, you can install **nominatimlite** using the\n[r-universe](https://dieghernan.r-universe.dev/nominatimlite):\n\n```{r, eval=FALSE}\n# Install nominatimlite in R:\ninstall.packages(\"nominatimlite\",\n  repos = c(\n    \"https://dieghernan.r-universe.dev\",\n    \"https://cloud.r-project.org\"\n  )\n)\n```\n\n## Usage\n\n### `sf` objects\n\nWith **nominatimlite** you can extract spatial objects easily:\n\n```{r pizzahut, fig.alt=\"Locations of Pizza Hut restaurants in California extracted with nominatimlite\"}\nlibrary(nominatimlite)\n\n# Extract some points - Pizza Hut in California\n\nCA \u003c- geo_lite_sf(\"California\", points_only = FALSE)\n\npizzahut \u003c- geo_lite_sf(\"Pizza Hut, California\",\n  limit = 50,\n  custom_query = list(countrycodes = \"us\")\n)\n\nlibrary(ggplot2)\n\nggplot(CA) +\n  geom_sf() +\n  geom_sf(data = pizzahut, col = \"red\")\n```\n\nYou can also extract polygon and line objects (as provided by the Nominatim API)\nusing the option `points_only = FALSE`:\n\n```{r statue_liberty, fig.alt=\"Location of Statue of Liberty extracted with nominatimlite\"}\nsol_poly \u003c- geo_lite_sf(\"Statue of Liberty, NY, USA\", points_only = FALSE) # a building - a polygon\n\nggplot(sol_poly) +\n  geom_sf()\n```\n\n```{r line-object, fig.alt=\"Different features named Ohio extracted with nominatimlite\"}\ndayton \u003c- geo_lite_sf(\"Dayton, OH\") # default - a point\nohio_state \u003c- geo_lite_sf(\"Ohio, USA\", points_only = FALSE) # a US state - a polygon\nohio_river \u003c- geo_lite_sf(\"Ohio river\", points_only = FALSE) # a river - a line\n\nggplot() +\n  geom_sf(data = ohio_state) +\n  geom_sf(data = dayton, color = \"red\", pch = 4) +\n  geom_sf(data = ohio_river, color = \"blue\")\n```\n\n### Geocoding and reverse geocoding\n\n*Note: examples adapted from **tidygeocoder** package*\n\nIn this first example we will geocode a few addresses using the `geo_lite()`\nfunction:\n\n```{r example}\nlibrary(tibble)\n\n# create a dataframe with addresses\nsome_addresses \u003c- tribble(\n  ~name,                  ~addr,\n  \"White House\",          \"1600 Pennsylvania Ave NW, Washington, DC\",\n  \"Transamerica Pyramid\", \"600 Montgomery St, San Francisco, CA 94111\",\n  \"Willis Tower\",         \"233 S Wacker Dr, Chicago, IL 60606\"\n)\n\n# geocode the addresses\nlat_longs \u003c- geo_lite(some_addresses$addr, lat = \"latitude\", long = \"longitude\")\n```\n\nOnly latitude and longitude are returned from the geocoder service in this\nexample, but `full_results = TRUE` can be used to return all of the data from\nthe geocoder service.\n\n```{r echo=FALSE}\nknitr::kable(lat_longs)\n```\n\nTo perform reverse geocoding (obtaining addresses from geographic coordinates),\nwe can use the `reverse_geo_lite()` function. The arguments are similar to the\n`geo_lite()` function, but now we specify the input data columns with the `lat`\nand `long` arguments. The dataset used here is from the geocoder query above.\nThe single line address is returned in a column named by the `address`.\n\n```{r}\nreverse \u003c- reverse_geo_lite(\n  lat = lat_longs$latitude, long = lat_longs$longitude,\n  address = \"address_found\"\n)\n```\n\n```{r, echo = FALSE}\nknitr::kable(reverse)\n```\n\nFor more advance users, see [Nominatim\ndocs](https://nominatim.org/release-docs/latest/api/Search/) to check the\nparameters available.\n\n## Citation\n\n```{r echo=FALSE, results='asis'}\nprint(citation(\"nominatimlite\"), style = \"html\")\n```\n\nA BibTeX entry for LaTeX users is\n\n```{r echo=FALSE, comment=\"\"}\ntoBibtex(citation(\"nominatimlite\"))\n```\n\n## References\n\n::: {#refs}\n:::\n\n## Contributors\n\n\n\n\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\nAll contributions to this project are gratefully acknowledged using the [`allcontributors` package](https://github.com/ropensci/allcontributors) following the [allcontributors](https://allcontributors.org) specification. Contributions of any kind are welcome!\n\n### Code\n\n\u003ctable class=\"table allctb-table\" \u003e\n\n\u003ctr\u003e\n\u003ctd align=\"center\"\u003e\n\u003ca href=\"https://github.com/dieghernan\"\u003e\n\u003cimg src=\"https://avatars.githubusercontent.com/u/25656809?v=4\" width=\"100px;\" class=\"allctb-avatar\" alt=\"\"/\u003e\n\u003c/a\u003e\u003cbr\u003e\n\u003ca href=\"https://github.com/dieghernan/nominatimlite/commits?author=dieghernan\"\u003edieghernan\u003c/a\u003e\n\u003c/td\u003e\n\u003ctd align=\"center\"\u003e\n\u003ca href=\"https://github.com/jlacko\"\u003e\n\u003cimg src=\"https://avatars.githubusercontent.com/u/29260421?v=4\" width=\"100px;\" class=\"allctb-avatar\" alt=\"\"/\u003e\n\u003c/a\u003e\u003cbr\u003e\n\u003ca href=\"https://github.com/dieghernan/nominatimlite/commits?author=jlacko\"\u003ejlacko\u003c/a\u003e\n\u003c/td\u003e\n\u003ctd align=\"center\"\u003e\n\u003ca href=\"https://github.com/alexwhitedatamine\"\u003e\n\u003cimg src=\"https://avatars.githubusercontent.com/u/160436156?v=4\" width=\"100px;\" class=\"allctb-avatar\" alt=\"\"/\u003e\n\u003c/a\u003e\u003cbr\u003e\n\u003ca href=\"https://github.com/dieghernan/nominatimlite/commits?author=alexwhitedatamine\"\u003ealexwhitedatamine\u003c/a\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003c/table\u003e\n\n\n### Issues\n\n\u003ctable class=\"table allctb-table\" \u003e\n\n\u003ctr\u003e\n\u003ctd align=\"center\"\u003e\n\u003ca href=\"https://github.com/lshydro\"\u003e\n\u003cimg src=\"https://avatars.githubusercontent.com/u/35919005?u=4ce21d4b24e5926f43cb95b24bfd3fb257f3fb8f\u0026v=4\" width=\"100px;\" class=\"allctb-avatar\" alt=\"\"/\u003e\n\u003c/a\u003e\u003cbr\u003e\n\u003ca href=\"https://github.com/dieghernan/nominatimlite/issues?q=is%3Aissue+author%3Alshydro\"\u003elshydro\u003c/a\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003c/table\u003e\n\n\u003c!-- markdownlint-enable --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdieghernan%2Fnominatimlite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdieghernan%2Fnominatimlite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdieghernan%2Fnominatimlite/lists"}