Last updated: 2021-07-08

Checks: 7 0

Knit directory: fire_alcontar/

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(20210630) 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 0b2f433. 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/

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/drone_campo.Rmd) and HTML (docs/drone_campo.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
Rmd 0b2f433 Antonio J Perez-Luque 2021-07-08 update data
html 349a882 Antonio J Perez-Luque 2021-07-08 Build site.
Rmd 5ca67cf Antonio J Perez-Luque 2021-07-08 update zoom
html 74a8d6e Antonio J Perez-Luque 2021-07-08 Build site.
Rmd 688361e Antonio J Perez-Luque 2021-07-08 add comparative

Introduction

library(here)
library(tidyverse)
library(readxl)
library(plotrix)
library(DT)
library(plotly)
library(ggstatsplot)
library(patchwork)
library(cowplot)
library(ggiraph)
cob.raw <- read_excel(path=here::here("data/test_drone.xlsx"),
                 sheet = "COBERTURA")
diversidad <- read_excel(path=here::here("data/test_drone.xlsx"),
                 sheet = "SHANNON") %>% mutate(Shannon = abs(I_SHANNON))


df <- cob.raw %>% inner_join(diversidad)

Correlation general

Method 1

g1 <- ggscatterstats(df,
               title = "Método 1",
               x="COB_TOTAL_M2", y = "AREA_VEG_m2", 
               marginal = FALSE, 
               ggplot.component = 
                 list(geom_abline(slope = 1))) 

Method 2

g2 <- ggscatterstats(df,
               title = "Método 2",
               x="COB_TOTAL_M2", y = "COBERTURA", 
               marginal = FALSE, 
               ggplot.component = 
                 list(geom_abline(slope = 1))) 
g1 + g2

Version Author Date
74a8d6e Antonio J Perez-Luque 2021-07-08

Explore by RANGO_INFOCA

pr1 <- df %>% 
  ggplot(aes(x=COB_TOTAL_M2, y = AREA_VEG_m2, color=as.factor(RANGO_INFOCA))) +
  geom_point_interactive(aes(tooltip = QUADRAT, id=QUADRAT)) + 
  geom_abline(slope=1) +
  facet_wrap(~RANGO_INFOCA, labeller = r2_labeller1) + 
  theme_bw() + 
  xlab("Campo (COB_TOTAL_M2)") + 
  ylab("Drone (AREA_VEG_m2)") + 
  geom_smooth(method = "lm") +
  theme(
    legend.position = "none", 
    panel.grid = element_blank(), 
    strip.background = element_rect(fill="white")
  ) + ggtitle("Método 1") 
pr2 <- df %>% 
  ggplot(aes(x=COB_TOTAL_M2, y = COBERTURA, color=as.factor(RANGO_INFOCA))) + 
  geom_point_interactive(aes(tooltip = QUADRAT, id=QUADRAT)) + 
  geom_abline(slope=1) +
  facet_wrap(~RANGO_INFOCA, labeller = r2_labeller2) + 
  theme_bw() + 
  xlab("Campo (COB_TOTAL_M2)") + 
  ylab("Drone (AREA_VEG_m2)") + 
  geom_smooth(method = "lm") +
  theme(
    legend.position = "none", 
    panel.grid = element_blank(), 
    strip.background = element_rect(fill="white")
  ) + ggtitle("Método 2")
# pr1 + pr2
girafe(ggobj = plot_grid(pr1, pr2),
                options = list(
    opts_sizing(width = .7),
    opts_zoom(max = 5))
  )

Relation with Shannon Diversity

p1 <- df %>% 
  ggplot(aes(x=COB_TOTAL_M2, y = AREA_VEG_m2)) + 
  geom_point_interactive(aes(
    size=Shannon, tooltip = QUADRAT, id=QUADRAT),
    alpha = .4) + 
  geom_abline(slope=1) +
  theme_bw() + 
  theme(legend.position = "bottom") + ggtitle("Método 1")
p2 <- df %>% 
  ggplot(aes(x=COB_TOTAL_M2, y = COBERTURA)) + 
  geom_point_interactive(aes(
    size=Shannon, tooltip = QUADRAT, id=QUADRAT),
    alpha = .4) + 
  geom_abline(slope=1) +
  theme_bw() + 
  theme(legend.position = "bottom") + ggtitle("Método 2")
# p1 + p2
girafe(ggobj = plot_grid(p1, p2),
         options = list(
    opts_sizing(width = .7),
    opts_zoom(max = 5))
  )

Notas

  • Intentar correlacionar los residuos del modelo (de la correlación con otras variables: ith, slope). Para ello necesito el DMT obtenido con dron o usar un dtm genérico

  • Aplicar análisis de clasificación (\(\kappa\) coefficient). Ver un ejemplo en Cunliffe et al. (2016).

  • Revisar trabajos de Cunliffe et al. (2016), Abdullah et al. (2021) y similares.

  • Relación de la estimación con la diversidad-abundancia (vía NMDS)

References

Abdullah, M.M., Al-Ali, Z.M., Abdullah, M.T. & Al-Anzi, B. (2021). The use of very-high-resolution aerial imagery to estimate the structure and distribution of the rhanterium epapposum community for long-term monitoring in desert ecosystems. Plants, 10, 977.
Cunliffe, A.M., Brazier, R.E. & Anderson, K. (2016). Ultra-fine grain landscape-scale quantification of dryland vegetation structure with drone-acquired structure-from-motion photogrammetry. Remote Sensing of Environment, 183, 129–143.

sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Catalina 10.15.3

Matrix products: default
BLAS:   /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRblas.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

other attached packages:
 [1] ggiraph_0.7.10    cowplot_1.1.1     patchwork_1.1.1   ggstatsplot_0.7.2
 [5] plotly_4.9.3      DT_0.17           plotrix_3.8-1     readxl_1.3.1     
 [9] forcats_0.5.1     stringr_1.4.0     dplyr_1.0.6       purrr_0.3.4      
[13] readr_1.4.0       tidyr_1.1.3       tibble_3.1.2      ggplot2_3.3.3    
[17] tidyverse_1.3.1   here_1.0.1        workflowr_1.6.2  

loaded via a namespace (and not attached):
  [1] uuid_0.1-4                pairwiseComparisons_3.1.3
  [3] backports_1.2.1           systemfonts_1.0.0        
  [5] plyr_1.8.6                lazyeval_0.2.2           
  [7] splines_4.0.2             gmp_0.6-2                
  [9] kSamples_1.2-9            ipmisc_5.0.2             
 [11] TH.data_1.0-10            digest_0.6.27            
 [13] SuppDists_1.1-9.5         htmltools_0.5.1.1        
 [15] fansi_0.4.2               magrittr_2.0.1           
 [17] memoise_2.0.0             paletteer_1.3.0          
 [19] modelr_0.1.8              sandwich_3.0-0           
 [21] colorspace_2.0-0          rvest_1.0.0              
 [23] ggrepel_0.9.1             haven_2.3.1              
 [25] xfun_0.23                 crayon_1.4.1             
 [27] jsonlite_1.7.2            zeallot_0.1.0            
 [29] survival_3.2-7            zoo_1.8-8                
 [31] glue_1.4.2                gtable_0.3.0             
 [33] emmeans_1.5.4             MatrixModels_0.4-1       
 [35] statsExpressions_1.1.0    Rmpfr_0.8-2              
 [37] scales_1.1.1              mvtnorm_1.1-1            
 [39] DBI_1.1.1                 PMCMRplus_1.9.0          
 [41] Rcpp_1.0.6                viridisLite_0.3.0        
 [43] xtable_1.8-4              performance_0.7.2        
 [45] htmlwidgets_1.5.3         httr_1.4.2               
 [47] ellipsis_0.3.2            farver_2.0.3             
 [49] pkgconfig_2.0.3           reshape_0.8.8            
 [51] multcompView_0.1-8        sass_0.3.1               
 [53] dbplyr_2.1.1              utf8_1.1.4               
 [55] labeling_0.4.2            tidyselect_1.1.0         
 [57] rlang_0.4.10              later_1.1.0.1            
 [59] ggcorrplot_0.1.3          effectsize_0.4.5         
 [61] munsell_0.5.0             cellranger_1.1.0         
 [63] tools_4.0.2               cachem_1.0.4             
 [65] cli_2.5.0                 generics_0.1.0           
 [67] broom_0.7.6               evaluate_0.14            
 [69] fastmap_1.1.0             BWStest_0.2.2            
 [71] yaml_2.2.1                rematch2_2.1.2           
 [73] knitr_1.31                fs_1.5.0                 
 [75] nlme_3.1-152              WRS2_1.1-1               
 [77] pbapply_1.4-3             whisker_0.4              
 [79] xml2_1.3.2                correlation_0.6.1        
 [81] compiler_4.0.2            rstudioapi_0.13          
 [83] ggsignif_0.6.0            reprex_2.0.0             
 [85] bslib_0.2.4               stringi_1.5.3            
 [87] highr_0.8                 parameters_0.14.0        
 [89] lattice_0.20-41           Matrix_1.3-2             
 [91] vctrs_0.3.8               pillar_1.6.1             
 [93] lifecycle_1.0.0           mc2d_0.1-18              
 [95] jquerylib_0.1.3           estimability_1.3         
 [97] data.table_1.13.6         insight_0.14.1           
 [99] httpuv_1.5.5              R6_2.5.0                 
[101] promises_1.2.0.1          BayesFactor_0.9.12-4.2   
[103] codetools_0.2-18          MASS_7.3-53              
[105] gtools_3.8.2              assertthat_0.2.1         
[107] rprojroot_2.0.2           withr_2.4.1              
[109] multcomp_1.4-16           mgcv_1.8-33              
[111] bayestestR_0.9.0          parallel_4.0.2           
[113] hms_1.0.0                 grid_4.0.2               
[115] coda_0.19-4               rmarkdown_2.8            
[117] git2r_0.28.0              lubridate_1.7.10