ec_climate_search_locations: Search climate locations

Description Usage Arguments Examples

View source: R/climate_locations.R

Description

Search climate locations

Usage

1
2
3
4
5
ec_climate_search_locations(query = NULL, ..., timeframe = c("NA",
  "monthly", "daily", "hourly"), year = NULL, limit = NULL)

ec_climate_geosearch_locations(query = NULL, ..., timeframe = c("NA",
  "monthly", "daily", "hourly"), year = NULL, limit = NULL)

Arguments

query

A query in several forms

...

Additional arguments are used to filter ec_climate_locations_all

timeframe

The target timeframe for the query

year

An optional year when the location must have data

limit

The maximum number of locations to return (or NULL for no limit). Lon/lat queries are automatically capped at 30 locations.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
# character searches match the location column of ec_climate_locations_all
# (case-insensitive)
ec_climate_search_locations("ottawa")

# multiple values use OR logic
ec_climate_search_locations(c("ottawa on", "halifax"))

# you can use a year and a timeframe to find locations that are known to have some
# data for that year/timeframe
ec_climate_search_locations("ottawa", year = 2016)
ec_climate_search_locations("ottawa", timeframe = "daily", year = 2016)

# you can also use a vector of years
ec_climate_search_locations("ottawa", timeframe = "daily", year = 2000:2016)

# if you need to search geographically, you can pass a numeric vector in the form
# c(lon, lat)
ec_climate_search_locations(c(-75.69031, 45.42111))


# to use a human readable geocoded location, use ec_climate_geosearch_locations()
ec_climate_geosearch_locations("ottawa on")

paleolimbot/rclimateca documentation built on Sept. 11, 2019, 9:29 a.m.