From f1048bc06c5465950d7c5866329cf0261bf99593 Mon Sep 17 00:00:00 2001 From: huizezhang-sherry Date: Fri, 16 Jun 2023 07:19:20 +0000 Subject: [PATCH] Built site for cubble: 0.3.0@70cc662 --- articles/cb1class.html | 104 ++++++++-------- articles/cb2create.html | 87 +++++++------ articles/cb3tsibblesf.html | 14 +-- articles/cb4glyph.html | 83 +++++-------- articles/cb5match.html | 116 +++++++++--------- .../figure-html/unnamed-chunk-7-1.png | Bin 181467 -> 181465 bytes articles/cb6interactive.html | 108 ++++++++-------- news/index.html | 6 - pkgdown.yml | 2 +- 9 files changed, 250 insertions(+), 270 deletions(-) diff --git a/articles/cb1class.html b/articles/cb1class.html index 77bd0adb..c752b0de 100644 --- a/articles/cb1class.html +++ b/articles/cb1class.html @@ -113,34 +113,36 @@

1. The cubble class

-

Spatio-temporal data comes various spatial and temporal -characteristics and requires different data structures to wrangle: -climate weather stations are recorded at fixed point location but with -potential temporal data quality issue (missingness on the day); GPS data -tracks unique point locations at different timestamps; satellite -imageries captures snapshots of landscape at selected time. The type of -spatio-temporal data cubble tackles are those collected at unique fixed -locations while allowed for irregularity in the temporal dimension, like -the weather station data. In the four layouts presented by the spacetime -paper (Pebesma 2012), cubble handles full -space-time and sparse space-time layouts.

+

The term spatio-temporal data can incorporate various spatial and +temporal characteristics and different data may require different data +structures for wrangling and analysis: climate weather stations records +data at fixed point location but may suffer from potential temporal data +quality issue such as missing data for certain days. GPS data tracks +unique point locations at different timestamps and can be organised as +trajectories; satellite imagery captures snapshots of landscapes at +selected times and is commonly structured as rasters. The +spatio-temporal data that cubble addresses are those collected at unique +fixed locations, allowing for irregularity in the temporal dimension, +such as the weather station data. This corresponds to the full +space-time and sparse space-time layouts in the spacetime paper (Pebesma 2012):

The cubble object

-

The cubble class is an S3 class, built on tibble, to pivot -spatio-temporal data into a nested/spatial form and a long/temporal -form. It has two subclasses:

+

The cubble class is an S3 class built on tibble that allows the +spatio-temporal data to be wrnagled in two forms: a nested/spatial form +and a long/temporal form. It consists of two subclasses:

-

A nested cubble arranges spatial variables in columns and nests -temporal variables in a specialised ts column:

+

In a nested cubble, spatial variables are organised as columns and +temporal variables are nested within a specialised ts +column:

 cb_nested
 #> # cubble:   key: id [3], index: date, nested form
@@ -155,14 +157,15 @@ 

The cubble object#> [1] "spatial_cubble_df" "cubble_df" "tbl_df" #> [4] "tbl" "data.frame"

This toy dataset is a subset of a larger data -climate_aus from Global Historical Climatology Network -Daily (GHCND). The three airport stations in Melbourne are recorded with -station metadata: station ID, longitude, latitude, elevation, station -name, world meteorology organisation ID. The temporal variables are +climate_aus sourced from the Global Historical Climatology +Network Daily (GHCND). It records three airport stations located in +Melbourne, Australia and includes spatial variables such as station ID, +longitude, latitude, elevation, station name, World Meteorology +Organisation ID. The dataset contains temporal variables including precipitation, maximum and minimum temperature, which can be read from the cubble header.

-

A long cubble expands the temporal variables into the long form and -stores the spatial variables as a data attribute:

+

In a long cubble, the temporal variables are expanded into the long +form, while the spatial variables are stored as a data attribute:

 cb_long
 #> # cubble:   key: id [3], index: date, long form
@@ -193,7 +196,8 @@ 

The cubble attributes

A cubble object inherits the attributes from tibble (and its subclasses): class, row.names, and -names, in addition to three specialised attributes:

+names. Additionally, it has three specialised +attributes:

-

Readers known the key and index attributes -from the tsibble package would already be familiar the two -arguments. In cubble, the key attribute identifies the row -in the nested cubble, and together with the index argument, -identifies the row in the long cubble. Currently, cubble only supports -one variable as the key and the accepted temporal class for index -includes the base R class Date, POSIXlt, -POSIXct and tsibble’s tsibble::yearmonth(), -tsibble::yearweek(), and -tsibble::yearquarter() class.

-

The coords attribute takes an ordered pair of -coordinate. It can be a unprojected pair of longitude and latitude, or a -projected easting and northing values. Under the hood, the -sf package is used to calculate the bounding box, shown in -the header of a nested cubble, and other spatial operations.

-

The long cubble has a special attribute spatial to store -the spatial variables: all the variables in the nested cubble, except -for the ts column. Below we print the attributes for -cb_nested and cb_long, shown previously:

+

Readers familiar with the key and index +attributes from the tsibble package will already know the +two arguments. In cubble, the key attribute identifies the +row in the nested cubble, and when combined with the index +argument, it identifies the row in the long cubble. Currently, cubble +only supports one variable as the key, and the accepted temporal classes +for the index include the base R classes Date, +POSIXlt, POSIXct as well as tsibble’s +tsibble::yearmonth(), tsibble::yearweek(), and +tsibble::yearquarter() classes.

+

The coords attribute represents an ordered pair of +coordinates. It can be either an unprojected pair of longitude and +latitude or a projected easting and northing value. The sf +package is used under the hood to calculate the bounding box, displayed +in the header of a nested cubble, and perform other spatial +operations.

+

The long cubble has a special attribute called spatial +to store the spatial variables, which includes all the variables from +the nested cubble except for the ts column. Below we print +the attributes information for the previously shown +cb_nested and cb_long objects:

-

The shortcut function are available to extract components in the -attributes:

+

The following shortcut functions are available to extract components +from the attributes:

-
- -
  • -as_cubble() method for sftime objects
  • -
  • new function add_geometry_column() to facilitate class cast with sftime objects (#15)
diff --git a/pkgdown.yml b/pkgdown.yml index 97fa4db2..99ceaf15 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -9,5 +9,5 @@ articles: cb5match: cb5match.html cb6interactive: cb6interactive.html cubble: cubble.html -last_built: 2023-06-16T03:18Z +last_built: 2023-06-16T07:17Z