­čîÉ R package for the OpenCage API -- both forward and reverse geocoding ­čîÉ
R

README.md

opencage

CRAN\_Status\_Badge Build Status Build status codecov.io

Installation

Install the package with:

install.packages("opencage")

Or install the development version using devtools with:

library("devtools")
install_github("ropensci/opencage")

This package is an interface to the OpenCage API that allows forward and reverse geocoding. To use the package, you will need an API key. To get an API key for OpenCage geocoding, register at https://geocoder.opencagedata.com/pricing. The free API key provides up to 2,500 calls a day. For ease of use, save your API key as an environment variable as described at http://stat545.com/bit003_api-key-env-var.html.

Both functions of the package will conveniently look for your API key using Sys.getenv("OPENCAGE_KEY") so if your API key is an environment variable called "OPENCAGE_KEY" you don't need to input it manually.

Geocoding

The OpenCage API supports forward and reverse geocoding. Sources of OpenCage are open geospatial data including OpenStreetMap, Yahoo! GeoPlanet, Natural Earth Data, Thematic Mapping, Ordnance Survey OpenSpace, Statistics New Zealand, Zillow, MaxMind, GeoNames, the US Census Bureau and Flickr's shapefiles plus a whole lot more besides. See this page for the full list of credits.

Both forward and reverse geocoding typically return multiple results. Regarding these multiple results, the API doc states, "In cases where the geocoder is able to find multiple matches, the geocoder will return multiple results. The confidence or coordinates for each result should be examined to determine whether each result from an ambiguous query is sufficiently high to warrant using a result or not. A good strategy to reduce ambiguity is to use the optional bounds parameter described below to limit the area searched." Multiple results might mean you get a result for the airport and a road when querying a city name, or results for cities with the same name in different countries.

Below are two simple examples.

Forward geocoding

Forward geocoding is from placename to latitude and longitude tuplet(s).

library("opencage")
output <- opencage_forward(placename = "Sarzeau")
print(output$time_stamp)
## [1] "2016-12-02 10:00:03 CET"
library("dplyr")
output$rate_info %>% knitr::kable()
limit remaining reset
2500 2499 2016-12-03 01:00:00
output$results %>% knitr::kable()
annotations.DMS.lat annotations.DMS.lng annotations.MGRS annotations.Maidenhead annotations.Mercator.x annotations.Mercator.y annotations.OSM.edit_url annotations.OSM.url annotations.callingcode annotations.currency.decimal_mark annotations.currency.html_entity annotations.currency.iso_code annotations.currency.iso_numeric annotations.currency.name annotations.currency.smallest_denomination annotations.currency.subunit annotations.currency.subunit_to_unit annotations.currency.symbol annotations.currency.symbol_first annotations.currency.thousands_separator annotations.geohash annotations.qibla annotations.sun.rise.apparent annotations.sun.rise.astronomical annotations.sun.rise.civil annotations.sun.rise.nautical annotations.sun.set.apparent annotations.sun.set.astronomical annotations.sun.set.civil annotations.sun.set.nautical annotations.timezone.name annotations.timezone.now_in_dst annotations.timezone.offset_sec annotations.timezone.offset_string annotations.timezone.short_name annotations.what3words.words bounds.northeast.lat bounds.northeast.lng bounds.southwest.lat bounds.southwest.lng components._type components.city components.country components.country_code components.county components.postcode components.state confidence formatted geometry.lat geometry.lng components.post_office components.road components.suburb components.village
47┬░ 31' 43.56984'' N 2┬░ 45' 51.11856'' W 30TWT1774963954 IN87om86hv -307709.292 5997281.031 https://www.openstreetmap.org/edit?relation=959447#map=17/47.52877/-2.76420 https://www.openstreetmap.org/?mlat=47.52877&mlon=-2.76420#map=17/47.52877/-2.76420 33 , ÔéČ EUR 978 Euro 1 Cent 100 ÔéČ 1 . gbqn3h75jkz3h3mvtyj6 112.34 1480664400 1480657740 1480662300 1480659960 1480695660 1480702320 1480697760 1480700100 Europe/Paris 0 3600 100 CET gasp.jiggle.creamier 47.568813 -2.6630649 47.484236 -2.8536849 city Sarzeau France fr Vannes 56370 Brittany 6 56370 Sarzeau, France 47.52877 -2.7642 NA NA NA NA
47┬░ 31' 40.80828'' N 2┬░ 46' 7.68144'' W 30TWT1740363867 IN87om76rr -308221.451 5997154.952 https://www.openstreetmap.org/edit?node=846574100#map=17/47.52800/-2.76880 https://www.openstreetmap.org/?mlat=47.52800&mlon=-2.76880#map=17/47.52800/-2.76880 33 , ÔéČ EUR 978 Euro 1 Cent 100 ÔéČ 1 . gbqn2upydmbc15dm9h6g 112.34 1480664400 1480657740 1480662300 1480659960 1480695660 1480702320 1480697760 1480700100 Europe/Paris 0 3600 100 CET netball.anchored.accomplice 47.5280523 -2.7687504 47.5279523 -2.7688504 post_office NA France fr Vannes 56370 Brittany 10 Sarzeau, Rue de la Poste, 56370 Sarzeau, France 47.52800 -2.7688 Sarzeau Rue de la Poste Kerjolis Sarzeau

Reverse geocoding

Reverse geocoding is from latitude and longitude to placename(s).

output2 <- opencage_reverse(latitude = 51.5034070, 
                            longitude = -0.1275920)
print(output2$time_stamp)
## [1] "2016-12-02 10:09:33 CET"
output2$rate_info %>% knitr::kable()
limit remaining reset
2500 2498 2016-12-03 01:00:00
output2$results %>% knitr::kable()
annotations.DMS.lat annotations.DMS.lng annotations.MGRS annotations.Maidenhead annotations.Mercator.x annotations.Mercator.y annotations.OSGB.easting annotations.OSGB.gridref annotations.OSGB.northing annotations.OSM.edit_url annotations.OSM.url annotations.callingcode annotations.currency.decimal_mark annotations.currency.html_entity annotations.currency.iso_code annotations.currency.iso_numeric annotations.currency.name annotations.currency.smallest_denomination annotations.currency.subunit annotations.currency.subunit_to_unit annotations.currency.symbol annotations.currency.symbol_first annotations.currency.thousands_separator annotations.geohash annotations.qibla annotations.sun.rise.apparent annotations.sun.rise.astronomical annotations.sun.rise.civil annotations.sun.rise.nautical annotations.sun.set.apparent annotations.sun.set.astronomical annotations.sun.set.civil annotations.sun.set.nautical annotations.timezone.name annotations.timezone.now_in_dst annotations.timezone.offset_sec annotations.timezone.offset_string annotations.timezone.short_name annotations.what3words.words components._type components.attraction components.city components.country components.country_code components.house_number components.neighbourhood components.postcode components.road components.state components.state_district components.suburb confidence formatted geometry.lat geometry.lng
51° 30' 12.38490'' N 0° 7' 39.74919'' E 30UXC9933909723 IO91wm40qt -14216.402 6677371.368 530044.64 TQ 300 799 179939.726 https://www.openstreetmap.org/edit?relation=1879842#map=17/51.50344/-0.12771 https://www.openstreetmap.org/?mlat=51.50344&mlon=-0.12771#map=17/51.50344/-0.12771 44 . £ GBP 826 British Pound 1 Penny 100 £ 1 , gcpuvpgj21jujy3ytfp1 118.98 1480664760 1480657440 1480662420 1480659900 1480694040 1480701360 1480696380 1480698960 Europe/London 0 0 0 GMT onions.toned.active attraction 10 Downing Street London United Kingdom gb 10 St. James's SW1A 2AA Downing Street England Greater London Covent Garden 10 10 Downing Street, London SW1A 2AA, United Kingdom 51.50344 -0.1277081

Output

For both opencage_forward and opencage_reverse functions, the package returns a list with a time stamp for the query, the total number of results, a data.frame (dplyr tbl_df) with information about the remaining calls to the API unless you have an unlimited account, and a data.frame (dplyr tbl_df) with the results corresponding to your query. You can find longitude and latitude for each results as geometry.lat and geometry.lng. Other information includes country and country information, time of sunset and sunrise, geohash (a geocoding system identifying a point with a single string, as explained in many more details here and here; for pure conversion between longitude/latitude and geohashes, see this package). Depending on the data available in the API for the results one gets different columns; there can be a lot to explore!

Parameters

Optional parameters of both opencage_forward and opencage_reverse can make the query more precise:

  • bounds: Provides the geocoder with a hint to the region that the query resides in. This value will restrict the possible results to the supplied region. The bounds parameter should be specified as 4 coordinate points forming the south-west and north-east corners of a bounding box. For example, bounds = c(-0.563160, 51.280430, 0.278970, 51.683979) (min long, min lat, max long, max lat).

Below is an example of the use of bounds where the rectangle given in the second call does not include Europe so that we don't get results for Berlin in Germany.

results1 <- opencage_forward(placename = "Berlin")
results1$results %>% knitr::kable()
annotations.DMS.lat annotations.DMS.lng annotations.MGRS annotations.Maidenhead annotations.Mercator.x annotations.Mercator.y annotations.OSM.edit_url annotations.OSM.url annotations.callingcode annotations.currency.decimal_mark annotations.currency.html_entity annotations.currency.iso_code annotations.currency.iso_numeric annotations.currency.name annotations.currency.smallest_denomination annotations.currency.subunit annotations.currency.subunit_to_unit annotations.currency.symbol annotations.currency.symbol_first annotations.currency.thousands_separator annotations.geohash annotations.qibla annotations.sun.rise.apparent annotations.sun.rise.astronomical annotations.sun.rise.civil annotations.sun.rise.nautical annotations.sun.set.apparent annotations.sun.set.astronomical annotations.sun.set.civil annotations.sun.set.nautical annotations.timezone.name annotations.timezone.now_in_dst annotations.timezone.offset_sec annotations.timezone.offset_string annotations.timezone.short_name annotations.what3words.words bounds.northeast.lat bounds.northeast.lng bounds.southwest.lat bounds.southwest.lng components._type components.city components.country components.country_code components.state confidence formatted geometry.lat geometry.lng annotations.currency.alternate_symbols annotations.currency.disambiguate_symbol components.county components.town components.city_district
52┬░ 31' 1.33140'' N 13┬░ 23' 19.89564'' E 33UUU9067619766 JO62qm64pc 1490441.066 6860227.862 https://www.openstreetmap.org/edit?node=240109189#map=17/52.51704/13.38886 https://www.openstreetmap.org/?mlat=52.51704&mlon=13.38886#map=17/52.51704/13.38886 49 , ÔéČ EUR 978 Euro 1 Cent 100 ÔéČ 1 . u33db8mmzj1t355u0c0j 136.66 1480661820 1480654320 1480659420 1480656780 1480690500 1480698000 1480692960 1480695540 Europe/Berlin 0 3600 100 CET third.gurgled.such 52.6770365 13.5488599 52.3570365 13.2288599 city Berlin Germany de Berlin 4 Berlin, Germany 52.517037 13.38886 NA NA NA NA NA
44┬░ 28' 7.21056'' N 71┬░ 11' 6.27612'' W 19TCK2619726251 FN44jl72sl -7924286.49 5508315.317 https://www.openstreetmap.org/edit?relation=170184#map=17/44.46867/-71.18508 https://www.openstreetmap.org/?mlat=44.46867&mlon=-71.18508#map=17/44.46867/-71.18508 1 . $ USD 840 United States Dollar 1 Cent 100 $ 1 , drvkupk8g2zdsyw72s2c 60.36 1480680180 1480673880 1480678200 1480675980 1480712700 1480718940 1480714680 1480716840 America/New_York 0 -18000 -500 EST angle.liability.nerve 44.528436 -71.1236419 44.445057 -71.3978579 city Berlin United States of America us New Hampshire 5 Berlin, Co├Âs County, New Hampshire, United States of America 44.468670 -71.18508 US$ US$ Co├Âs County NA NA
41┬░ 37' 17.35680'' N 72┬░ 44' 44.34648'' W 18TXM8780710206 FN31po09md -8098008.916 5076059.694 https://www.openstreetmap.org/edit?node=158845944#map=17/41.62149/-72.74565 https://www.openstreetmap.org/?mlat=41.62149&mlon=-72.74565#map=17/41.62149/-72.74565 1 . $ USD 840 United States Dollar 1 Cent 100 $ 1 , drkkb8unxrwwbsuj9tjy 59.3 1480680000 1480674060 1480678140 1480676040 1480713600 1480719540 1480715460 1480717560 America/New_York 0 -18000 -500 EST frosts.crowds.reef 41.661488 -72.7056518 41.581488 -72.7856518 city NA United States of America us Connecticut 7 Berlin, Hartford County, Connecticut, United States of America 41.621488 -72.74565 US$ US$ Hartford County Berlin NA
39┬░ 47' 28.41432'' N 74┬░ 55' 44.59260'' W 18SWK0607404588 FM29ms89mv -8341064.081 4808298.871 https://www.openstreetmap.org/edit?relation=170680#map=17/39.79123/-74.92905 https://www.openstreetmap.org/?mlat=39.79123&mlon=-74.92905#map=17/39.79123/-74.92905 1 . $ USD 840 United States Dollar 1 Cent 100 $ 1 , dr4dqgy2dw0jyzb7kgs3 57.91 1480680180 1480674420 1480678380 1480676400 1480714440 1480720260 1480716240 1480718280 America/New_York 0 -18000 -500 EST verdict.rushes.upgrading 39.8091498 -74.9079589 39.77601 -74.9661129 city Berlin United States of America us New Jersey 7 Berlin, Camden County, New Jersey, United States of America 39.791226 -74.92905 US$ US$ Camden County NA NA
42┬░ 22' 52.33440'' N 71┬░ 38' 13.24320'' W 19TBG8291095470 FN42ej31nl -7974595.698 5189444.074 https://www.openstreetmap.org/edit?relation=1844156#map=17/42.38120/-71.63701 https://www.openstreetmap.org/?mlat=42.38120&mlon=-71.63701#map=17/42.38120/-71.63701 1 . $ USD 840 United States Dollar 1 Cent 100 $ 1 , drt11g782th32euc09nn 60.04 1480679880 1480673820 1480677960 1480675860 1480713240 1480719240 1480715100 1480717200 America/New_York 0 -18000 -500 EST astonished.rightfully.pythons 42.4182811 -71.5802309 42.3505932 -71.6787957 city Berlin United States of America us Massachusetts 7 Berlin, Worcester County, Massachusetts, United States of America 42.381204 -71.63701 US$ US$ Worcester County NA NA
38┬░ 19' 21.41544'' N 75┬░ 13' 3.68076'' W 18SVH8097141633 FM28jh37vk -8373194.849 4598602.233 https://www.openstreetmap.org/edit?relation=133689#map=17/38.32262/-75.21769 https://www.openstreetmap.org/?mlat=38.32262&mlon=-75.21769#map=17/38.32262/-75.21769 1 . $ USD 840 United States Dollar 1 Cent 100 $ 1 , dqfd02kjkv3cm4dts5ph 57.81 1480680000 1480674360 1480678260 1480676280 1480714800 1480720440 1480716540 1480718520 America/New_York 0 -18000 -500 EST floral.evenly.shortwave 38.355184 -75.1880179 38.308406 -75.2347939 city Berlin United States of America us Maryland 7 Berlin, Worcester County, Maryland, United States of America 38.322615 -75.21769 US$ US$ Worcester County NA NA
43┬░ 58' 4.93140'' N 88┬░ 56' 36.41136'' W 16TCP4410170158 EN53mx62sh -9901139.296 5430821.988 https://www.openstreetmap.org/edit?relation=251729#map=17/43.96804/-88.94345 https://www.openstreetmap.org/?mlat=43.96804&mlon=-88.94345#map=17/43.96804/-88.94345 1 . $ USD 840 United States Dollar 1 Cent 100 $ 1 , dpbf0h1k7kn9fnpft5qz 47.39 1480684320 1480678080 1480682340 1480680180 1480717020 1480636860 1480719000 1480721160 America/Chicago 0 -21600 -600 CST admits.indecision.skins 43.997968 -88.9207259 43.947614 -88.9808519 city City of Berlin United States of America us Wisconsin 7 City of Berlin, Green Lake County, Wisconsin, United States of America 43.968036 -88.94345 US$ US$ Green Lake County NA NA
39┬░ 55' 14.29068'' N 78┬░ 57' 28.08756'' W 17SPE7452920945 FM09mw50bw -8789542.324 4826990.633 https://www.openstreetmap.org/edit?relation=189091#map=17/39.92064/-78.95780 https://www.openstreetmap.org/?mlat=39.92064&mlon=-78.95780#map=17/39.92064/-78.95780 1 . $ USD 840 United States Dollar 1 Cent 100 $ 1 , dppg572dtcgx2cbq86cy 55.17 1480681200 1480675380 1480679340 1480677360 1480715400 1480721160 1480717200 1480719240 America/New_York 0 -18000 -500 EST rangers.chopsticks.crumbs 39.927231 -78.9372069 39.914615 -78.9657809 city Berlin United States of America us Pennsylvania 8 Berlin, Somerset County, Pennsylvania, United States of America 39.920636 -78.95780 US$ US$ Somerset County NA NA
4┬░ 48' 37.67346'' N 75┬░ 40' 55.66247'' W 18NVL2435931751 FJ24dt84dm -8424896.003 532548.055 https://www.openstreetmap.org/edit?way=426681623#map=17/4.81046/-75.68213 https://www.openstreetmap.org/?mlat=4.81046&mlon=-75.68213#map=17/4.81046/-75.68213 57 , $ COP 170 Colombian Peso 20 Centavo 100 $ 1 . d2f5mg9yyxdud4nypuh1 64.68 1480676160 1480671720 1480674840 1480673280 1480718880 1480636920 1480720200 1480721760 America/Bogota 0 -18000 -500 COT tornado.snippet.flipping 4.8118583 -75.6783716 4.8088997 -75.6845896 neighbourhood Pereira Colombia co Risaralda 9 Berlin, Pereira, Colombia 4.810465 -75.68213 COL$ COL$ Pereira NA Berlin
results2 <- opencage_forward(placename = "Berlin",
                             bounds = c(-90,38,0, 45))
results2$results %>% knitr::kable()
annotations.DMS.lat annotations.DMS.lng annotations.MGRS annotations.Maidenhead annotations.Mercator.x annotations.Mercator.y annotations.OSM.edit_url annotations.OSM.url annotations.callingcode annotations.currency.alternate_symbols annotations.currency.decimal_mark annotations.currency.disambiguate_symbol annotations.currency.html_entity annotations.currency.iso_code annotations.currency.iso_numeric annotations.currency.name annotations.currency.smallest_denomination annotations.currency.subunit annotations.currency.subunit_to_unit annotations.currency.symbol annotations.currency.symbol_first annotations.currency.thousands_separator annotations.geohash annotations.qibla annotations.sun.rise.apparent annotations.sun.rise.astronomical annotations.sun.rise.civil annotations.sun.rise.nautical annotations.sun.set.apparent annotations.sun.set.astronomical annotations.sun.set.civil annotations.sun.set.nautical annotations.timezone.name annotations.timezone.now_in_dst annotations.timezone.offset_sec annotations.timezone.offset_string annotations.timezone.short_name annotations.what3words.words bounds.northeast.lat bounds.northeast.lng bounds.southwest.lat bounds.southwest.lng components._type components.city components.country components.country_code components.county components.state confidence formatted geometry.lat geometry.lng components.town components.village
44┬░ 28' 7.21056'' N 71┬░ 11' 6.27612'' W 19TCK2619726251 FN44jl72sl -7924286.49 5508315.317 https://www.openstreetmap.org/edit?relation=170184#map=17/44.46867/-71.18508 https://www.openstreetmap.org/?mlat=44.46867&mlon=-71.18508#map=17/44.46867/-71.18508 1 US$ . US$ $ USD 840 United States Dollar 1 Cent 100 $ 1 , drvkupk8g2zdsyw72s2c 60.36 1480680180 1480673880 1480678200 1480675980 1480712700 1480718940 1480714680 1480716840 America/New_York 0 -18000 -500 EST angle.liability.nerve 44.528436 -71.1236419 44.445057 -71.3978579 city Berlin United States of America us Co├Âs County New Hampshire 5 Berlin, Co├Âs County, New Hampshire, United States of America 44.46867 -71.18508 NA NA
41┬░ 37' 17.35680'' N 72┬░ 44' 44.34648'' W 18TXM8780710206 FN31po09md -8098008.916 5076059.694 https://www.openstreetmap.org/edit?node=158845944#map=17/41.62149/-72.74565 https://www.openstreetmap.org/?mlat=41.62149&mlon=-72.74565#map=17/41.62149/-72.74565 1 US$ . US$ $ USD 840 United States Dollar 1 Cent 100 $ 1 , drkkb8unxrwwbsuj9tjy 59.3 1480680000 1480674060 1480678140 1480676040 1480713600 1480719540 1480715460 1480717560 America/New_York 0 -18000 -500 EST frosts.crowds.reef 41.661488 -72.7056518 41.581488 -72.7856518 city NA United States of America us Hartford County Connecticut 7 Berlin, Hartford County, Connecticut, United States of America 41.62149 -72.74565 Berlin NA
39┬░ 47' 28.41432'' N 74┬░ 55' 44.59260'' W 18SWK0607404588 FM29ms89mv -8341064.081 4808298.871 https://www.openstreetmap.org/edit?relation=170680#map=17/39.79123/-74.92905 https://www.openstreetmap.org/?mlat=39.79123&mlon=-74.92905#map=17/39.79123/-74.92905 1 US$ . US$ $ USD 840 United States Dollar 1 Cent 100 $ 1 , dr4dqgy2dw0jyzb7kgs3 57.91 1480680180 1480674420 1480678380 1480676400 1480714440 1480720260 1480716240 1480718280 America/New_York 0 -18000 -500 EST verdict.rushes.upgrading 39.8091498 -74.9079589 39.77601 -74.9661129 city Berlin United States of America us Camden County New Jersey 7 Berlin, Camden County, New Jersey, United States of America 39.79123 -74.92905 NA NA
42┬░ 22' 52.33440'' N 71┬░ 38' 13.24320'' W 19TBG8291095470 FN42ej31nl -7974595.698 5189444.074 https://www.openstreetmap.org/edit?relation=1844156#map=17/42.38120/-71.63701 https://www.openstreetmap.org/?mlat=42.38120&mlon=-71.63701#map=17/42.38120/-71.63701 1 US$ . US$ $ USD 840 United States Dollar 1 Cent 100 $ 1 , drt11g782th32euc09nn 60.04 1480679880 1480673820 1480677960 1480675860 1480713240 1480719240 1480715100 1480717200 America/New_York 0 -18000 -500 EST astonished.rightfully.pythons 42.4182811 -71.5802309 42.3505932 -71.6787957 city Berlin United States of America us Worcester County Massachusetts 7 Berlin, Worcester County, Massachusetts, United States of America 42.38120 -71.63701 NA NA
38┬░ 19' 21.41544'' N 75┬░ 13' 3.68076'' W 18SVH8097141633 FM28jh37vk -8373194.849 4598602.233 https://www.openstreetmap.org/edit?relation=133689#map=17/38.32262/-75.21769 https://www.openstreetmap.org/?mlat=38.32262&mlon=-75.21769#map=17/38.32262/-75.21769 1 US$ . US$ $ USD 840 United States Dollar 1 Cent 100 $ 1 , dqfd02kjkv3cm4dts5ph 57.81 1480680000 1480674360 1480678260 1480676280 1480714800 1480720440 1480716540 1480718520 America/New_York 0 -18000 -500 EST floral.evenly.shortwave 38.355184 -75.1880179 38.308406 -75.2347939 city Berlin United States of America us Worcester County Maryland 7 Berlin, Worcester County, Maryland, United States of America 38.32262 -75.21769 NA NA
43┬░ 58' 4.93140'' N 88┬░ 56' 36.41136'' W 16TCP4410170158 EN53mx62sh -9901139.296 5430821.988 https://www.openstreetmap.org/edit?relation=251729#map=17/43.96804/-88.94345 https://www.openstreetmap.org/?mlat=43.96804&mlon=-88.94345#map=17/43.96804/-88.94345 1 US$ . US$ $ USD 840 United States Dollar 1 Cent 100 $ 1 , dpbf0h1k7kn9fnpft5qz 47.39 1480684320 1480678080 1480682340 1480680180 1480717020 1480636860 1480719000 1480721160 America/Chicago 0 -21600 -600 CST admits.indecision.skins 43.997968 -88.9207259 43.947614 -88.9808519 city City of Berlin United States of America us Green Lake County Wisconsin 7 City of Berlin, Green Lake County, Wisconsin, United States of America 43.96804 -88.94345 NA NA
39┬░ 55' 14.29068'' N 78┬░ 57' 28.08756'' W 17SPE7452920945 FM09mw50bw -8789542.324 4826990.633 https://www.openstreetmap.org/edit?relation=189091#map=17/39.92064/-78.95780 https://www.openstreetmap.org/?mlat=39.92064&mlon=-78.95780#map=17/39.92064/-78.95780 1 US$ . US$ $ USD 840 United States Dollar 1 Cent 100 $ 1 , dppg572dtcgx2cbq86cy 55.17 1480681200 1480675380 1480679340 1480677360 1480715400 1480721160 1480717200 1480719240 America/New_York 0 -18000 -500 EST rangers.chopsticks.crumbs 39.927231 -78.9372069 39.914615 -78.9657809 city Berlin United States of America us Somerset County Pennsylvania 8 Berlin, Somerset County, Pennsylvania, United States of America 39.92064 -78.95780 NA NA
39┬░ 45' 32.17932'' N 89┬░ 54' 11.38824'' W 16SBK5129805033 EM59bs12od -10007974.37 4803640.851 https://www.openstreetmap.org/edit?relation=126290#map=17/39.75894/-89.90316 https://www.openstreetmap.org/?mlat=39.75894&mlon=-89.90316#map=17/39.75894/-89.90316 1 US$ . US$ $ USD 840 United States Dollar 1 Cent 100 $ 1 , dp044jys87qee3bchu0k 47.27 1480683780 1480678020 1480681980 1480679940 1480718040 1480637400 1480719840 1480721880 America/Chicago 0 -21600 -600 CST fluent.mocked.fancied 39.764932 -89.8931649 39.750371 -89.9121009 city Berlin United States of America us Sangamon County Illinois 8 Berlin, Sangamon County, Illinois, United States of America 39.75894 -89.90316 NA NA
42┬░ 41' 35.28636'' N 73┬░ 22' 19.39728'' W 18TXN3335128023 FN32hq56ii -8167739.779 5236398.071 https://www.openstreetmap.org/edit?node=158915747#map=17/42.69314/-73.37205 https://www.openstreetmap.org/?mlat=42.69314&mlon=-73.37205#map=17/42.69314/-73.37205 1 US$ . US$ $ USD 840 United States Dollar 1 Cent 100 $ 1 , dreffkh1e1nwfg7r4r2t 58.85 1480680360 1480674300 1480678440 1480676340 1480713540 1480719600 1480715460 1480717560 America/New_York 0 -18000 -500 EST cartons.eliminates.uses 42.7131351 -73.3520548 42.6731351 -73.3920548 village NA United States of America us Rensselaer County New York 7 Berlin, Rensselaer County, New York, United States of America 42.69314 -73.37205 NA Berlin
40┬░ 33' 40.22424'' N 81┬░ 47' 39.48144'' W 17TME3275690348 EN90cn44qq -9105299.87 4920037.921 https://www.openstreetmap.org/edit?node=153968558#map=17/40.56117/-81.79430 https://www.openstreetmap.org/?mlat=40.56117&mlon=-81.79430#map=17/40.56117/-81.79430 1 US$ . US$ $ USD 840 United States Dollar 1 Cent 100 $ 1 , dpjydxzjywtpgn0rxvjf 53.12 1480681980 1480676100 1480680120 1480678080 1480716000 1480721820 1480717800 1480719840 America/New_York 0 -18000 -500 EST sing.quietest.certificate 40.5811734 -81.7743004 40.5411734 -81.8143004 village NA United States of America us Holmes County Ohio 7 Berlin, Holmes County, Ohio, United States of America 40.56117 -81.79430 NA Berlin
  • countrycode: Restricts the results to the given country. The country code is a two letter code as defined by the ISO 3166-1 Alpha 2 standard. E.g. "GB" for the United Kingdom, "FR" for France, "US" for United States. See example below.
results3 <- opencage_forward(placename = "Berlin", country = "DE")
results3$results %>% knitr::kable()
annotations.DMS.lat annotations.DMS.lng annotations.MGRS annotations.Maidenhead annotations.Mercator.x annotations.Mercator.y annotations.OSM.edit_url annotations.OSM.url annotations.callingcode annotations.currency.decimal_mark annotations.currency.html_entity annotations.currency.iso_code annotations.currency.iso_numeric annotations.currency.name annotations.currency.smallest_denomination annotations.currency.subunit annotations.currency.subunit_to_unit annotations.currency.symbol annotations.currency.symbol_first annotations.currency.thousands_separator annotations.geohash annotations.qibla annotations.sun.rise.apparent annotations.sun.rise.astronomical annotations.sun.rise.civil annotations.sun.rise.nautical annotations.sun.set.apparent annotations.sun.set.astronomical annotations.sun.set.civil annotations.sun.set.nautical annotations.timezone.name annotations.timezone.now_in_dst annotations.timezone.offset_sec annotations.timezone.offset_string annotations.timezone.short_name annotations.what3words.words bounds.northeast.lat bounds.northeast.lng bounds.southwest.lat bounds.southwest.lng components._type components.city components.country components.country_code components.state confidence formatted geometry.lat geometry.lng components.county components.postcode components.village components.road components.city_district components.house_number components.suburb components.unknown components.cafe components.neighbourhood components.building components.residential
52┬░ 31' 1.33140'' N 13┬░ 23' 19.89564'' E 33UUU9067619766 JO62qm64pc 1490441.066 6860227.862 https://www.openstreetmap.org/edit?node=240109189#map=17/52.51704/13.38886 https://www.openstreetmap.org/?mlat=52.51704&mlon=13.38886#map=17/52.51704/13.38886 49 , ÔéČ EUR 978 Euro 1 Cent 100 ÔéČ 1 . u33db8mmzj1t355u0c0j 136.66 1480661820 1480654320 1480659420 1480656780 1480690500 1480698000 1480692960 1480695540 Europe/Berlin 0 3600 100 CET third.gurgled.such 52.6770365 13.5488599 52.3570365 13.2288599 city Berlin Germany de Berlin 4 Berlin, Germany 52.51704 13.388860 NA NA NA NA NA NA NA NA NA NA NA NA
54┬░ 2' 10.89780'' N 10┬░ 26' 46.07268'' E 32UNE9470788534 JO54fa38mr 1162858.017 7142435.831 https://www.openstreetmap.org/edit?node=50798110#map=17/54.03636/10.44613 https://www.openstreetmap.org/?mlat=54.03636&mlon=10.44613#map=17/54.03636/10.44613 49 , ÔéČ EUR 978 Euro 1 Cent 100 ÔéČ 1 . u1x7mtn8se8n18vzuczv 134.07 1480663020 1480655160 1480660440 1480657740 1480690740 1480698600 1480693320 1480696020 Europe/Berlin 0 3600 100 CET jungle.scaled.quantity 54.0563605 10.4661313 54.0163605 10.4261313 village NA Germany de Schleswig-Holstein 7 23823 Berlin, Germany 54.03636 10.446131 Trave-Land 23823 Berlin NA NA NA NA NA NA NA NA NA
54┬░ 24' 18.42840'' N 9┬░ 25' 55.18776'' E 32UNF2804128682 JO44rj17uf 1049965.059 7212486.314 https://www.openstreetmap.org/edit?way=68276512#map=17/54.40512/9.43200 https://www.openstreetmap.org/?mlat=54.40512&mlon=9.43200#map=17/54.40512/9.43200 49 , ÔéČ EUR 978 Euro 1 Cent 100 ÔéČ 1 . u1wtw8hhv3q2jjmfesu3 133.07 1480663380 1480655460 1480660800 1480658040 1480690860 1480698780 1480693440 1480696200 Europe/Berlin 0 3600 100 CET makeups.propelled.panther 54.4069751 9.4342708 54.4029778 9.4299614 road NA Germany de Schleswig-Holstein 10 Berlin, 24848 Klein Bennebek, Germany 54.40512 9.431997 Kropp-Stapelholm 24848 Klein Bennebek Berlin NA NA NA NA NA NA NA NA
52┬░ 30' 13.47300'' N 13┬░ 19' 47.85456'' E 33UUU8664618379 JO62pm90ov 1483884.315 6857802.372 https://www.openstreetmap.org/edit?node=4012854129#map=17/52.50374/13.32996 https://www.openstreetmap.org/?mlat=52.50374&mlon=13.32996#map=17/52.50374/13.32996 49 , ÔéČ EUR 978 Euro 1 Cent 100 ÔéČ 1 . u336xq486wfr91wcvvev 136.57 1480661820 1480654320 1480659420 1480656780 1480690500 1480698060 1480692960 1480695540 Europe/Berlin 0 3600 100 CET touchy.candle.reserved 52.5037925 13.3300096 52.5036925 13.3299096 building NA Germany de Berlin 10 Berlin, Kurf├╝rstendamm 21, 10719 Berlin, Germany 52.50374 13.329960 NA 10719 NA Kurf├╝rstendamm Charlottenburg-Wilmersdorf 21 Charlottenburg Berlin NA NA NA NA
52┬░ 22' 12.67680'' N 9┬░ 45' 10.62252'' E 32UND5126202479 JO42vi08iu 1085693.506 6833476.151 https://www.openstreetmap.org/edit?node=320881943#map=17/52.37019/9.75295 https://www.openstreetmap.org/?mlat=52.37019&mlon=9.75295#map=17/52.37019/9.75295 49 , ÔéČ EUR 978 Euro 1 Cent 100 ÔéČ 1 . u1qcvvtyknx5um9fq9f9 131.66 1480662660 1480655160 1480660260 1480657620 1480691400 1480698900 1480693860 1480696440 Europe/Berlin 0 3600 100 CET army.outdoors.hitters 52.370238 9.7530007 52.370138 9.7529007 road Hanover Germany de Lower Saxony 10 Berliner Allee, 30175 Hanover, Germany 52.37019 9.752951 Region Hannover 30175 NA Berliner Allee South-City-Bult NA South-City Berlin NA NA NA NA
52┬░ 30' 20.91132'' N 13┬░ 19' 56.43624'' E 33UUU8681318605 JO62pm91vj 1484149.678 6858179.301 https://www.openstreetmap.org/edit?node=3889599519#map=17/52.50581/13.33234 https://www.openstreetmap.org/?mlat=52.50581&mlon=13.33234#map=17/52.50581/13.33234 49 , ÔéČ EUR 978 Euro 1 Cent 100 ÔéČ 1 . u336xqkkd05ubvhv9zd8 136.57 1480661820 1480654320 1480659420 1480656780 1480690500 1480698060 1480692960 1480695540 Europe/Berlin 0 3600 100 CET empire.opposite.unwell 52.5058587 13.3323934 52.5057587 13.3322934 building NA Germany de Berlin 10 Berlin, Hardenbergstra├če 27-28a, 10623 Berlin, Germany 52.50581 13.332343 NA 10623 NA Hardenbergstra├če Charlottenburg-Wilmersdorf 27-28a Charlottenburg Berlin NA NA NA NA
53┬░ 51' 4.53384'' N 10┬░ 40' 56.93196'' E 32UPE1067368285 JO53iu14vh 1189168.356 7107508.609 https://www.openstreetmap.org/edit?node=1630863689#map=17/53.85126/10.68248 https://www.openstreetmap.org/?mlat=53.85126&mlon=10.68248#map=17/53.85126/10.68248 49 , ÔéČ EUR 978 Euro 1 Cent 100 ÔéČ 1 . u1xd756drf74zwdx76by 134.21 1480662900 1480655100 1480660380 1480657620 1480690740 1480698540 1480693260 1480696020 Europe/Berlin 0 3600 100 CET chase.pencils.themes 53.8513094 10.6825311 53.8512094 10.6824311 road L├╝beck Germany de Schleswig-Holstein 10 Berliner Platz, 23560 L├╝beck, Germany 53.85126 10.682481 NA 23560 NA Berliner Platz Sankt J├╝rgen NA H├╝xtertor / M├╝hlentor / G├Ąrtnergasse Berlin NA NA NA NA
52┬░ 31' 23.64780'' N 13┬░ 24' 12.97080'' E 33UUU9169220434 JO62qm85kn 1492082.261 6861359.122 https://www.openstreetmap.org/edit?node=700843686#map=17/52.52324/13.40360 https://www.openstreetmap.org/?mlat=52.52324&mlon=13.40360#map=17/52.52324/13.40360 49 , ÔéČ EUR 978 Euro 1 Cent 100 ÔéČ 1 . u33dc184n8dzc4mfyfnv 136.69 1480661820 1480654320 1480659420 1480656780 1480690500 1480698000 1480692960 1480695540 Europe/Berlin 0 3600 100 CET sampled.premiums.stick 52.5232855 13.403653 52.5231855 13.403553 cafe Alt-Berlin Germany de Berlin 10 Berlin, Dircksenstra├če 52, 10178 Berlin, Germany 52.52324 13.403603 NA 10178 NA Dircksenstra├če Mitte 52 Mitte NA Berlin Scheunenviertel NA NA
52┬░ 27' 24.31584'' N 13┬░ 34' 45.17324'' E 33UVU0346012790 JO62sk99mo 1511631.276 6849235.295 https://www.openstreetmap.org/edit?way=168058334#map=17/52.45675/13.57921 https://www.openstreetmap.org/?mlat=52.45675&mlon=13.57921#map=17/52.45675/13.57921 49 , ÔéČ EUR 978 Euro 1 Cent 100 ÔéČ 1 . u33dmj2ndxu2tewv03c0 136.87 1480661760 1480654260 1480659360 1480656720 1480690500 1480698000 1480692900 1480695540 Europe/Berlin 0 3600 100 CET fields.lists.impulse 52.4569793 13.5798073 52.4565392 13.5784995 building NA Germany de Berlin 10 Vitanas Seniorencentrum, Parrisiusstra├če 4-14, 12555 Berlin, Germany 52.45675 13.579215 NA 12555 NA Parrisiusstra├če Treptow-K├Âpenick 4-14 K├Âpenick NA NA NA Vitanas Seniorencentrum Dammvorstadt
  • language: an IETF format language code (such as "es" for Spanish or "pt-BR" for Brazilian Portuguese). If no language is explicitly specified, we will look for an HTTP Accept-Language header like those sent by a brower and use the first language specified and if none are specified "en" (English) will be assumed. See example below.
results3$results %>% knitr::kable()
annotations.DMS.lat annotations.DMS.lng annotations.MGRS annotations.Maidenhead annotations.Mercator.x annotations.Mercator.y annotations.OSM.edit_url annotations.OSM.url annotations.callingcode annotations.currency.decimal_mark annotations.currency.html_entity annotations.currency.iso_code annotations.currency.iso_numeric annotations.currency.name annotations.currency.smallest_denomination annotations.currency.subunit annotations.currency.subunit_to_unit annotations.currency.symbol annotations.currency.symbol_first annotations.currency.thousands_separator annotations.geohash annotations.qibla annotations.sun.rise.apparent annotations.sun.rise.astronomical annotations.sun.rise.civil annotations.sun.rise.nautical annotations.sun.set.apparent annotations.sun.set.astronomical annotations.sun.set.civil annotations.sun.set.nautical annotations.timezone.name annotations.timezone.now_in_dst annotations.timezone.offset_sec annotations.timezone.offset_string annotations.timezone.short_name annotations.what3words.words bounds.northeast.lat bounds.northeast.lng bounds.southwest.lat bounds.southwest.lng components._type components.city components.country components.country_code components.state confidence formatted geometry.lat geometry.lng components.county components.postcode components.village components.road components.city_district components.house_number components.suburb components.unknown components.cafe components.neighbourhood components.building components.residential
52┬░ 31' 1.33140'' N 13┬░ 23' 19.89564'' E 33UUU9067619766 JO62qm64pc 1490441.066 6860227.862 https://www.openstreetmap.org/edit?node=240109189#map=17/52.51704/13.38886 https://www.openstreetmap.org/?mlat=52.51704&mlon=13.38886#map=17/52.51704/13.38886 49 , ÔéČ EUR 978 Euro 1 Cent 100 ÔéČ 1 . u33db8mmzj1t355u0c0j 136.66 1480661820 1480654320 1480659420 1480656780 1480690500 1480698000 1480692960 1480695540 Europe/Berlin 0 3600 100 CET third.gurgled.such 52.6770365 13.5488599 52.3570365 13.2288599 city Berlin Germany de Berlin 4 Berlin, Germany 52.51704 13.388860 NA NA NA NA NA NA NA NA NA NA NA NA
54┬░ 2' 10.89780'' N 10┬░ 26' 46.07268'' E 32UNE9470788534 JO54fa38mr 1162858.017 7142435.831 https://www.openstreetmap.org/edit?node=50798110#map=17/54.03636/10.44613 https://www.openstreetmap.org/?mlat=54.03636&mlon=10.44613#map=17/54.03636/10.44613 49 , ÔéČ EUR 978 Euro 1 Cent 100 ÔéČ 1 . u1x7mtn8se8n18vzuczv 134.07 1480663020 1480655160 1480660440 1480657740 1480690740 1480698600 1480693320 1480696020 Europe/Berlin 0 3600 100 CET jungle.scaled.quantity 54.0563605 10.4661313 54.0163605 10.4261313 village NA Germany de Schleswig-Holstein 7 23823 Berlin, Germany 54.03636 10.446131 Trave-Land 23823 Berlin NA NA NA NA NA NA NA NA NA
54┬░ 24' 18.42840'' N 9┬░ 25' 55.18776'' E 32UNF2804128682 JO44rj17uf 1049965.059 7212486.314 https://www.openstreetmap.org/edit?way=68276512#map=17/54.40512/9.43200 https://www.openstreetmap.org/?mlat=54.40512&mlon=9.43200#map=17/54.40512/9.43200 49 , ÔéČ EUR 978 Euro 1 Cent 100 ÔéČ 1 . u1wtw8hhv3q2jjmfesu3 133.07 1480663380 1480655460 1480660800 1480658040 1480690860 1480698780 1480693440 1480696200 Europe/Berlin 0 3600 100 CET makeups.propelled.panther 54.4069751 9.4342708 54.4029778 9.4299614 road NA Germany de Schleswig-Holstein 10 Berlin, 24848 Klein Bennebek, Germany 54.40512 9.431997 Kropp-Stapelholm 24848 Klein Bennebek Berlin NA NA NA NA NA NA NA NA
52┬░ 30' 13.47300'' N 13┬░ 19' 47.85456'' E 33UUU8664618379 JO62pm90ov 1483884.315 6857802.372 https://www.openstreetmap.org/edit?node=4012854129#map=17/52.50374/13.32996 https://www.openstreetmap.org/?mlat=52.50374&mlon=13.32996#map=17/52.50374/13.32996 49 , ÔéČ EUR 978 Euro 1 Cent 100 ÔéČ 1 . u336xq486wfr91wcvvev 136.57 1480661820 1480654320 1480659420 1480656780 1480690500 1480698060 1480692960 1480695540 Europe/Berlin 0 3600 100 CET touchy.candle.reserved 52.5037925 13.3300096 52.5036925 13.3299096 building NA Germany de Berlin 10 Berlin, Kurf├╝rstendamm 21, 10719 Berlin, Germany 52.50374 13.329960 NA 10719 NA Kurf├╝rstendamm Charlottenburg-Wilmersdorf 21 Charlottenburg Berlin NA NA NA NA
52┬░ 22' 12.67680'' N 9┬░ 45' 10.62252'' E 32UND5126202479 JO42vi08iu 1085693.506 6833476.151 https://www.openstreetmap.org/edit?node=320881943#map=17/52.37019/9.75295 https://www.openstreetmap.org/?mlat=52.37019&mlon=9.75295#map=17/52.37019/9.75295 49 , ÔéČ EUR 978 Euro 1 Cent 100 ÔéČ 1 . u1qcvvtyknx5um9fq9f9 131.66 1480662660 1480655160 1480660260 1480657620 1480691400 1480698900 1480693860 1480696440 Europe/Berlin 0 3600 100 CET army.outdoors.hitters 52.370238 9.7530007 52.370138 9.7529007 road Hanover Germany de Lower Saxony 10 Berliner Allee, 30175 Hanover, Germany 52.37019 9.752951 Region Hannover 30175 NA Berliner Allee South-City-Bult NA South-City Berlin NA NA NA NA
52┬░ 30' 20.91132'' N 13┬░ 19' 56.43624'' E 33UUU8681318605 JO62pm91vj 1484149.678 6858179.301 https://www.openstreetmap.org/edit?node=3889599519#map=17/52.50581/13.33234 https://www.openstreetmap.org/?mlat=52.50581&mlon=13.33234#map=17/52.50581/13.33234 49 , ÔéČ EUR 978 Euro 1 Cent 100 ÔéČ 1 . u336xqkkd05ubvhv9zd8 136.57 1480661820 1480654320 1480659420 1480656780 1480690500 1480698060 1480692960 1480695540 Europe/Berlin 0 3600 100 CET empire.opposite.unwell 52.5058587 13.3323934 52.5057587 13.3322934 building NA Germany de Berlin 10 Berlin, Hardenbergstra├če 27-28a, 10623 Berlin, Germany 52.50581 13.332343 NA 10623 NA Hardenbergstra├če Charlottenburg-Wilmersdorf 27-28a Charlottenburg Berlin NA NA NA NA
53┬░ 51' 4.53384'' N 10┬░ 40' 56.93196'' E 32UPE1067368285 JO53iu14vh 1189168.356 7107508.609 https://www.openstreetmap.org/edit?node=1630863689#map=17/53.85126/10.68248 https://www.openstreetmap.org/?mlat=53.85126&mlon=10.68248#map=17/53.85126/10.68248 49 , ÔéČ EUR 978 Euro 1 Cent 100 ÔéČ 1 . u1xd756drf74zwdx76by 134.21 1480662900 1480655100 1480660380 1480657620 1480690740 1480698540 1480693260 1480696020 Europe/Berlin 0 3600 100 CET chase.pencils.themes 53.8513094 10.6825311 53.8512094 10.6824311 road L├╝beck Germany de Schleswig-Holstein 10 Berliner Platz, 23560 L├╝beck, Germany 53.85126 10.682481 NA 23560 NA Berliner Platz Sankt J├╝rgen NA H├╝xtertor / M├╝hlentor / G├Ąrtnergasse Berlin NA NA NA NA
52┬░ 31' 23.64780'' N 13┬░ 24' 12.97080'' E 33UUU9169220434 JO62qm85kn 1492082.261 6861359.122 https://www.openstreetmap.org/edit?node=700843686#map=17/52.52324/13.40360 https://www.openstreetmap.org/?mlat=52.52324&mlon=13.40360#map=17/52.52324/13.40360 49 , ÔéČ EUR 978 Euro 1 Cent 100 ÔéČ 1 . u33dc184n8dzc4mfyfnv 136.69 1480661820 1480654320 1480659420 1480656780 1480690500 1480698000 1480692960 1480695540 Europe/Berlin 0 3600 100 CET sampled.premiums.stick 52.5232855 13.403653 52.5231855 13.403553 cafe Alt-Berlin Germany de Berlin 10 Berlin, Dircksenstra├če 52, 10178 Berlin, Germany 52.52324 13.403603 NA 10178 NA Dircksenstra├če Mitte 52 Mitte NA Berlin Scheunenviertel NA NA
52┬░ 27' 24.31584'' N 13┬░ 34' 45.17324'' E 33UVU0346012790 JO62sk99mo 1511631.276 6849235.295 https://www.openstreetmap.org/edit?way=168058334#map=17/52.45675/13.57921 https://www.openstreetmap.org/?mlat=52.45675&mlon=13.57921#map=17/52.45675/13.57921 49 , ÔéČ EUR 978 Euro 1 Cent 100 ÔéČ 1 . u33dmj2ndxu2tewv03c0 136.87 1480661760 1480654260 1480659360 1480656720 1480690500 1480698000 1480692900 1480695540 Europe/Berlin 0 3600 100 CET fields.lists.impulse 52.4569793 13.5798073 52.4565392 13.5784995 building NA Germany de Berlin 10 Vitanas Seniorencentrum, Parrisiusstra├če 4-14, 12555 Berlin, Germany 52.45675 13.579215 NA 12555 NA Parrisiusstra├če Treptow-K├Âpenick 4-14 K├Âpenick NA NA NA Vitanas Seniorencentrum Dammvorstadt
results4 <- opencage_forward(placename = "Berlin", country = "DE", language = "de")
results4$results %>% knitr::kable()
annotations.DMS.lat annotations.DMS.lng annotations.MGRS annotations.Maidenhead annotations.Mercator.x annotations.Mercator.y annotations.OSM.edit_url annotations.OSM.url annotations.callingcode annotations.currency.decimal_mark annotations.currency.html_entity annotations.currency.iso_code annotations.currency.iso_numeric annotations.currency.name annotations.currency.smallest_denomination annotations.currency.subunit annotations.currency.subunit_to_unit annotations.currency.symbol annotations.currency.symbol_first annotations.currency.thousands_separator annotations.geohash annotations.qibla annotations.sun.rise.apparent annotations.sun.rise.astronomical annotations.sun.rise.civil annotations.sun.rise.nautical annotations.sun.set.apparent annotations.sun.set.astronomical annotations.sun.set.civil annotations.sun.set.nautical annotations.timezone.name annotations.timezone.now_in_dst annotations.timezone.offset_sec annotations.timezone.offset_string annotations.timezone.short_name annotations.what3words.words bounds.northeast.lat bounds.northeast.lng bounds.southwest.lat bounds.southwest.lng components._type components.city components.country components.country_code components.state confidence formatted geometry.lat geometry.lng components.county components.postcode components.village components.road components.city_district components.house_number components.suburb components.unknown components.cafe components.neighbourhood components.building components.residential
52┬░ 31' 1.33140'' N 13┬░ 23' 19.89564'' E 33UUU9067619766 JO62qm64pc 1490441.066 6860227.862 https://www.openstreetmap.org/edit?node=240109189#map=17/52.51704/13.38886 https://www.openstreetmap.org/?mlat=52.51704&mlon=13.38886#map=17/52.51704/13.38886 49 , ÔéČ EUR 978 Euro 1 Cent 100 ÔéČ 1 . u33db8mmzj1t355u0c0j 136.66 1480661820 1480654320 1480659420 1480656780 1480690500 1480698000 1480692960 1480695540 Europe/Berlin 0 3600 100 CET nirgends.digitalen.landkarte 52.6770365 13.5488599 52.3570365 13.2288599 city Berlin Deutschland de Berlin 4 Berlin, Deutschland 52.51704 13.388860 NA NA NA NA NA NA NA NA NA NA NA NA
54┬░ 2' 10.89780'' N 10┬░ 26' 46.07268'' E 32UNE9470788534 JO54fa38mr 1162858.017 7142435.831 https://www.openstreetmap.org/edit?node=50798110#map=17/54.03636/10.44613 https://www.openstreetmap.org/?mlat=54.03636&mlon=10.44613#map=17/54.03636/10.44613 49 , ÔéČ EUR 978 Euro 1 Cent 100 ÔéČ 1 . u1x7mtn8se8n18vzuczv 134.07 1480663020 1480655160 1480660440 1480657740 1480690740 1480698600 1480693320 1480696020 Europe/Berlin 0 3600 100 CET zusehen.sicht.besucht 54.0563605 10.4661313 54.0163605 10.4261313 village NA Deutschland de Schleswig-Holstein 7 23823 Berlin, Deutschland 54.03636 10.446131 Trave-Land 23823 Berlin NA NA NA NA NA NA NA NA NA
54┬░ 24' 18.42840'' N 9┬░ 25' 55.18776'' E 32UNF2804128682 JO44rj17uf 1049965.059 7212486.314 https://www.openstreetmap.org/edit?way=68276512#map=17/54.40512/9.43200 https://www.openstreetmap.org/?mlat=54.40512&mlon=9.43200#map=17/54.40512/9.43200 49 , ÔéČ EUR 978 Euro 1 Cent 100 ÔéČ 1 . u1wtw8hhv3q2jjmfesu3 133.07 1480663380 1480655460 1480660800 1480658040 1480690860 1480698780 1480693440 1480696200 Europe/Berlin 0 3600 100 CET niedrig.sicher.kranz 54.4069751 9.4342708 54.4029778 9.4299614 road NA Deutschland de Schleswig-Holstein 10 Berlin, 24848 Klein Bennebek, Deutschland 54.40512 9.431997 Kropp-Stapelholm 24848 Klein Bennebek Berlin NA NA NA NA NA NA NA NA
52┬░ 30' 13.47300'' N 13┬░ 19' 47.85456'' E 33UUU8664618379 JO62pm90ov 1483884.315 6857802.372 https://www.openstreetmap.org/edit?node=4012854129#map=17/52.50374/13.32996 https://www.openstreetmap.org/?mlat=52.50374&mlon=13.32996#map=17/52.50374/13.32996 49 , ÔéČ EUR 978 Euro 1 Cent 100 ÔéČ 1 . u336xq486wfr91wcvvev 136.57 1480661820 1480654320 1480659420 1480656780 1480690500 1480698060 1480692960 1480695540 Europe/Berlin 0 3600 100 CET abgek├╝rzt.vergabe.bequem 52.5037925 13.3300096 52.5036925 13.3299096 building NA Deutschland de Berlin 10 Berlin, Kurf├╝rstendamm 21, 10719 Berlin, Deutschland 52.50374 13.329960 NA 10719 NA Kurf├╝rstendamm Charlottenburg-Wilmersdorf 21 Charlottenburg Berlin NA NA NA NA
52┬░ 22' 12.67680'' N 9┬░ 45' 10.62252'' E 32UND5126202479 JO42vi08iu 1085693.506 6833476.151 https://www.openstreetmap.org/edit?node=320881943#map=17/52.37019/9.75295 https://www.openstreetmap.org/?mlat=52.37019&mlon=9.75295#map=17/52.37019/9.75295 49 , ÔéČ EUR 978 Euro 1 Cent 100 ÔéČ 1 . u1qcvvtyknx5um9fq9f9 131.66 1480662660 1480655160 1480660260 1480657620 1480691400 1480698900 1480693860 1480696440 Europe/Berlin 0 3600 100 CET greift.zentrum.teilt 52.370238 9.7530007 52.370138 9.7529007 road Hannover Deutschland de Niedersachsen 10 Berliner Allee, 30175 Hannover, Deutschland 52.37019 9.752951 Region Hannover 30175 NA Berliner Allee S├╝dstadt-Bult NA S├╝dstadt Berlin NA NA NA NA
52┬░ 30' 20.91132'' N 13┬░ 19' 56.43624'' E 33UUU8681318605 JO62pm91vj 1484149.678 6858179.301 https://www.openstreetmap.org/edit?node=3889599519#map=17/52.50581/13.33234 https://www.openstreetmap.org/?mlat=52.50581&mlon=13.33234#map=17/52.50581/13.33234 49 , ÔéČ EUR 978 Euro 1 Cent 100 ÔéČ 1 . u336xqkkd05ubvhv9zd8 136.57 1480661820 1480654320 1480659420 1480656780 1480690500 1480698060 1480692960 1480695540 Europe/Berlin 0 3600 100 CET ├╝bungen.schon.furcht 52.5058587 13.3323934 52.5057587 13.3322934 building NA Deutschland de Berlin 10 Berlin, Hardenbergstra├če 27-28a, 10623 Berlin, Deutschland 52.50581 13.332343 NA 10623 NA Hardenbergstra├če Charlottenburg-Wilmersdorf 27-28a Charlottenburg Berlin NA NA NA NA
53┬░ 51' 4.53384'' N 10┬░ 40' 56.93196'' E 32UPE1067368285 JO53iu14vh 1189168.356 7107508.609 https://www.openstreetmap.org/edit?node=1630863689#map=17/53.85126/10.68248 https://www.openstreetmap.org/?mlat=53.85126&mlon=10.68248#map=17/53.85126/10.68248 49 , ÔéČ EUR 978 Euro 1 Cent 100 ÔéČ 1 . u1xd756drf74zwdx76by 134.21 1480662900 1480655100 1480660380 1480657620 1480690740 1480698540 1480693260 1480696020 Europe/Berlin 0 3600 100 CET umzug.h├╝bsch.tapfer 53.8513094 10.6825311 53.8512094 10.6824311 road L├╝beck Deutschland de Schleswig-Holstein 10 Berliner Platz, 23560 L├╝beck, Deutschland 53.85126 10.682481 NA 23560 NA Berliner Platz Sankt J├╝rgen NA H├╝xtertor / M├╝hlentor / G├Ąrtnergasse Berlin NA NA NA NA
52┬░ 31' 23.64780'' N 13┬░ 24' 12.97080'' E 33UUU9169220434 JO62qm85kn 1492082.261 6861359.122 https://www.openstreetmap.org/edit?node=700843686#map=17/52.52324/13.40360 https://www.openstreetmap.org/?mlat=52.52324&mlon=13.40360#map=17/52.52324/13.40360 49 , ÔéČ EUR 978 Euro 1 Cent 100 ÔéČ 1 . u33dc184n8dzc4mfyfnv 136.69 1480661820 1480654320 1480659420 1480656780 1480690500 1480698000 1480692960 1480695540 Europe/Berlin 0 3600 100 CET geige.geschoben.helfer 52.5232855 13.403653 52.5231855 13.403553 cafe Alt-Berlin Deutschland de Berlin 10 Berlin, Dircksenstra├če 52, 10178 Berlin, Deutschland 52.52324 13.403603 NA 10178 NA Dircksenstra├če Mitte 52 Mitte NA Berlin Scheunenviertel NA NA
52┬░ 27' 24.31584'' N 13┬░ 34' 45.17324'' E 33UVU0346012790 JO62sk99mo 1511631.276 6849235.295 https://www.openstreetmap.org/edit?way=168058334#map=17/52.45675/13.57921 https://www.openstreetmap.org/?mlat=52.45675&mlon=13.57921#map=17/52.45675/13.57921 49 , ÔéČ EUR 978 Euro 1 Cent 100 ÔéČ 1 . u33dmj2ndxu2tewv03c0 136.87 1480661760 1480654260 1480659360 1480656720 1480690500 1480698000 1480692900 1480695540 Europe/Berlin 0 3600 100 CET allein.aus├╝bt.schock 52.4569793 13.5798073 52.4565392 13.5784995 building NA Deutschland de Berlin 10 Vitanas Seniorencentrum, Parrisiusstra├če 4-14, 12555 Berlin, Deutschland 52.45675 13.579215 NA 12555 NA Parrisiusstra├če Treptow-K├Âpenick 4-14 K├Âpenick NA NA NA Vitanas Seniorencentrum Dammvorstadt
  • limit: How many results should be returned (1-100). Default is 10.

  • min_confidence: an integer from 1-10. Only results with at least this confidence will be returned.

  • no_annotations: Logical (default FALSE), when TRUE the output will not contain annotations.

  • no_dedupe: Logical (default FALSE), when TRUE the output will not be deduplicated.

For more information about the output and the query parameters, see the package documentation, the API doc and OpenCage FAQ.

Caching

The underlying data at OpenCage is updated about once a day. Note that the package uses memoise with no timeout argument so that results are cached inside an active R session.

system.time(opencage_reverse(latitude = 10, longitude = 10))
##    user  system elapsed 
##    0.03    0.00    0.42
system.time(opencage_reverse(latitude = 10, longitude = 10))
##    user  system elapsed 
##       0       0       0
memoise::forget(opencage_reverse)
## [1] TRUE
system.time(opencage_reverse(latitude = 10, longitude = 10))
##    user  system elapsed 
##    0.02    0.00    0.49

Privacy

Both functions have a parameter no_record. It is FALSE by default.

  • When no_record is FALSE a log of the query is made by OpenCage. The company uses them to better generally understand how people are using its service (forward or reverse geocoding, what parts of the world are people most interested in, etc) and for debugging. The overwhelming majority (99.9999+% of queries) are never specifically looked at (sheer volume prevents that) and are automatically deleted after a few days. More information about privacy can be found here.

  • When no_record is TRUE the actual query is replaced with FILTERED in OpenCage logs, so that the company has no chance to see what your request was.

Meta

  • Please report any issues or bugs.
  • License: GPL
  • Get citation information for opencage in R doing citation(package = 'opencage')
  • Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

ropensci\_footer