Skip to content

Commit

Permalink
Merge pull request #17 from DPIRD-FSI/devel
Browse files Browse the repository at this point in the history
  • Loading branch information
adamhsparks authored Nov 9, 2023
2 parents d5f3a4a + d3d81b9 commit c74e225
Show file tree
Hide file tree
Showing 26 changed files with 172 additions and 147 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
.RData
.Ruserdata
docs/
.DS_Store
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: extractOz
Title: Extract Australian Soil, Weather and GRDC Agro-ecological Zone Information from GPS Points
Version: 1.1.2
Version: 1.1.3
Authors@R: c(person(given = "Adam H.", family = "Sparks",
email = "adam.sparks@dpird.wa.gov.au",
role = c("aut", "cre"),
Expand Down Expand Up @@ -50,5 +50,6 @@ X-schema.org-isPartOf: https://www.dpird.wa.gov.au/
URL: https://github.com/DPIRD-FSI/extractOz
BugReports: https://github.com/DPIRD-FSI/extractOz/issues
LazyData: true
LazyDataCompression: xz
Config/roxyglobals/filename: generated-globals.R
Config/roxyglobals/unique: FALSE
9 changes: 9 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@

# extractOz 1.1.3

## Minor changes

- Tidy documentation.

- Format headings in README and Vignette.

# extractOz 1.1.2

- Updates {vcr} cassettes for latest {weatherOz}.
Expand Down
1 change: 1 addition & 0 deletions R/aez.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

#' GRDC Australian Grains Agroecological Zones
#'
#' An [sf::sf()] object for displaying GRDC Australian Grains Agroecological
Expand Down
2 changes: 1 addition & 1 deletion R/df_to_list.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

#' Convert a data.frame or Tibble to a list suitable for use in extractOz
#' Convert a Data Frame Object to a List Suitable For Use
#'
#' A helper function to convert `data.frames` or objects inheriting from
#' `data.frame`, *e.g.* [tibble::tibble()] or [data.table::data.table()] into
Expand Down
5 changes: 3 additions & 2 deletions R/extract_ae_zone.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

#' Extract GRDC Agroecological Zones Using Australian GPS Coordinates
#'
#' @param x `List`. An object with names containing `vector` pairings of
Expand All @@ -7,8 +8,8 @@
#' of the individual `vectors` and will be included in a "location" column of
#' the output.
#'
#' @return A `data.table` with the provided \acronym{GPS} coordinates and the
#' respective \acronym{GRDC} agroecological zone.
#' @return A [data.table::data.table] with the provided \acronym{GPS}
#' coordinates and the respective \acronym{GRDC} agroecological zone.
#'
#' @examples
#'
Expand Down
4 changes: 2 additions & 2 deletions R/extract_area.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
#' derive location information from.
#' @param area the field in `spatial` that should be returned.
#'
#' @return A `data.table` with the provided \acronym{GPS} coordinates and the
#' respective `area` value from `spatial`.
#' @return A [data.table::data.table] with the provided \acronym{GPS}
#' coordinates and the respective `area` value from `spatial`.
#'
#' @examples
#' # load the `aez` data included in the package for use in example only.
Expand Down
8 changes: 4 additions & 4 deletions R/extract_daas_soil_order.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
#' soils data. If `cache = TRUE`, any use after this will be much faster due to
#' the locally cached geospatial soils data.
#'
#' @return A `data.table` with the provided \acronym{GPS} coordinates and the
#' respective Digital Atlas of Australian Soils (\acronym{DAAS} soil order),
#' "Spatial Data Conversion of the Atlas of Australian Soils to the Australian
#' Soil Classification v01".
#' @return A [data.table::data.table] with the provided \acronym{GPS}
#' coordinates and the respective Digital Atlas of Australian Soils
#' (\acronym{DAAS} soil order), "Spatial Data Conversion of the Atlas of
#' Australian Soils to the Australian Soil Classification v01".
#'
#' @source <https://data.gov.au/dataset/ds-dga-5ccb44bf-93f2-4f94-8ae2-4c3f699ea4e7/distribution/dist-dga-56ba5f25-2324-43b5-8df8-b9c69ae2ea0b/details?q=>
#'
Expand Down
3 changes: 2 additions & 1 deletion R/extract_power.R
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@
#' }
#'
#'
#' @return A `data.table` with data from the \acronym{POWER} \acronym{API}.
#' @return A [data.table::data.table] with data from the \acronym{POWER}
#' \acronym{API}.
#'
#' @source <https://power.larc.nasa.gov/>
#'
Expand Down
7 changes: 0 additions & 7 deletions R/globals.R

This file was deleted.

11 changes: 6 additions & 5 deletions R/internal_functions.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

#' Add %notin% function
#' Add %notin%
#'
#' Negates `%in%` for easier (mis)matching.
#'
Expand All @@ -14,14 +14,15 @@
match(x, table, nomatch = 0L) == 0L
}

#' Create a data.table object from a named list
#' Create a data.table Object From a Named List
#'
#' Take a named list and convert it into a `data.table` by creating a
#' Take a named list and convert it into a \CRANpkg{data.table} by creating a
#' long-format object and converting to a wide-format object and returning it.
#'
#' @param x `List` with named locations to convert into a `data.table` object
#' @param x `List` with named locations to convert into a \CRANpkg{data.table}
#' object.
#'
#' @return A `data.table` object
#' @return A \CRANpkg{data.table} object.
#'
#' @examples
#' locs <- list(
Expand Down
8 changes: 4 additions & 4 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Extract the GRDC agroecological zone, major soil order and weather data from you
Datasets for the GRDC agroecological zones and functions that automatically download modified data from the Digital Atlas of Australian Soils are included in this package for ease of use.
You may also use your own geospatial vector format file to extract similar information using the generic function, `extract_area()`.

## Quick start
## Quick Start

You can install {extractOz} like so.

Expand All @@ -34,7 +34,7 @@ library(extractOz)
library(dplyr)
```

## Create locations in WA and NSW
## Create Locations in WA and NSW

```{r create-locs}
locs <- list(
Expand All @@ -52,15 +52,15 @@ See `?extract_ae_zone()` for more help on how to use this function.
z <- extract_ae_zone(x = locs)
```

## Extract the soil order
## Extract the Soil Order

See `?extract_soil_order()` for more help on how to use this function.

```{r soil-order}
s <- extract_daas_soil_order(x = locs)
```

## Get Weather Data for these Locations in 2020
## Get Weather Data for These Locations in 2020

Using the previously used list of GPS points, fetch weather data from SILO for 2020.
This is just a non-working example, replace `your_api_key` with your email address below.
Expand Down
Loading

0 comments on commit c74e225

Please sign in to comment.