Last updated: 2020-09-28

Checks: 7 0

Knit directory: BloomSail/

This reproducible R Markdown analysis was created with workflowr (version 1.6.2). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.


Great! Since the R Markdown file has been committed to the Git repository, you know the exact version of the code that produced these results.

Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.

The command set.seed(20191021) was run prior to running the code in the R Markdown file. Setting a seed ensures that any results that rely on randomness, e.g. subsampling or permutations, are reproducible.

Great job! Recording the operating system, R version, and package versions is critical for reproducibility.

Nice! There were no cached chunks for this analysis, so you can be confident that you successfully produced the results during this run.

Great job! Using relative paths to the files within your workflowr project makes it easier to run your code on other machines.

Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility.

The results in this page were generated with repository version d28129f. See the Past versions tab to see a history of the changes made to the R Markdown and HTML files.

Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use wflow_publish or wflow_git_commit). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:


Ignored files:
    Ignored:    .Rhistory
    Ignored:    .Rproj.user/
    Ignored:    data/Finnmaid_2018/
    Ignored:    data/GETM/
    Ignored:    data/Maps/
    Ignored:    data/Ostergarnsholm/
    Ignored:    data/TinaV/
    Ignored:    data/_merged_data_files/
    Ignored:    data/_summarized_data_files/
    Ignored:    data/backup/

Untracked files:
    Untracked:  output/Plots/Figures_publication/.tmp.drivedownload/

Unstaged changes:
    Deleted:    code/BloomSail_surface.Rmd
    Deleted:    code/Finnmaid+GETM.Rmd
    Deleted:    code/Vertical entrainment flux I.pdf
    Deleted:    code/Vertical entrainment flux II.pdf
    Deleted:    code/Vertical entrainment flux III.pdf
    Modified:   code/Workflowr_project_managment.R
    Deleted:    code/response_time_highres_taufactor.Rmd
    Modified:   output/Plots/Figures_publication/Appendix/pCO2_RT_corrected_profile_example.pdf
    Modified:   output/Plots/Figures_publication/Appendix/pCO2_RT_corrected_profile_example.png
    Modified:   output/Plots/Figures_publication/Appendix/pCO2_RT_corrected_profile_mean_abs_offset.pdf
    Modified:   output/Plots/Figures_publication/Appendix/pCO2_RT_corrected_profile_mean_abs_offset.png
    Modified:   output/Plots/Figures_publication/Appendix/tau_fit_example.pdf
    Modified:   output/Plots/Figures_publication/Appendix/tau_fit_example.png
    Modified:   output/Plots/Figures_publication/Appendix/tb_profiles.pdf
    Modified:   output/Plots/Figures_publication/Article/Hov_abs_profiles_cum.pdf
    Modified:   output/Plots/Figures_publication/Article/Hov_abs_profiles_cum.png
    Modified:   output/Plots/Figures_publication/Article/atm_water_timeseries.pdf
    Modified:   output/Plots/Figures_publication/Article/atm_water_timeseries.png
    Modified:   output/Plots/Figures_publication/Article/data_coverage.pdf
    Modified:   output/Plots/Figures_publication/Article/profiles_all.pdf
    Modified:   output/Plots/Figures_publication/Article/profiles_all.png
    Modified:   output/Plots/Figures_publication/Article/station_map.pdf
    Modified:   output/Plots/merging_interpolation/Zero_time_synchronization.pdf
    Modified:   output/Plots/response_time/all_plots.pdf
    Modified:   output/Plots/response_time/profiles_pCO2_delta_grid.pdf
    Modified:   output/Plots/response_time/tau_determination_pCO2_corr_flushperiods_nls.pdf

Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.


These are the previous versions of the repository in which changes were made to the R Markdown (analysis/Phytoplankton.Rmd) and HTML (docs/Phytoplankton.html) files. If you’ve configured a remote Git repository (see ?wflow_git_remote), click on the hyperlinks in the table below to view the files as they were in that past version.

File Version Author Date Message
html 1278900 jens-daniel-mueller 2020-09-25 Build site.
html 904f0f7 jens-daniel-mueller 2020-09-23 Build site.
html c919fb7 jens-daniel-mueller 2020-06-29 Build site.
Rmd 1461cb6 jens-daniel-mueller 2020-06-29 Fig update for talk
html 603af23 jens-daniel-mueller 2020-05-25 Build site.
html 3414c23 jens-daniel-mueller 2020-05-25 Build site.
html 9ccd9a3 jens-daniel-mueller 2020-05-25 Build site.
Rmd 9bedac5 jens-daniel-mueller 2020-05-25 revised pp time series plot
html ae61e7e jens-daniel-mueller 2020-05-25 Build site.
Rmd 3080fb3 jens-daniel-mueller 2020-05-25 Added Phytoplanktion read-in and new Rmd

library(tidyverse)

1 Phytoplankton cell counts

1.1 Data preparation

max_dep <- 25
surface_dep <- 6

stations_in <- c("P07", "P10")

class_in <- "t" # using total biomass per Species class only
tp <- read_csv(here::here("Data/_summarized_data_files",
                            "tp.csv"),
           col_types = cols(ID = col_character()))

cruise_dates <- read_csv(here::here("Data/_summarized_data_files",
                            "cruise_date.csv"),
           col_types = cols(ID = col_character()))


#### calculate mean total phytoplanton biomass in different water depth intervals

tp <- tp %>% 
  filter(station %in% stations_in,
         class == class_in,
         Species != "Nodulariadead") %>% 
  mutate(ID = if_else(ID == "180722", "180723", ID))

tp <- tp %>% 
  mutate(dep_grid = cut(dep,
                        breaks = c(-1,surface_dep,max_dep),
                        labels = c("0-6","6-25"))) %>% 
  drop_na()

tp_ID_grid <- tp %>% 
  group_by(ID, dep_grid, Species) %>% 
  summarise(value = mean(value, na.rm = TRUE)) %>% 
  ungroup()


tp_ID_grid <- full_join(cruise_dates, tp_ID_grid)
tp_ID_grid %>% 
  filter(Species != "total") %>% 
  ggplot(aes(date_time_ID, value, col=dep_grid))+
  geom_point()+
  geom_line()+
  facet_grid(Species~.)+
  scale_color_brewer(palette = "Set1", name= "Depth (m)")+
  scale_x_datetime(breaks = "week", date_labels = "%d %b")+
  labs(y=expression(Biomass~(mg/m^3)))+
  theme(axis.title.x = element_blank())

ggsave(here::here("output/Plots/Figures_publication/appendix", "Phytoplankton_mean_total_biomass.pdf"),
       width = 180, height = 120, dpi = 300, units = "mm")

ggsave(here::here("output/Plots/Figures_publication/appendix", "Phytoplankton_mean_total_biomass.png"),
       width = 180, height = 120, dpi = 300, units = "mm")

sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)

Matrix products: default

locale:
[1] LC_COLLATE=English_Germany.1252  LC_CTYPE=English_Germany.1252   
[3] LC_MONETARY=English_Germany.1252 LC_NUMERIC=C                    
[5] LC_TIME=English_Germany.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] forcats_0.5.0   stringr_1.4.0   dplyr_1.0.0     purrr_0.3.4    
 [5] readr_1.3.1     tidyr_1.1.0     tibble_3.0.3    ggplot2_3.3.2  
 [9] tidyverse_1.3.0 workflowr_1.6.2

loaded via a namespace (and not attached):
 [1] tidyselect_1.1.0   xfun_0.16          haven_2.3.1        colorspace_1.4-1  
 [5] vctrs_0.3.2        generics_0.0.2     htmltools_0.5.0    yaml_2.2.1        
 [9] blob_1.2.1         rlang_0.4.7        later_1.1.0.1      pillar_1.4.6      
[13] withr_2.2.0        glue_1.4.1         DBI_1.1.0          RColorBrewer_1.1-2
[17] dbplyr_1.4.4       modelr_0.1.8       readxl_1.3.1       lifecycle_0.2.0   
[21] munsell_0.5.0      gtable_0.3.0       cellranger_1.1.0   rvest_0.3.6       
[25] evaluate_0.14      labeling_0.3       knitr_1.29         httpuv_1.5.4      
[29] fansi_0.4.1        broom_0.7.0        Rcpp_1.0.5         promises_1.1.1    
[33] backports_1.1.8    scales_1.1.1       jsonlite_1.7.0     farver_2.0.3      
[37] fs_1.4.2           hms_0.5.3          digest_0.6.25      stringi_1.4.6     
[41] rprojroot_1.3-2    grid_4.0.2         here_0.1           cli_2.0.2         
[45] tools_4.0.2        magrittr_1.5       crayon_1.3.4       whisker_0.4       
[49] pkgconfig_2.0.3    ellipsis_0.3.1     xml2_1.3.2         reprex_0.3.0      
[53] lubridate_1.7.9    assertthat_0.2.1   rmarkdown_2.3      httr_1.4.2        
[57] rstudioapi_0.11    R6_2.4.1           git2r_0.27.1       compiler_4.0.2