Skip to content

Commit

Permalink
Prepare for CRAN
Browse files Browse the repository at this point in the history
  • Loading branch information
dieghernan committed May 10, 2023
1 parent 54d6417 commit cb320a4
Show file tree
Hide file tree
Showing 14 changed files with 46 additions and 40 deletions.
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ message: 'To cite package "nominatimlite" in publications use:'
type: software
license: MIT
title: 'nominatimlite: Interface with ''Nominatim'' API Service'
version: 0.1.6.9000
version: 0.2.0
doi: 10.5281/zenodo.5113195
abstract: Lite interface for getting data from 'OSM' service 'Nominatim' <https://nominatim.org/release-docs/latest/>.
Extract coordinates from addresses, find places near a set of coordinates, search
Expand All @@ -27,7 +27,7 @@ preferred-citation:
email: [email protected]
orcid: https://orcid.org/0000-0001-8457-4658
year: '2023'
version: 0.1.6.9000
version: 0.2.0
doi: 10.5281/zenodo.5113195
url: https://dieghernan.github.io/nominatimlite/
abstract: Lite interface for getting data from OSM service Nominatim <https://nominatim.org/release-docs/latest/>.
Expand Down
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: nominatimlite
Title: Interface with 'Nominatim' API Service
Version: 0.1.6.9000
Version: 0.2.0
Authors@R: c(
person("Diego", "Hernangómez", , "[email protected]", role = c("aut", "cre", "cph"),
comment = c(ORCID = "0000-0001-8457-4658")),
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# nominatimlite (development version)
# nominatimlite 0.2.0

- **rlang** and **tibble** are not explicitly required. Conversions to tibble
happens with `dplyr::tibble()`.
Expand Down
15 changes: 9 additions & 6 deletions R/bbox_to_poly.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,19 @@
#' geom_sf()
#' \donttest{
#' # Extract the bounding box of a sf object
#' Texas <- geo_lite_sf("Texas", points_only = FALSE)
#' bbox <- sf::st_bbox(Texas)
#' sfobj <- geo_lite_sf("seychelles", points_only = FALSE)
#'
#' sfobj
#'
#' bbox <- sf::st_bbox(sfobj)
#'
#' bbox
#'
#' bbox_Texas <- bbox_to_poly(bbox)
#' bbox_sfobj <- bbox_to_poly(bbox)
#'
#' ggplot(bbox_Texas) +
#' geom_sf(col = "red") +
#' geom_sf(data = Texas)
#' ggplot(bbox_sfobj) +
#' geom_sf(fill = "lightblue", alpha = 0.5) +
#' geom_sf(data = sfobj, fill = "wheat")
#' }
#' @export

Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,11 @@ Only latitude and longitude are returned from the geocoder service in
this example, but `full_results = TRUE` can be used to return all of the
data from the geocoder service.

| query | latitude | longitude | address |
|:-------------------------------------------|---------:|-----------:|:--------------------------------------------------------------------------------------------------------------------------------------------|
| 1600 Pennsylvania Ave NW, Washington, DC | 38.89770 | -77.03655 | White House, 1600, Pennsylvania Avenue Northwest, Washington, District of Columbia, 20500, United States |
| 600 Montgomery St, San Francisco, CA 94111 | 37.79520 | -122.40279 | Transamerica Pyramid, 600, Montgomery Street, Financial District, San Francisco, CAL Fire Northern Region, California, 94111, United States |
| 233 S Wacker Dr, Chicago, IL 60606 | 41.87887 | -87.63591 | Willis Tower, 233, South Wacker Drive, Printer’s Row, Loop, Chicago, Cook County, Illinois, 60606, United States |
| query | latitude | longitude | address |
|:-------------------------------------------|---------:|-----------:|:------------------------------------------------------------------------------------------------------------------|
| 1600 Pennsylvania Ave NW, Washington, DC | 38.89770 | -77.03655 | White House, 1600, Pennsylvania Avenue Northwest, Washington, District of Columbia, 20500, United States |
| 600 Montgomery St, San Francisco, CA 94111 | 37.79520 | -122.40279 | Transamerica Pyramid, 600, Montgomery Street, Financial District, San Francisco, California, 94111, United States |
| 233 S Wacker Dr, Chicago, IL 60606 | 41.87887 | -87.63591 | Willis Tower, 233, South Wacker Drive, Printer’s Row, Loop, Chicago, Cook County, Illinois, 60606, United States |

To perform reverse geocoding (obtaining addresses from geographic
coordinates), we can use the `reverse_geo_lite()` function. The
Expand All @@ -180,11 +180,11 @@ reverse <- reverse_geo_lite(
)
```

| address_found | lat | lon |
|:--------------------------------------------------------------------------------------------------------------------------------------------|---------:|-----------:|
| White House, 1600, Pennsylvania Avenue Northwest, Washington, District of Columbia, 20500, United States | 38.89770 | -77.03655 |
| Transamerica Pyramid, 600, Montgomery Street, Financial District, San Francisco, CAL Fire Northern Region, California, 94111, United States | 37.79520 | -122.40279 |
| Willis Tower, 233, South Wacker Drive, Printer’s Row, Loop, Chicago, Cook County, Illinois, 60606, United States | 41.87887 | -87.63591 |
| address_found | lat | lon |
|:------------------------------------------------------------------------------------------------------------------|---------:|-----------:|
| White House, 1600, Pennsylvania Avenue Northwest, Washington, District of Columbia, 20500, United States | 38.89770 | -77.03655 |
| Transamerica Pyramid, 600, Montgomery Street, Financial District, San Francisco, California, 94111, United States | 37.79520 | -122.40279 |
| Willis Tower, West Adams Street, Printer’s Row, Loop, Chicago, Cook County, Illinois, 60606, United States | 41.87874 | -87.63602 |

For more advance users, see [Nominatim
docs](https://nominatim.org/release-docs/latest/api/Search/) to check
Expand All @@ -204,7 +204,7 @@ A BibTeX entry for LaTeX users is
title = {nominatimlite: Interface with 'Nominatim' API Service},
author = {Diego Hernangómez},
year = {2023},
version = {0.1.6.9000},
version = {0.2.0},
doi = {10.5281/zenodo.5113195},
url = {https://dieghernan.github.io/nominatimlite/},
abstract = {Lite interface for getting data from OSM service Nominatim <https://nominatim.org/release-docs/latest/>. Extract coordinates from addresses, find places near a set of coordinates, search for amenities and return spatial objects on sf format.},
Expand Down
6 changes: 3 additions & 3 deletions codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
"codeRepository": "https://github.com/dieghernan/nominatimlite",
"issueTracker": "https://github.com/dieghernan/nominatimlite/issues",
"license": "https://spdx.org/licenses/MIT",
"version": "0.1.6.9000",
"version": "0.2.0",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
"url": "https://r-project.org"
},
"runtimePlatform": "R version 4.3.0 (2023-04-21)",
"runtimePlatform": "R version 4.3.0 (2023-04-21 ucrt)",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
Expand Down Expand Up @@ -186,7 +186,7 @@
},
"applicationCategory": "cartography",
"keywords": ["r", "geocoding", "openstreetmap", "address", "nominatim", "reverse-geocoding", "rstats", "shapefile", "r-package", "spatial", "cran", "api-wrapper", "api", "gis"],
"fileSize": "308.268KB",
"fileSize": "311.194KB",
"citation": [
{
"@type": "SoftwareSourceCode",
Expand Down
Binary file modified data/osm_amenities.rda
Binary file not shown.
15 changes: 9 additions & 6 deletions man/bbox_to_poly.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified man/figures/README-line-object-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-pizzahut-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-statue_liberty-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 10 additions & 10 deletions vignettes/nominatimlite.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,11 @@ example, but `full_results = TRUE` can be used to return all of the data from
the geocoder service.


|query | latitude| longitude|address |
|:------------------------------------------|--------:|----------:|:-------------------------------------------------------------------------------------------------------------------------------------------|
|1600 Pennsylvania Ave NW, Washington, DC | 38.89770| -77.03655|White House, 1600, Pennsylvania Avenue Northwest, Washington, District of Columbia, 20500, United States |
|600 Montgomery St, San Francisco, CA 94111 | 37.79520| -122.40279|Transamerica Pyramid, 600, Montgomery Street, Financial District, San Francisco, CAL Fire Northern Region, California, 94111, United States |
|233 S Wacker Dr, Chicago, IL 60606 | 41.87887| -87.63591|Willis Tower, 233, South Wacker Drive, Printer's Row, Loop, Chicago, Cook County, Illinois, 60606, United States |
|query | latitude| longitude|address |
|:------------------------------------------|--------:|----------:|:-----------------------------------------------------------------------------------------------------------------|
|1600 Pennsylvania Ave NW, Washington, DC | 38.89770| -77.03655|White House, 1600, Pennsylvania Avenue Northwest, Washington, District of Columbia, 20500, United States |
|600 Montgomery St, San Francisco, CA 94111 | 37.79520| -122.40279|Transamerica Pyramid, 600, Montgomery Street, Financial District, San Francisco, California, 94111, United States |
|233 S Wacker Dr, Chicago, IL 60606 | 41.87887| -87.63591|Willis Tower, 233, South Wacker Drive, Printer's Row, Loop, Chicago, Cook County, Illinois, 60606, United States |

To perform reverse geocoding (obtaining addresses from geographic coordinates),
we can use the `reverse_geo_lite()` function. The arguments are similar to the
Expand All @@ -132,11 +132,11 @@ reverse <- reverse_geo_lite(
```


|address_found | lat| lon|
|:-------------------------------------------------------------------------------------------------------------------------------------------|--------:|----------:|
|White House, 1600, Pennsylvania Avenue Northwest, Washington, District of Columbia, 20500, United States | 38.89770| -77.03655|
|Transamerica Pyramid, 600, Montgomery Street, Financial District, San Francisco, CAL Fire Northern Region, California, 94111, United States | 37.79520| -122.40279|
|Willis Tower, 233, South Wacker Drive, Printer's Row, Loop, Chicago, Cook County, Illinois, 60606, United States | 41.87887| -87.63591|
|address_found | lat| lon|
|:-----------------------------------------------------------------------------------------------------------------|--------:|----------:|
|White House, 1600, Pennsylvania Avenue Northwest, Washington, District of Columbia, 20500, United States | 38.89770| -77.03655|
|Transamerica Pyramid, 600, Montgomery Street, Financial District, San Francisco, California, 94111, United States | 37.79520| -122.40279|
|Willis Tower, West Adams Street, Printer's Row, Loop, Chicago, Cook County, Illinois, 60606, United States | 41.87874| -87.63602|

For more advance users, see [Nominatim
docs](https://nominatim.org/release-docs/latest/api/Search/) to check the
Expand Down
Binary file modified vignettes/pizzahut-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified vignettes/sol-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit cb320a4

Please sign in to comment.