Description Usage Arguments Details Value References Examples
View source: R/weather-norms.R
weather_norms_fields
pulls long term norm weather data from aWhere's API based on field id
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | weather_norms_fields(
field_id,
monthday_start,
monthday_end,
year_start,
year_end,
propertiesToInclude = "",
exclude_years = NULL,
includeFeb29thData = TRUE,
keyToUse = awhereEnv75247$uid,
secretToUse = awhereEnv75247$secret,
tokenToUse = awhereEnv75247$token,
apiAddressToUse = awhereEnv75247$apiAddress
)
|
field_id |
the field_id associated with the location for which you want to pull data. Field IDs are created using the create_field function. (string) |
monthday_start |
character string of the first month and day for which you want to retrieve data, in the form: MM-DD. This is the start of your date range. e.g. '07-01' (July 1) (required) |
monthday_end |
character string of the last month and day for which you want to retrieve data, in the form: MM-DD. This is the end of your date range. e.g. '07-01' (July 1) (required) |
year_start |
character string of the starting year (inclusive) of the range of years for which you're calculating norms, in the form YYYY. e.g., 2008 (required) |
year_end |
character string of the last year (inclusive) of the range of years for which you're calculating norms, in the form YYYY. e.g., 2015 (required) |
propertiesToInclude |
character vector of properties to retrieve from API. Valid values are meanTemp, maxTemp, minTemp, precipitation, solar, maxHumidity, minHumidity, dailyMaxWind (optional) |
includeFeb29thData |
Whether to keep data from Feb 29th on leap years. Because weather/agronomics summary statistics are calculated via the calendar date and 3 years are required to generate a value, data from this date is more likely to be NA. ALlows user to drop this data to avoid later problems (defaults to TRUE) |
keyToUse |
aWhere API key to use. For advanced use only. Most users will not need to use this parameter (optional) |
secretToUse |
aWhere API secret to use. For advanced use only. Most users will not need to use this parameter (optional) |
tokenToUse |
aWhere API token to use. For advanced use only. Most users will not need to use this parameter (optional) |
apiAddressToUse |
Address of aWhere API to use. For advanced use only. Most users will not need to use this parameter (optional) |
exclude_year |
Year or years which you'd like to exclude from your range of years on which to calculate norms. To exclude multiple years, provide a vector of years. You must include at least three years of data with which to calculate the norms. (numeric, optional) |
This function allows you to calculate the averages for weather attributes across any range of years for which data are available. The data pulled includes meanTemp, maxTemp, minTemp, precipitation average, solar radiation average, minHumidity, maxHumidity, maxWind and averageWind, along with the standard deviations for these variables. The data pulled is for the field id identified.
The data returned in this function allow you to compare this year or previous years to the long-term normals, calculated as the average of those weather conditions on that day in that location over the years specified.
Note about dates: The system does not adjust for any difference in dates between the location of the user and where data is being requested from. It is the responsibility of the user to ensure a valid date range is specified given any differences in timezone. These differences can have implications for whether a given date should be requested from the daily_observed functions or the forecast functions
dataframe of requested data for dates requested
https://docs.awhere.com/knowledge-base-docs/historical-weather-norms/
1 2 3 4 5 6 | ## Not run: weather_norms_fields(field_id = "field_test"
,monthday_start = "06-01"
,monthday_end = "09-01"
,year_start = 2006
,year_end = 2015)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.