get_silodata: Retrieve weather data from Queensland Government DES...

Description Usage Arguments Details Value See Also Examples

View source: R/get_silodata.R

Description

SILO (Scientific Information for Land Owners) is a database of Australian climate data from 1889 (current to yesterday). It provides data sets for a range of climate variables. SILO is hosted by the Science and Technology Division of the Queensland Government's Department of Environment and Science (DES). For more information please see https://www.longpaddock.qld.gov.au/silo/about. While several file formats are available, we use the APSIM format. Other formats may be produced although the function may need to be modified if the arguments do not fully accommodate the specifications. Please see https://www.longpaddock.qld.gov.au/silo/about/file-formats-and-samples/ SILO products are provided free of charge to the public for use under the Creative Commons Attribution 4.0 license and appear to be subject to fair use limits. Note that SILO may be unavailable between 11am and 1pm (Brisbane time) each Wednesday and Thursday to allow for essential system maintenance.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
get_silodata(
  latitude,
  longitude,
  email,
  START = "20201101",
  FINISH = "20201231",
  FORMAT = "APSIM",
  PASSWORD = "apitest",
  extras = NULL,
  URL = "https://www.longpaddock.qld.gov.au/cgi-bin/silo/DataDrillDataset.php"
)

Arguments

latitude

A number or character string of the site latitude for data retrieval

longitude

A number or character string of the site longitude for data retrieval

email

A string containing your email which is required by DES in order to access the data

START

Start date as a character string “YYYYMMDD” with no spaces. Default: “20201101”

FINISH

Last date as a character string “YYYYMMDD” with no spaces. Default: “20201231”

FORMAT

of data file required. While this function was originally constructed to obtain APSIM format, other formats are available. See https://www.longpaddock.qld.gov.au/silo/about/file-formats-and-samples/ Default: “APSIM”

PASSWORD

Default: “apitest”

extras

A list containing variable names and values for extra columns. Note that the new variable(s) will have the same value. Default: NULL

URL

is the URL for querying the website and probably will not need to be changed. Default: “https://www.longpaddock.qld.gov.au/cgi-bin/silo/DataDrillDataset.php”

Details

When extrais specified, then extra columns which could for instance include the site name are added to each row for later calculations. This can also be employed in a loop using for() loops or a tidyverse approach, such as purrrlyr::by_row() in order to manipulate data by site.

Value

Data frame/tibble containing specified or default climate variables. If “APSIM” format is specified then an extra column date_met, containing the date, is returned along with the usual year and day of year day.

See Also

get_multi_silodata

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 
## Example 1: Replace MY_EMAIL_ADDRESS with your email address below
##            Latitude and Longitude character strings
boonah_data <-
  get_silodata(latitude = "-27.9927", longitude = "152.6906",
               email = "MY_EMAIL_ADDRESS",
               START = "20190101", FINISH = "20200531")
## Example 2: Replace MY_EMAIL_ADDRESS below with yours - adds extra column
##            Latitude and Longitude are numeric
boonah_data2 <-
  get_silodata(latitude = -27.9927, longitude = 152.6906,
               email = "MY_EMAIL_ADDRESS",
               START = "20190101", FINISH = "20200531",
               extras = list(Sitename = "Boonah"))

## End(Not run)

cropgrowdays documentation built on Dec. 11, 2021, 9:23 a.m.