Redcedar Data Analyses Instructions

Purpose

The purpose of this page is to provide a dataset to use in subsequent analyses. Major changes to original data will be documented here and a final dataset will be exported here.

iNaturalist Data

Observation data were downloaded from the Wester Redcedar Dieback Map project on January 13, 2024 after 2600+ observations were shared.

The query used to download data is as follows “quality_grade=any&identifications=any&projects%5B%5D=western-redcedar-dieback-map”. All ‘Geo’ columns and ‘Observation Fields’ columns were included.

Read data from csv into R

Clean Data

Some of the iNat project questions changed since it was created so some we need to adjust the answers to be more consistent throughout the project.

## Warning in `[<-.factor`(`*tmp*`, data$field.optional...tree.size == "Very small
## (can wrap a single hand around stem)", : invalid factor level, NA generated

Reclassify co-factors

Convert Percent to Proportion

Reclassify response variables

Reclassified response variable classes

Binary Response (2 categories)

## # A tibble: 2 × 2
## # Groups:   binary.tree.canopy.symptoms [2]
##   binary.tree.canopy.symptoms     n
##   <fct>                       <int>
## 1 Healthy                      1480
## 2 Unhealthy                    1086

Filtered response (5 categories)

## # A tibble: 5 × 2
## # Groups:   reclassified.tree.canopy.symptoms [5]
##   reclassified.tree.canopy.symptoms     n
##   <fct>                             <int>
## 1 Healthy                            1480
## 2 Thinning Canopy                     341
## 3 Dead Top                            298
## 4 Tree is Dead                        129
## 5 Other                               318

Ordinal Response (3 categories)

## # A tibble: 3 × 2
## # Groups:   ordinal.tree.canopy.symptoms [3]
##   ordinal.tree.canopy.symptoms     n
##   <fct>                        <int>
## 1 Healthy                       1480
## 2 Unhealthy                      957
## 3 Dead                           129

Create Binary response for dead top

## [1] "No"  "Yes"
##   No  Yes 
## 2268  298

Create Binary response for thinning

## [1] "No"  "Yes"
##   No  Yes 
## 2225  341

Create Binary response for dead tree

## [1] "No"  "Yes"
##   No  Yes 
## 2437  129

Export Data

data-modified.csv

Please use this data in analyses. Please make any changes or corrections to the data in this R markdown so everyone is using the same dataset in the analyses.