diff --git a/NAMESPACE b/NAMESPACE index f4916ec..e1fa63d 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -22,6 +22,7 @@ export(get_historical_state_estimates) export(get_soil_thickness) export(inspect_cache) export(plot) +export(print_agfd_nc_file_format) export(print_soil_thickness_metadata) export(read_agfd_dt) export(read_agfd_stars) diff --git a/R/get_agfd.R b/R/get_agfd.R index a70462f..a95bc43 100644 --- a/R/get_agfd.R +++ b/R/get_agfd.R @@ -242,3 +242,39 @@ print.read.abares.agfd.nc.files <- function(x, ...) { cli::cat_line() invisible(x) } + +#' Prints File Format Information for the AGFD NetCDF Files +#' +#' Print the file format from section 3.2 in \cite{Australian Bureau of +#' Agricultural and Resource Economics and Sciences}. +#' +#' @references Australian gridded farm data, Australian Bureau of Agricultural +#' and Resource Economics and Sciences, Canberra, July, DOI: +#' +#' @source +#' @examples +#' print_agfd_nc_file_format() +#' +#' @export +#' @autoglobal +#' @noRd +print_agfd_nc_file_format <- function() { + cli::cat_rule() + cli::cli_text("Each of the layers in simulation output data is represented as + a 2D raster in NETCDF files, with the following grid format:") + cli::cat_line() + cli::cli_dl( + c( + "{.strong CRS}" = "EPSG:4326 - WGS 84 – Geographic", + "{.strong Extent}" = "111.975 -44.525 156.275 -9.975", + "{.strong Unit}" = "Degrees", + "{.strong Width}" = "886", + "{.strong Height}" = "691", + "{.strong Cell size}" = "0.05 degree x 0.05 degree" + ) + ) + cli::cat_rule() + cli::cli_text("For further details, see the ABARES website, + {.url https://www.agriculture.gov.au/abares/research-topics/surveys/farm-survey-data/australian-gridded-farm-data}") +} + diff --git a/codemeta.json b/codemeta.json index 2c67ebf..72dfdb2 100644 --- a/codemeta.json +++ b/codemeta.json @@ -333,7 +333,7 @@ }, "SystemRequirements": null }, - "fileSize": "387.526KB", + "fileSize": "390.077KB", "citation": [ { "@type": "SoftwareSourceCode", diff --git a/vignettes/read.abares.Rmd b/vignettes/read.abares.Rmd index dfa732e..70befc2 100644 --- a/vignettes/read.abares.Rmd +++ b/vignettes/read.abares.Rmd @@ -42,6 +42,25 @@ Load the {read.abares} library. library(read.abares) ``` +Check the file format information for the NetCDF files. + + +``` r +print_agfd_nc_file_format() +#> ──────────────────────────────────────────────────────────────────────────────────────── +#> Each of the layers in simulation output data is represented as a 2D raster in NETCDF +#> files, with the following grid format: +#> CRS: EPSG:4326 - WGS 84 – Geographic +#> Extent: 111.975 -44.525 156.275 -9.975 +#> Unit: Degrees +#> Width: 886 +#> Height: 691 +#> Cell size: 0.05 degree x 0.05 degree +#> ──────────────────────────────────────────────────────────────────────────────────────── +#> For further details, see the ABARES website, +#> +``` + Download or load from the local cache and read the AGFD files as a list of {stars} objects. @@ -110,7 +129,7 @@ head(tdnc[[1]]) #> # A tibble: 1 × 2 #> access source #> -#> 1 2024-12-07 21:23:36 /Users/adamsparks/Library/Caches/org.R-project.R/R/read.abares/hi… +#> 1 2024-12-07 23:43:59 /Users/adamsparks/Library/Caches/org.R-project.R/R/read.abares/hi… #> #> $axis #> # A tibble: 84 × 3 diff --git a/vignettes/read.abares.Rmd.orig b/vignettes/read.abares.Rmd.orig index 2b28dc1..e569c0d 100644 --- a/vignettes/read.abares.Rmd.orig +++ b/vignettes/read.abares.Rmd.orig @@ -46,6 +46,12 @@ Load the {read.abares} library. library(read.abares) ``` +Check the file format information for the NetCDF files. + +```{r agfd-file-format} +print_agfd_nc_file_format() +``` + Download or load from the local cache and read the AGFD files as a list of {stars} objects. ```{r agfd-stars}