-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create vignette for brassens output analysis
- Loading branch information
Eva Marques
committed
Jun 18, 2024
1 parent
bab4c2b
commit 072c205
Showing
12 changed files
with
154 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file added
BIN
+91.6 KB
case_study_triangle/cws_triangle_cleaned_calibrated_2021-07-22_2021-07-23.rds
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
|
||
--- | ||
title: "Brassens output analysis" | ||
format: html | ||
editor: visual | ||
author: "Eva Marques" | ||
date: "2021-07-23" | ||
--- | ||
|
||
```{r} | ||
devtools::load_all() | ||
``` | ||
|
||
### Some configuration parameters | ||
|
||
```{r} | ||
ts <- as.POSIXct("2021-07-22 00:00:00", tz = "UTC") | ||
te <- as.POSIXct("2021-07-23 23:59:59", tz = "UTC") | ||
timestamp <- as.POSIXct("2021-07-23 06:00:00", tz = "America/New_York") | ||
imp <- terra::rast("../case_study_triangle/imp_triangle.tif") |> | ||
terra::project("EPSG:4326") | ||
``` | ||
|
||
|
||
## Open datasets in .rds file | ||
|
||
```{r} | ||
cws_raw <- readRDS(paste0( | ||
"../case_study_triangle/cws_triangle_raw_", | ||
lubridate::date(ts), | ||
"_", | ||
lubridate::date(te), | ||
".rds" | ||
)) | ||
cws_qc <- readRDS(paste0( | ||
"../case_study_triangle/cws_triangle_cleaned_", | ||
lubridate::date(ts), | ||
"_", | ||
lubridate::date(te), | ||
".rds" | ||
)) | ||
cws_final <- readRDS(paste0( | ||
"../case_study_triangle/cws_triangle_cleaned_calibrated_", | ||
lubridate::date(ts), | ||
"_", | ||
lubridate::date(te), | ||
".rds" | ||
)) | ||
``` | ||
|
||
## Analysis | ||
|
||
### Timeseries at each step of brassens pipeline | ||
|
||
```{r} | ||
timeseries(cws_raw, ts = ts, te = te, var = temp) | ||
timeseries(cws_qc, ts = ts, te = te, var = temp) | ||
timeseries(cws_final, ts = ts, te = te, var = temp) | ||
``` | ||
|
||
### Hourly boxplots at each step of brassens pipeline | ||
|
||
```{r} | ||
hourly_boxplot(cws_raw, ts = ts, te = te, temp) | ||
hourly_boxplot(cws_qc, ts = ts, te = te, temp) | ||
hourly_boxplot(cws_final, ts = ts, te = te, temp) | ||
``` | ||
|
||
### Tile plots of temperature through time ar each step of brassens pipeline | ||
|
||
```{r} | ||
tile_ts(cws_raw, ts = ts, te = te, var = temp) | ||
tile_ts(cws_qc, ts = ts, te = te, var = temp) | ||
tile_ts(cws_final, ts = ts, te = te, var = temp) | ||
``` | ||
|
||
### Maps of stations at each step of brassens pipeline | ||
|
||
```{r} | ||
map_stations(cws_raw, timestamp, var = temp, imp, title = "Raw data") | ||
map_stations(cws_qc, | ||
timestamp, | ||
var = temp, | ||
imp, | ||
title = "Cleaned with CrowdQC+") | ||
map_stations(cws_final, | ||
timestamp, | ||
var = temp, | ||
imp, | ||
title = "Cleaned with CrowdQC+ and calibrated with GHCNh") | ||
``` |