Skip to content

Commit

Permalink
spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
huizezhang-sherry committed Jun 16, 2023
1 parent 016c18e commit f5c0b37
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ knitr::include_graphics("man/figures/cubble-operations.png")

* To learn more about the cubble class: [1. The cubble class](articles/cb1class.html)
* To create a cubble or coerce an existing R object into a cubble: [2. Creation and coercion](articles/cb2create.html)
* To incoporate sf or tsibble in a cubble: [3. Compatibility with tsibble and sf](articles/cb3tsibblesf.html)
* To incorporate sf or tsibble in a cubble: [3. Compatibility with tsibble and sf](articles/cb3tsibblesf.html)
* To create glyph map, match multiple data sources, and create interactive graphics with cubble: [4. Making a glyph map](articles/cb4glyph.html), [5. Matching different data sources](articles/cb5match.html), and [6. Interactive graphics](articles/cb6interactive.html)

## Reference
2 changes: 1 addition & 1 deletion vignettes/cb1class.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ library(patchwork)

# The cubble object

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:
The cubble class is an S3 class built on tibble that allows the spatio-temporal data to be wrangled in two forms: a nested/spatial form and a long/temporal form. It consists of two subclasses:

- a nested/ spatial cubble is represented by the class `c("spatial_cubble_df", "cubble_df")`
- a long/ temporal cubble is represented by the class `c("temporal_cubble_df", "cubble_df")`
Expand Down
2 changes: 1 addition & 1 deletion vignettes/cb2create.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class(res)
class(res$ts[[1]])
```

The viegnette [3. Compatibility with tsibble and sf](cb3tsibblesf.html) will introduce more on the cubble's compatibility with tsibble and sf.
The vignette [3. Compatibility with tsibble and sf](cb3tsibblesf.html) will introduce more on the cubble's compatibility with tsibble and sf.

# Coerce from foreign objects

Expand Down
2 changes: 1 addition & 1 deletion vignettes/cb3tsibblesf.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ library(sf)

Analysts often have their preferred spatial or temporal data structure that they prefer to use for spatio-temporal analysis. For example, the `tbl_ts` class from the tsibble package [@tsibble] is commonly used in time series forecasting and the sf class [@sf] is frequently used in spatial data science. In cubble, analysts have the flexibility to combine these two structures together by allowing the spatial component to be an sf object and the temporal component to also be a tsibble object.

# USing a tsibble for the temporal component
# Using a tsibble for the temporal component

The `key` and `index` arguments in a cubble object corresponds to the tsibble counterparts and they can be safely omitted, if the temporal component is a tsibble object, i.e. `meteo_ts` in the example below. The tsibble class from the input will be carried over to the cubble object:

Expand Down
4 changes: 2 additions & 2 deletions vignettes/cb4glyph.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ data |>

# Monthly average maximum temperature in Victoria, Australia

Global Historical Climatology Network (GHCN) provides daily climate measures from stations across the world. The dataset `climate_aus` stores climate variables (prcipitation, maximum and minimum temperature) for `r nrow(climate_aus)` Australian stations in 2020. This is a lot of stations to work with and we will start with a randomly sample 80 stations (since not all the stations have the full year record, we will only consider those that have 366 days for 2020):
Global Historical Climatology Network (GHCN) provides daily climate measures from stations across the world. The dataset `climate_aus` stores climate variables (precipitation, maximum and minimum temperature) for `r nrow(climate_aus)` Australian stations in 2020. This is a lot of stations to work with and we will start with a randomly sample 80 stations (since not all the stations have the full year record, we will only consider those that have 366 days for 2020):

```{r}
set.seed(12345)
Expand All @@ -88,7 +88,7 @@ Next, we would like to summarise the daily maximum temperature into monthly. Thi
summarise(tmax = mean(tmax, na.rm = TRUE)))
```

One requirement for the data to be plot with ggplot2 is that all the variables mapped to aesthetics need to be store in the same table. In cubble, you can move the spaital variables (e.g. `long` and `lat`) into the temporal cubble with `unfold()`:
One requirement for the data to be plot with ggplot2 is that all the variables mapped to aesthetics need to be store in the same table. In cubble, you can move the spatial variables (e.g. `long` and `lat`) into the temporal cubble with `unfold()`:

```{r}
(tmax <- tmax %>% unfold(long, lat))
Expand Down
2 changes: 1 addition & 1 deletion vignettes/cb5match.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ res_sp[[1]]

# Temporal matching

For temporal matching, we match teh variable `Water_course_level` from the river data to `prcp` in the weather station data. The variable `group` and `types` identify the matching group and the two datasets:
For temporal matching, we match the variable `Water_course_level` from the river data to `prcp` in the weather station data. The variable `group` and `types` identify the matching group and the two datasets:

```{r}
(res_tm <- res_sp %>%
Expand Down
2 changes: 1 addition & 1 deletion vignettes/cb6interactive.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ The selection in the linked plot works in both directions. In the screenshot bel
knitr::include_graphics("cluster-diagram/selection1.png")
```

Selection on the leaflet map can be made using the selection tool below the zoom-in/out bottom on the map. In the screenshot, two selections are made - one on northern Australia and the other in inland Queensland. Northern Australia has a narrow temperature range constantly 20 degrees throughout the year, while inland Queensland temperature has a much larger temperature range with a noticable difference between the summer and winter periods.
Selection on the leaflet map can be made using the selection tool below the zoom-in/out bottom on the map. In the screenshot, two selections are made - one on northern Australia and the other in inland Queensland. Northern Australia has a narrow temperature range constantly 20 degrees throughout the year, while inland Queensland temperature has a much larger temperature range with a noticeable difference between the summer and winter periods.

```{r echo = FALSE, out.width="150%"}
knitr::include_graphics("cluster-diagram/selection2.png")
Expand Down

0 comments on commit f5c0b37

Please sign in to comment.