| Title: | Reverse geocodes in R |
|---|---|
| Description: | Given latitude and longitude, find the nearest city. Why? We get new features for feature engineering that can improve the performance of machine learning models. |
| Authors: | Jordi Rosell [aut, cre] (ORCID: <https://orcid.org/0000-0002-4349-1458>) |
| Maintainer: | Jordi Rosell <[email protected]> |
| License: | CC BY 4.0 |
| Version: | 0.1.1 |
| Built: | 2026-06-02 07:17:25 UTC |
| Source: | https://github.com/jrosell/rreversegeocoder |
Download cities with population 5000 information from geonames.
download_cities_with_population_5000()download_cities_with_population_5000()
It returns a tibble with all the data
<https://github.com/jrosell/rreversegeocoder/blob/main/R/cities.R>
download_cities_with_population_5000()download_cities_with_population_5000()
Given latitude and longitude, find the nearest city in US with population 5000.
reverse_geocoder_us_cities_with_population_5000(df)reverse_geocoder_us_cities_with_population_5000(df)
df |
A data.frame or tibble with the first two columns latitude and longitude |
It returns the nearest geonameid from geonames.
<https://github.com/jrosell/rreversegeocoder/blob/main/R/reverse_geocoder.R>
reverse_geocoder_us_cities_with_population_5000(data.frame(34.6, -120))reverse_geocoder_us_cities_with_population_5000(data.frame(34.6, -120))