Package opencage. January 16, 2018

Similar documents
Package cattonum. R topics documented: May 2, Type Package Version Title Encode Categorical Features

Package fastdummies. January 8, 2018

Package gtrendsr. October 19, 2017

Package geojsonsf. R topics documented: January 11, Type Package Title GeoJSON to Simple Feature Converter Version 1.3.

Package darksky. September 20, 2017

Package gtrendsr. August 4, 2018

Package calpassapi. August 25, 2018

Package rmapzen. October 7, 2018

Package facerec. May 14, 2018

Package canvasxpress

Package rgho. R topics documented: January 18, 2017

Package robotstxt. November 12, 2017

Package SEMrushR. November 3, 2018

Package validara. October 19, 2017

Package githubinstall

Package dkanr. July 12, 2018

Package mapsapi. March 12, 2018

Package virustotal. May 1, 2017

Package datasets.load

Package fitbitscraper

Package fingertipsr. May 25, Type Package Version Title Fingertips Data for Public Health

Package knitrprogressbar

Package ECctmc. May 1, 2018

Package oec. R topics documented: May 11, Type Package

Package nlgeocoder. October 8, 2018

Package wikitaxa. December 21, 2017

Package repec. August 31, 2018

Package internetarchive

Package censusr. R topics documented: June 14, Type Package Title Collect Data from the Census API Version 0.0.

Package rzeit2. January 7, 2019

Package condusco. November 8, 2017

Package messaging. May 27, 2018

Package guardianapi. February 3, 2019

Package available. November 17, 2017

Package aws.transcribe

Package osmdata. February 22, 2018

Package statsdk. September 30, 2017

Package editdata. October 7, 2017

Package lumberjack. R topics documented: July 20, 2018

Package docxtools. July 6, 2018

Package goodpractice

Package data.world. April 5, 2018

Package bisect. April 16, 2018

Package essurvey. August 23, 2018

Package tidytransit. March 4, 2019

Package patentsview. July 12, 2017

Package loggit. April 9, 2018

Package semver. January 6, 2017

Package rwars. January 14, 2017

Package WordR. September 7, 2017

Package httpcache. October 17, 2017

Package RODBCext. July 31, 2017

Package postgistools

Package censusapi. August 19, 2018

Package genesysr. June 14, 2018

Package leaflet.minicharts

Package tiler. June 9, 2018

Package vinereg. August 10, 2018

Package bigqueryr. October 23, 2017

Package nngeo. September 29, 2018

Package gggenes. R topics documented: November 7, Title Draw Gene Arrow Maps in 'ggplot2' Version 0.3.2

Package RPresto. July 13, 2017

Package jdx. R topics documented: January 9, Type Package Title 'Java' Data Exchange for 'R' and 'rjava'

Package rprojroot. January 3, Title Finding Files in Project Subdirectories Version 1.3-2

Package jpmesh. December 4, 2017

Package clipr. June 23, 2018

Package crossword.r. January 19, 2018

Package bigreadr. R topics documented: August 13, Version Date Title Read Large Text Files

Package cancensus. February 4, 2018

Package IATScore. January 10, 2018

Package GetITRData. October 22, 2017

Package wrswor. R topics documented: February 2, Type Package

Package snakecase. R topics documented: March 25, Version Date Title Convert Strings into any Case

Package barcoder. October 26, 2018

Package widyr. August 14, 2017

Package ether. September 22, 2018

Package reval. May 26, 2015

Package dbx. July 5, 2018

Package splithalf. March 17, 2018

Package TrafficBDE. March 1, 2018

Package raker. October 10, 2017

Package profvis. R topics documented:

Package osrm. November 13, 2017

Package sfc. August 29, 2016

Package BiocManager. November 13, 2018

Package rsppfp. November 20, 2018

Package liftr. R topics documented: May 14, Type Package

Package memoise. April 21, 2017

Package pmatch. October 19, 2018

Package rbraries. April 18, 2018

Package vip. June 15, 2018

Package ecoseries. R topics documented: September 27, 2017

Package reconstructr

Package spelling. December 18, 2017

Package modules. July 22, 2017

Package zoomgrid. January 3, 2019

Package GetHFData. November 28, 2017

Package spark. July 21, 2017

Package postal. July 27, 2018

Package ezknitr. September 16, 2016

Transcription:

Package opencage January 16, 2018 Type Package Title Interface to the OpenCage API Version 0.1.4 Tool for accessing the OpenCage API, which provides forward geocoding (from placename to longitude and latitude) and reverse geocoding (from longitude and latitude to placename). License GPL (>= 2) LazyData TRUE URL http://github.com/ropensci/opencage BugReports http://github.com/ropensci/opencage/issues Imports httr, jsonlite, dplyr, memoise RoxygenNote 6.0.1 Suggests testthat, lintr, knitr, rmarkdown VignetteBuilder knitr Encoding UTF-8 NeedsCompilation no Author Maëlle Salmon [aut, cre], Noam Ross [ctb], Julia Silge [rev] (Julia Silge reviewed the package for ropensci, see https://github.com/ropensci/onboarding/issues/36.), Jake Russ [ctb], Daniel Possenriede [ctb] Maintainer Maëlle Salmon <maelle.salmon@yahoo.se> Repository CRAN Date/Publication 2018-01-16 11:31:26 UTC 1

2 countrycodes R topics documented: code_message........................................ 2 countrycodes........................................ 2 languagecodes........................................ 3 opencage_forward...................................... 3 opencage_reverse...................................... 5 Index 7 code_message API messages API messages Format Codes and corresponding messages from the API. data("code_message") countrycodes Country codes Country codes Format All possible ISO 3166-1 Alpha 2 standard country codes. data("countrycodes")

languagecodes 3 languagecodes Language codes Language codes Format All possible ISO 639-2 language codes. data("languagecodes") opencage_forward Forward geocoding Usage Forward geocoding, from placename to latitude and longitude tuplet(s). opencage_forward(placename, key = opencage_key(), bounds = NULL, countrycode = NULL, language = NULL, limit = 10, min_confidence = NULL, no_annotations = FALSE, no_dedupe = FALSE, no_record = FALSE, abbrv = FALSE, add_request = TRUE) Arguments placename key bounds countrycode language Placename. Your OpenCage key. 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 northeast corners of a bounding box. For example, bounds = c(-0.563160, 51.280430, 0.278970, 51.683 (min long, min lat, max long, max lat). 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. 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 browser and use the first language specified and if none are specified "en" (English) will be assumed.

4 opencage_forward Details Value 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 no_record abbrv add_request Logical (default FALSE), when TRUE the output will not be deduplicated. Logical (default FALSE), when TRUE no log entry of the query is created at OpenCage. Logical (default FALSE), when TRUE addresses are abbreviated (e.g. C. instead of Calle) Logical (default TRUE), when FALSE the query text is removed from the results data frame. To get an API key to access 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 https://stat545-ubc.github.io/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. 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. This function typically returns multiple results because of placename ambiguity; consider using the bounds parameter to limit the area searched. A list with results as a data.frame ( dplyr tbl_df ) called results with one line per results, the number of results as an integer, the timestamp as a POSIXct object, rate_info data.frame ( dplyr tbl_df ) with the maximal number of API calls per day for the used key, the number of remaining calls for the day and the time at which the number of remaining calls with be reset. ## Not run: opencage_forward(placename = "Sarzeau") opencage_forward(placename = "Islington, London") opencage_forward(placename = "Triererstr 15, Weimar 99423, Deutschland") ## End(Not run)

opencage_reverse 5 opencage_reverse Reverse geocoding Reverse geocoding, from latitude and longitude to placename(s). Usage opencage_reverse(latitude, longitude, key = opencage_key(), bounds = NULL, countrycode = NULL, language = NULL, limit = 10, min_confidence = NULL, no_annotations = FALSE, no_dedupe = FALSE, no_record = FALSE, abbrv = FALSE, add_request = TRUE) Arguments latitude longitude key bounds countrycode language Latitude. Longitude. Your OpenCage key. 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 northeast corners of a bounding box. For example, bounds = c(-0.563160, 51.280430, 0.278970, 51.683 (min long, min lat, max long, max lat). 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. 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 browser and use the first language specified and if none are specified "en" (English) will be assumed. 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 no_record abbrv add_request Logical (default FALSE), when TRUE the output will not be deduplicated. Logical (default FALSE), when TRUE no log entry of the query is created at OpenCage. Logical (default FALSE), when TRUE addresses are abbreviated (e.g. C. instead of Calle) Logical (default TRUE), when FALSE the query text is removed from the results data frame.

6 opencage_reverse Details Value To get an API key to access 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 https://stat545-ubc.github.io/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. 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. A list with results as a data.frame ( dplyr tbl_df ) called results with one line per results, the number of results as an integer, the timestamp as a POSIXct object, rate_info data.frame ( dplyr tbl_df ) with the maximal number of API calls per day for the used key, the number of remaining calls for the day and the time at which the number of remaining calls with be reset. ## Not run: opencage_reverse(latitude = 0, longitude = 0, limit = 2) ## End(Not run)

Index Topic data code_message, 2 countrycodes, 2 languagecodes, 3 code_message, 2 countrycodes, 2 languagecodes, 3 opencage_forward, 3 opencage_reverse, 5 7