Skip to content

Commit

Permalink
update testthat results
Browse files Browse the repository at this point in the history
  • Loading branch information
huizezhang-sherry committed Aug 4, 2024
1 parent 57bdb92 commit a9b2894
Show file tree
Hide file tree
Showing 15 changed files with 127 additions and 256,099 deletions.
58 changes: 29 additions & 29 deletions tests/testthat/_snaps/as-cubble.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
lat))
Output
# cubble: key: id [3], index: date, nested form
# spatial: [144.8321, -37.98, 145.0964, -37.6655], Missing CRS!
# spatial: [144.83, -37.98, 145.1, -37.67], Missing CRS!
# temporal: date [date], prcp [dbl], tmax [dbl], tmin [dbl]
id long lat elev name wmo_id ts
<chr> <dbl> <dbl> <dbl> <chr> <dbl> <list>
Expand All @@ -19,7 +19,7 @@
as_cubble(climate_flat, key = id, index = date, coords = c(long, lat))
Output
# cubble: key: id [3], index: date, nested form
# spatial: [144.8321, -37.98, 145.0964, -37.6655], Missing CRS!
# spatial: [144.83, -37.98, 145.1, -37.67], Missing CRS!
# temporal: date [date], prcp [dbl], tmax [dbl], tmin [dbl]
id long lat elev name wmo_id ts
<chr> <dbl> <dbl> <dbl> <chr> <dbl> <list>
Expand All @@ -33,14 +33,14 @@
as_cubble(climate_flat, key = id, index = date, coords = c(long, lat), crs = sf::st_crs(
4326))
Output
# cubble: key: id [3], index: date, nested form, [sf]
# spatial: [144.8321, -37.98, 145.0964, -37.6655], WGS 84
# cubble: key: id [3], index: date, nested form
# spatial: [144.83, -37.98, 145.1, -37.67], Missing CRS!
# temporal: date [date], prcp [dbl], tmax [dbl], tmin [dbl]
id long lat elev name wmo_id ts geometry
<chr> <dbl> <dbl> <dbl> <chr> <dbl> <list> <POINT [°]>
1 ASN00086038 145. -37.7 78.4 essen~ 95866 <tibble> (144.9066 -37.7276)
2 ASN00086077 145. -38.0 12.1 moora~ 94870 <tibble> (145.0964 -37.98)
3 ASN00086282 145. -37.7 113. melbo~ 94866 <tibble> (144.8321 -37.6655)
id long lat elev name wmo_id ts
<chr> <dbl> <dbl> <dbl> <chr> <dbl> <list>
1 ASN00086038 145. -37.7 78.4 essendon airport 95866 <tibble [10 x 4]>
2 ASN00086077 145. -38.0 12.1 moorabbin airport 94870 <tibble [10 x 4]>
3 ASN00086282 145. -37.7 113. melbourne airport 94866 <tibble [10 x 4]>

---

Expand All @@ -49,7 +49,7 @@
long, lat))
Output
# cubble: key: id [3], index: date, nested form
# spatial: [144.8321, -37.98, 145.0964, -37.6655], Missing CRS!
# spatial: [144.83, -37.98, 145.1, -37.67], Missing CRS!
# temporal: date [date], prcp [dbl], tmax [dbl], tmin [dbl]
id long lat elev name wmo_id ts
<chr> <dbl> <dbl> <dbl> <chr> <dbl> <list>
Expand All @@ -72,7 +72,7 @@
as_cubble(dt, coords = c(long, lat))
Output
# cubble: key: id [3], index: date, nested form
# spatial: [144.8321, -37.98, 145.0964, -37.6655], Missing CRS!
# spatial: [144.83, -37.98, 145.1, -37.67], Missing CRS!
# temporal: date [date], prcp [dbl], tmax [dbl], tmin [dbl]
id long lat elev name wmo_id ts
<chr> <dbl> <dbl> <dbl> <chr> <dbl> <list>
Expand All @@ -86,7 +86,7 @@
as_cubble(dt, key = id, index = date)
Output
# cubble: key: id [3], index: date, nested form, [sf]
# spatial: [144.8321, -37.98, 145.0964, -37.6655], WGS 84
# spatial: [144.83, -37.98, 145.1, -37.67], WGS 84
# temporal: date [date], prcp [dbl], tmax [dbl], tmin [dbl]
id elev name wmo_id long lat geometry ts
* <chr> <dbl> <chr> <dbl> <dbl> <dbl> <POINT [°]> <list>
Expand All @@ -99,22 +99,22 @@
Code
res
Output
# cubble: key: id [122848], index: band, nested form, [sf]
# spatial: [288790.500000803, 9110743.00002899, 298708.50000055,
# 9120746.50002874], SIRGAS 2000 / UTM zone 25S
# cubble: key: id [122848], index: band, nested form
# spatial: [288790.5, 9110743, 298708.5, 9120746.5], SIRGAS 2000 / UTM zone
# 25S
# temporal: band [int], L7_ETMs.tif [dbl]
x y id ts geometry
<dbl> <dbl> <int> <list> <POINT [m]>
1 288791. 9120747. 352 <tibble [6 x 2]> (288790.5 9120747)
2 288819. 9120747. 704 <tibble [6 x 2]> (288819 9120747)
3 288848. 9120747. 1056 <tibble [6 x 2]> (288847.5 9120747)
4 288876. 9120747. 1408 <tibble [6 x 2]> (288876 9120747)
5 288905. 9120747. 1760 <tibble [6 x 2]> (288904.5 9120747)
6 288933. 9120747. 2112 <tibble [6 x 2]> (288933 9120747)
7 288962. 9120747. 2464 <tibble [6 x 2]> (288961.5 9120747)
8 288990. 9120747. 2816 <tibble [6 x 2]> (288990 9120747)
9 289019. 9120747. 3168 <tibble [6 x 2]> (289018.5 9120747)
10 289047. 9120747. 3520 <tibble [6 x 2]> (289047 9120747)
x y id ts
<dbl> <dbl> <int> <list>
1 288791. 9120747. 352 <tibble [6 x 2]>
2 288819. 9120747. 704 <tibble [6 x 2]>
3 288848. 9120747. 1056 <tibble [6 x 2]>
4 288876. 9120747. 1408 <tibble [6 x 2]>
5 288905. 9120747. 1760 <tibble [6 x 2]>
6 288933. 9120747. 2112 <tibble [6 x 2]>
7 288962. 9120747. 2464 <tibble [6 x 2]>
8 288990. 9120747. 2816 <tibble [6 x 2]>
9 289019. 9120747. 3168 <tibble [6 x 2]>
10 289047. 9120747. 3520 <tibble [6 x 2]>
# i 122,838 more rows

---
Expand All @@ -124,7 +124,7 @@
Output
# cubble: key: id [122848], index: band, long form
# temporal: 1 -- 6 [1], no gaps
# spatial: x [dbl], y [dbl], geometry [POINT [m]]
# spatial: x [dbl], y [dbl]
id band L7_ETMs.tif
<int> <int> <dbl>
1 352 1 69
Expand Down Expand Up @@ -238,7 +238,7 @@
as_cubble(dt, key = id, index = date)
Output
# cubble: key: id [3], index: date, nested form, [sf]
# spatial: [144.8321, -37.98, 145.0964, -37.6655], WGS 84
# spatial: [144.83, -37.98, 145.1, -37.67], WGS 84
# temporal: prcp [dbl], tmax [dbl], tmin [dbl], date [date]
id elev name wmo_id geometry long lat ts
<chr> <dbl> <chr> <dbl> <POINT [°]> <dbl> <dbl> <list>
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/_snaps/check-key.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
See <https://tidyselect.r-lib.org/reference/faq-external-vector.html>.
Output
# cubble: key: lga [80], index: date, nested form, [sf]
# spatial: [140.961682, -39.1339581, 149.976291, -33.9960517], WGS 84
# spatial: [140.96, -39.13, 149.98, -34], WGS 84
# temporal: date [date], n [dbl], avg_7day [dbl]
lga long lat geometry ts
<chr> <dbl> <dbl> <GEOMETRY [°]> <list>
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/_snaps/cubble-class.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
See <https://tidyselect.r-lib.org/reference/faq-external-vector.html>.
Output
# cubble: key: id [3], index: date, nested form
# spatial: [144.8321, -37.98, 145.0964, -37.6655], Missing CRS!
# spatial: [144.83, -37.98, 145.1, -37.67], Missing CRS!
# temporal: date [date], prcp [dbl], tmax [dbl], tmin [dbl]
id long lat elev name wmo_id ts
<chr> <dbl> <dbl> <dbl> <chr> <dbl> <list>
Expand Down
42 changes: 21 additions & 21 deletions tests/testthat/_snaps/dplyr.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
filter(cb_nested, elev > 40)
Output
# cubble: key: id [2], index: date, nested form
# spatial: [144.8321, -37.7276, 144.9066, -37.6655], Missing CRS!
# spatial: [144.83, -37.73, 144.91, -37.67], Missing CRS!
# temporal: date [date], prcp [dbl], tmax [dbl], tmin [dbl]
id long lat elev name wmo_id ts
<chr> <dbl> <dbl> <dbl> <chr> <dbl> <list>
Expand Down Expand Up @@ -37,7 +37,7 @@
mutate(cb_nested, elev2 = elev + 10)
Output
# cubble: key: id [3], index: date, nested form
# spatial: [144.8321, -37.98, 145.0964, -37.6655], Missing CRS!
# spatial: [144.83, -37.98, 145.1, -37.67], Missing CRS!
# temporal: date [date], prcp [dbl], tmax [dbl], tmin [dbl]
id long lat elev name wmo_id ts elev2
<chr> <dbl> <dbl> <dbl> <chr> <dbl> <list> <dbl>
Expand Down Expand Up @@ -73,7 +73,7 @@
arrange(cb_nested, wmo_id)
Output
# cubble: key: id [3], index: date, nested form
# spatial: [144.8321, -37.98, 145.0964, -37.6655], Missing CRS!
# spatial: [144.83, -37.98, 145.1, -37.67], Missing CRS!
# temporal: date [date], prcp [dbl], tmax [dbl], tmin [dbl]
id long lat elev name wmo_id ts
<chr> <dbl> <dbl> <dbl> <chr> <dbl> <list>
Expand Down Expand Up @@ -174,7 +174,7 @@
See <https://tidyselect.r-lib.org/reference/faq-external-vector.html>.
Output
# cubble: key: id [3], index: date, nested form
# spatial: [144.8321, -37.98, 145.0964, -37.6655], Missing CRS!
# spatial: [144.83, -37.98, 145.1, -37.67], Missing CRS!
# temporal: date [date], prcp [dbl], tmax [dbl], tmin [dbl]
id long lat ts name
<chr> <dbl> <dbl> <list> <chr>
Expand All @@ -201,7 +201,7 @@
See <https://tidyselect.r-lib.org/reference/faq-external-vector.html>.
Output
# cubble: key: id [3], index: date, nested form
# spatial: [144.8321, -37.98, 145.0964, -37.6655], Missing CRS!
# spatial: [144.83, -37.98, 145.1, -37.67], Missing CRS!
# temporal: date [date], prcp [dbl], tmax [dbl], tmin [dbl]
id long lat elev wmo_id ts
<chr> <dbl> <dbl> <dbl> <dbl> <list>
Expand Down Expand Up @@ -285,7 +285,7 @@
rename(cb_nested, elev2 = elev)
Output
# cubble: key: id [3], index: date, nested form
# spatial: [144.8321, -37.98, 145.0964, -37.6655], Missing CRS!
# spatial: [144.83, -37.98, 145.1, -37.67], Missing CRS!
# temporal: date [date], prcp [dbl], tmax [dbl], tmin [dbl]
id long lat elev2 name wmo_id ts
<chr> <dbl> <dbl> <dbl> <chr> <dbl> <list>
Expand Down Expand Up @@ -321,7 +321,7 @@
rename(cb_nested, id2 = id)
Output
# cubble: key: id2 [3], index: date, nested form
# spatial: [144.8321, -37.98, 145.0964, -37.6655], Missing CRS!
# spatial: [144.83, -37.98, 145.1, -37.67], Missing CRS!
# temporal: date [date], prcp [dbl], tmax [dbl], tmin [dbl]
id2 long lat elev name wmo_id ts
<chr> <dbl> <dbl> <dbl> <chr> <dbl> <list>
Expand Down Expand Up @@ -357,7 +357,7 @@
left_join(nested, df1, by = "id")
Output
# cubble: key: id [3], index: date, nested form
# spatial: [144.8321, -37.98, 145.0964, -37.6655], Missing CRS!
# spatial: [144.83, -37.98, 145.1, -37.67], Missing CRS!
# temporal: date [date], prcp [dbl], tmax [dbl], tmin [dbl]
id long lat elev wmo_id ts name
<chr> <dbl> <dbl> <dbl> <dbl> <list> <chr>
Expand All @@ -371,7 +371,7 @@
right_join(nested, df1, by = "id")
Output
# cubble: key: id [2], index: date, nested form
# spatial: [144.9066, -37.98, 145.0964, -37.7276], Missing CRS!
# spatial: [144.91, -37.98, 145.1, -37.73], Missing CRS!
# temporal: date [date], prcp [dbl], tmax [dbl], tmin [dbl]
id long lat elev wmo_id ts name
<chr> <dbl> <dbl> <dbl> <dbl> <list> <chr>
Expand All @@ -384,7 +384,7 @@
inner_join(nested, df1, by = "id")
Output
# cubble: key: id [2], index: date, nested form
# spatial: [144.9066, -37.98, 145.0964, -37.7276], Missing CRS!
# spatial: [144.91, -37.98, 145.1, -37.73], Missing CRS!
# temporal: date [date], prcp [dbl], tmax [dbl], tmin [dbl]
id long lat elev wmo_id ts name
<chr> <dbl> <dbl> <dbl> <dbl> <list> <chr>
Expand All @@ -397,7 +397,7 @@
full_join(nested, df1, by = "id")
Output
# cubble: key: id [3], index: date, nested form
# spatial: [144.8321, -37.98, 145.0964, -37.6655], Missing CRS!
# spatial: [144.83, -37.98, 145.1, -37.67], Missing CRS!
# temporal: date [date], prcp [dbl], tmax [dbl], tmin [dbl]
id long lat elev wmo_id ts name
<chr> <dbl> <dbl> <dbl> <dbl> <list> <chr>
Expand All @@ -411,7 +411,7 @@
anti_join(nested, df1, by = "id")
Output
# cubble: key: id [1], index: date, nested form
# spatial: [144.8321, -37.6655, 144.8321, -37.6655], Missing CRS!
# spatial: [144.83, -37.67, 144.83, -37.67], Missing CRS!
# temporal: date [date], prcp [dbl], tmax [dbl], tmin [dbl]
id long lat elev wmo_id ts
<chr> <dbl> <dbl> <dbl> <dbl> <list>
Expand All @@ -423,7 +423,7 @@
bind_rows(df1, df2)
Output
# cubble: key: id [3], index: date, nested form
# spatial: [144.8321, -37.98, 145.0964, -37.6655], Missing CRS!
# spatial: [144.83, -37.98, 145.1, -37.67], Missing CRS!
# temporal: date [date], prcp [dbl], tmax [dbl], tmin [dbl]
id long lat elev name wmo_id ts
<chr> <dbl> <dbl> <dbl> <chr> <dbl> <list>
Expand Down Expand Up @@ -459,7 +459,7 @@
relocate(cb_nested, ts, .before = name)
Output
# cubble: key: id [3], index: date, nested form
# spatial: [144.8321, -37.98, 145.0964, -37.6655], Missing CRS!
# spatial: [144.83, -37.98, 145.1, -37.67], Missing CRS!
# temporal: date [date], prcp [dbl], tmax [dbl], tmin [dbl]
id long lat elev ts name wmo_id
<chr> <dbl> <dbl> <dbl> <list> <chr> <dbl>
Expand Down Expand Up @@ -495,7 +495,7 @@
slice_head(cb_nested, n = 2)
Output
# cubble: key: id [2], index: date, nested form
# spatial: [144.9066, -37.98, 145.0964, -37.7276], Missing CRS!
# spatial: [144.91, -37.98, 145.1, -37.73], Missing CRS!
# temporal: date [date], prcp [dbl], tmax [dbl], tmin [dbl]
id long lat elev name wmo_id ts
<chr> <dbl> <dbl> <dbl> <chr> <dbl> <list>
Expand All @@ -508,7 +508,7 @@
slice_tail(cb_nested, n = 2)
Output
# cubble: key: id [2], index: date, nested form
# spatial: [144.8321, -37.98, 145.0964, -37.6655], Missing CRS!
# spatial: [144.83, -37.98, 145.1, -37.67], Missing CRS!
# temporal: date [date], prcp [dbl], tmax [dbl], tmin [dbl]
id long lat elev name wmo_id ts
<chr> <dbl> <dbl> <dbl> <chr> <dbl> <list>
Expand All @@ -521,7 +521,7 @@
slice_max(cb_nested, elev)
Output
# cubble: key: id [1], index: date, nested form
# spatial: [144.8321, -37.6655, 144.8321, -37.6655], Missing CRS!
# spatial: [144.83, -37.67, 144.83, -37.67], Missing CRS!
# temporal: date [date], prcp [dbl], tmax [dbl], tmin [dbl]
id long lat elev name wmo_id ts
<chr> <dbl> <dbl> <dbl> <chr> <dbl> <list>
Expand All @@ -533,7 +533,7 @@
slice_min(cb_nested, elev)
Output
# cubble: key: id [1], index: date, nested form
# spatial: [145.0964, -37.98, 145.0964, -37.98], Missing CRS!
# spatial: [145.1, -37.98, 145.1, -37.98], Missing CRS!
# temporal: date [date], prcp [dbl], tmax [dbl], tmin [dbl]
id long lat elev name wmo_id ts
<chr> <dbl> <dbl> <dbl> <chr> <dbl> <list>
Expand All @@ -545,7 +545,7 @@
rowwise(cb_nested)
Output
# cubble: key: id [3], index: date, nested form, groups: rowwise
# spatial: [144.8321, -37.98, 145.0964, -37.6655], Missing CRS!
# spatial: [144.83, -37.98, 145.1, -37.67], Missing CRS!
# temporal: date [date], prcp [dbl], tmax [dbl], tmin [dbl]
id long lat elev name wmo_id ts
<chr> <dbl> <dbl> <dbl> <chr> <dbl> <list>
Expand Down Expand Up @@ -581,7 +581,7 @@
(res <- group_by(mutate(cb_nested, group1 = c(1, 1, 2)), group1))
Output
# cubble: key: id [3], index: date, nested form, groups: group1 [2]
# spatial: [144.8321, -37.98, 145.0964, -37.6655], Missing CRS!
# spatial: [144.83, -37.98, 145.1, -37.67], Missing CRS!
# temporal: date [date], prcp [dbl], tmax [dbl], tmin [dbl]
id long lat elev name wmo_id ts group1
<chr> <dbl> <dbl> <dbl> <chr> <dbl> <list> <dbl>
Expand All @@ -595,7 +595,7 @@
ungroup(res)
Output
# cubble: key: id [3], index: date, nested form
# spatial: [144.8321, -37.98, 145.0964, -37.6655], Missing CRS!
# spatial: [144.83, -37.98, 145.1, -37.67], Missing CRS!
# temporal: date [date], prcp [dbl], tmax [dbl], tmin [dbl]
id long lat elev name wmo_id ts group1
<chr> <dbl> <dbl> <dbl> <chr> <dbl> <list> <dbl>
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/_snaps/face-spatial-temporal.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
See <https://tidyselect.r-lib.org/reference/faq-external-vector.html>.
Output
# cubble: key: id [3], index: date, nested form
# spatial: [144.8321, -37.98, 145.0964, -37.6655], Missing CRS!
# spatial: [144.83, -37.98, 145.1, -37.67], Missing CRS!
# temporal: date [date], prcp [dbl], tmax [dbl], tmin [dbl]
id long lat elev name wmo_id ts
<chr> <dbl> <dbl> <dbl> <chr> <dbl> <list>
Expand Down
Loading

0 comments on commit a9b2894

Please sign in to comment.