semnar (version 0.7.1)

guess_address.semnar: Guess presentation address in a semnar object using OSM's API for reverse geocoding

Description

Guess presentation address in a semnar object using OSM's API for reverse geocoding

Usage

# S3 method for semnar
guess_address(object, all = FALSE)

guess_address(object, all = TRUE)

Arguments

object

an object of class semnar. See add_presentation.

all

should we be guessing all addresses (TRUE) or only missing ones (FALSE; default)?

Value

An object of class semnar with all (all = TRUE) or the missing presentation addresses (all = FALSE) completed.

Details

guess_address is using reverse geocoding through the API at https://nominatim.openstreetmap.org. Please check at that link for requests limits.

See Also

add_presentation

Examples

Run this code
# NOT RUN {
library("magrittr")
out <- add_presentation(country = "England", city = "Coventry",
                        lon = -1.560843, lat = 52.384019,
                        event = "Young Researchers' Meeting",
                        title = "A workflow that most probably isn't yours",
                        link = "https://warwick.ac.uk/fac/sci/statistics/news/yrm/",
                        materials = "http://ikosmidis.com/files/ikosmidis_YRM_2019.pdf",
                        type = "presentation", institution = "University of Warwick",
                        department = "Department of Statistics",
                        venue = "Mathematical Sciences Building", room = "M1.02",
                        year = 2019, month = 5, day = 28,
                        start_hour = 16, start_min = 00,
                        end_hour = 17, end_min = 00) %>%
        add_presentation(country = "United States", city = "Stanford",
                         lon = -122.165330, lat = 37.429464,
                         event = "useR! 2016",
                         title = "brglm: Reduced-bias inference in generalized linear models",
                         link = "http://user2016.r-project.org//files/abs-book.pdf",
                         materials = "https://bit.ly/2KCBbKg",
                         type = "presentation", institution = NA, department = NA,
                         venue = "Stanford Institute for Economic Policy Research",
                         room = "Siepr 120",
                         year = 2016, month = 06, day = 29,
                         start_hour = 14, start_min = 15,
                         end_hour = 14, end_min = 35)
out$address
# Reverse geocoding
out <- guess_address(out)
out$address
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab