COMPASS-DOE / TEMPEST

Terrestrial Ecosystem Manipulation to Probe Effects of Storm Treatments
MIT License
7 stars 2 forks source link

Data plotting issues #97

Closed bpbond closed 1 year ago

bpbond commented 1 year ago

Sapflow issues:

  1. Would like to show trees (with correct diameters) as well. Where's the mapping from sapflow Tree_Code to the tree tag (used in the tree inventory data)?
  2. Would like to show deep and shallow sensors together...e.g., C8 and CD8
bpbond commented 1 year ago

Question for SP today:

The Aquatroll data doesn't come with any grid location information:

Browse[2]> glimpse(aquatroll$aquatroll_200)
Rows: 9,263
Columns: 20
$ Timestamp                             <dttm> 2023-05-08 00:00:00, 2023-05-08 00:15:00, 2023-05-08 00:30:…
$ Logger_ID                             <chr> "PNNL_21", "PNNL_21", "PNNL_21", "PNNL_21", "PNNL_21", "PNNL…
$ Temp                                  <dbl> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, …
$ Pressure_psi                          <dbl> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, …
$ Salinity                              <dbl> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, …
$ Instrument                            <chr> "TROLL200", "TROLL200", "TROLL200", "TROLL200", "TROLL200", …
$ DO_mgl                                <dbl> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, …
$ Install                               <dbl> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, …
$ Well_Name                             <chr> "GW3", "GW3", "GW3", "GW3", "GW3", "GW3", "GW3", "GW3", "GW3…
$ Probe_Name                            <chr> "TEMPEST_F_200_GW3", "TEMPEST_F_200_GW3", "TEMPEST_F_200_GW3…
$ SN                                    <dbl> 683416, 683416, 683416, 683416, 683416, 683416, 683416, 6834…
$ LoggerBox                             <chr> "21", "21", "21", "21", "21", "21", "21", "21", "21", "21", …
$ Plot                                  <chr> "Freshwater", "Freshwater", "Freshwater", "Freshwater", "Fre…
$ Location                              <chr> "NE corner", "NE corner", "NE corner", "NE corner", "NE corn…
$ Bolt_to_ground                        <dbl> 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, …
$ Bolt_to_pressure_sensor               <dbl> 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, …
$ Dist_pressure_sensor_belowground_calc <dbl> 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, …
$ North                                 <dbl> 134093.4, 134093.4, 134093.4, 134093.4, 134093.4, 134093.4, …
$ East                                  <dbl> 438924.2, 438924.2, 438924.2, 438924.2, 438924.2, 438924.2, …
$ Elevation                             <dbl> 6.28, 6.28, 6.28, 6.28, 6.28, 6.28, 6.28, 6.28, 6.28, 6.28, …

There's a Logger_ID...do we have a way of getting grid square information from that?

Location values include: "NE corner", "Between Plots", "Outside", "SW corner", "Center" 😞

Also I see a protocol document that says

One groundwater well will be installed in a centralized grid square within each TEMPEST plot (Control = E4, Freshwater = F6, Seawater = F6).

bpbond commented 1 year ago

Same with battery data -

Browse[2]> battery
# A tibble: 20,875 × 4
   Plot    Logger Timestamp           BattV_Avg
   <chr>    <dbl> <dttm>                  <dbl>
 1 Control     11 2023-05-08 00:15:00      13.7
 2 Control     11 2023-05-08 00:30:00      13.7
 3 Control     11 2023-05-08 00:45:00      13.7
bpbond commented 1 year ago

How to do data plotting?

  1. Best geom? Playing around, it seems like geom_tile might be good if our goal is an overall look at the plot, not at specific sensors
  2. I looked at geom_point + contour but then we need to do an interpolation step to all grid points, which would be a PITA
  3. How to handle TEROS? Multiple facets, multiple points, some kind of dropdown menu to select variable? Ugh
Screenshot 2023-06-01 at 6 32 57 AM
bpbond commented 1 year ago
bpbond commented 1 year ago

Error in tidyr::pivot_longer: Names must be unique

This error occurs on my laptop (tidyr 1.3.0 and ggplot2 3.4.1 but not my home machine (tidyr 1.2.0 and ggplot2 3.4.0).

...updated the home machine to 1.3.0 and still no error. Hmm.