lookup_google_timezone: Use Google API to determine local time zone

View source: R/lookup_timezone.R

lookup_google_timezoneR Documentation

Use Google API to determine local time zone

Description

This function uses two packages, RCurl and XML, that are not required for the streamMetabolizer package as a whole. If these are not already installed, run install.packages(c('RCurl','XML')) before calling lookup_google_timezone.

Usage

lookup_google_timezone(
  latitude,
  longitude,
  timestamp = if (unitted::v(latitude) >= 0) as.POSIXct("2015-01-01 00:00:00", tz =
    "UTC") else as.POSIXct("2015-07-01 00:00:00", tz = "UTC")
)

Arguments

latitude

degrees latitude (positive for north) of the location to look up.

longitude

degrees longitude (positive for east) of the location to look up.

timestamp

POSIXct representation of a time - determines daylight savings offset, if any. the default is Jan 1 for northern latitudes and July 1 for southern latitudes, i.e., a time surely not during daylight savings time.

Details

Some parameter definitions below are copied directly from the API webpage.

References

https://developers.google.com/maps/documentation/timezone/


USGS-R/streamMetabolizer documentation built on Aug. 15, 2023, 7:50 a.m.