#> 1: 2025-02-25 -27.5836 151.9317 7.6 25 72.1 26 100.0 26
#> 2: 2025-02-25 -27.5836 151.9317 0.1 25 47.1 26 100.0 26
#> 3: 2025-02-25 -27.5836 151.9317 0.0 25 38.8 26 100.0 26
#> 4: 2025-02-25 -27.5836 151.9317 0.0 25 43.1 26 95.7 26
#> 5: 2025-02-25 -27.5836 151.9317 0.0 25 49.2 26 100.0 26
#> ---
#> 361: 2025-02-25 -27.5836 151.9317 0.0 25 47.9 26 95.0 26
#> 362: 2025-02-25 -27.5836 151.9317 0.2 25 43.7 26 100.0 26
#> 363: 2025-02-25 -27.5836 151.9317 0.0 25 44.1 26 100.0 26
#> 364: 2025-02-25 -27.5836 151.9317 0.7 25 60.3 26 100.0 26
#> 365: 2025-02-25 -27.5836 151.9317 0.4 25 50.9 26 100.0 26
```
{weatherOz} offers much more functionality that is detailed in other vignettes that document how to use it to get station metadata for any station in the DPIRD or SILO databases, get extreme weather events for the DPIRD station network, get minute data for DPIRD stations, get APSIM formatted data from SILO, get ag bulletins, précis forecasts and various imagery files from BOM in the respective vignettes for DPIRD, SILO and BOM data available through {weatherOz}.
## Appendix 1 - Map of DPIRD Station Locations
``` r
# this chunk assumes that you have your DPIRD API key in your .Renviron file
if (requireNamespace("ggplot2", quietly = TRUE) &&
requireNamespace("ggthemes", quietly = TRUE) &&
requireNamespace("gridExtra", quietly = TRUE) &&
requireNamespace("grid", quietly = TRUE) &&
requireNamespace("maps", quietly = TRUE)) {
library(ggplot2)
library(mapproj)
library(maps)
library(ggthemes)
library(grid)
library(gridExtra)
library(dplyr)
dpird_stations <-
get_stations_metadata(which_api = "DPIRD") |>
filter_at(vars(latitude, longitude),
all_vars(!is.na(.)))
Aust_map <- map_data("world", region = "Australia")
dpird_stations <-
ggplot(dpird_stations, aes(x = longitude, y = latitude)) +
geom_polygon(
data = Aust_map,
aes(x = long, y = lat, group = group),
color = grey(0.7),
fill = NA
) +
geom_point(color = grDevices::rgb(0.58, 0.20, 0.13),
size = 0.09) +
coord_map(ylim = c(-44, -10),
xlim = c(112, 154)) +
theme_map() +
labs(title = "DPIRD Station Locations Available in Weather 2.0 API",
caption = "Data: Western Australia Department of Primary Industries and Regional Development (DPIRD)")
# Using the gridExtra and grid packages add a neatline to the map
grid.arrange(dpird_stations, ncol = 1)
grid.rect(
width = 0.98,
height = 0.98,
gp = grid::gpar(
lwd = 0.25,
col = "black",
fill = NA
)
)
}
```
## Appendix 2 - Map of SILO Station Locations
``` r
if (requireNamespace("ggplot2", quietly = TRUE) &&
requireNamespace("dplyr", quietly = TRUE) &&
requireNamespace("ggthemes", quietly = TRUE) &&
requireNamespace("gridExtra", quietly = TRUE) &&
requireNamespace("grid", quietly = TRUE) &&
requireNamespace("maps", quietly = TRUE)) {
library(ggplot2)
library(mapproj)
library(maps)
library(ggthemes)
library(grid)
library(gridExtra)
silo_stations <- get_stations_metadata(which_api = "SILO") |>
filter_at(vars(latitude, longitude),
all_vars(!is.na(.)))
Aust_map <- map_data("world", region = "Australia")
SILO_stations <-
ggplot(silo_stations, aes(x = longitude, y = latitude)) +
geom_polygon(
data = Aust_map,
aes(x = long, y = lat, group = group),
color = grey(0.7),
fill = NA
) +
geom_point(color = grDevices::rgb(0.58, 0.20, 0.13),
size = 0.09) +
coord_map(ylim = c(-44, -10),
xlim = c(112, 154)) +
theme_map() +
labs(title = "BOM Station Locations Available in SILO Database",
caption = "Data: Australia Bureau of Meteorology (BOM)")
# Using the gridExtra and grid packages add a neatline to the map
grid.arrange(SILO_stations, ncol = 1)
grid.rect(
width = 0.98,
height = 0.98,
gp = grid::gpar(
lwd = 0.25,
col = "black",
fill = NA
)
)
}
```