Neon harvard forest soils analysis (solution)

Exercise
Output solution
Linking to GEOS 3.10.2, GDAL 3.4.1, PROJ 8.2.1; sf_use_s2() is TRUE
Loading required package: abind

Attaching package: 'dplyr'
The following objects are masked from 'package:stats':

    filter, lag
The following objects are masked from 'package:base':

    intersect, setdiff, setequal, union
Reading layer `harv_soils' from data source 
  `/home/runner/work/dcsem-solutions/dcsem-solutions/data/neon-geospatial-data/harv/harv_soils.shp' 
  using driver `ESRI Shapefile'
Simple feature collection with 246 features and 5 fields
Geometry type: POLYGON
Dimension:     XY
Bounding box:  xmin: 730421.1 ymin: 4712096 xmax: 732532.4 ymax: 4714961
Projected CRS: WGS 84 / UTM zone 18N

1

2

3

  [1] 22.99682617 21.86001587 22.84927368 21.72421265          NA 25.71926880
  [7] 14.42514038 17.37231445 16.14318848 18.34756470 28.03332520 22.62091064
 [13] 29.44079590 20.48266602 23.00042725 23.67779541          NA 22.96310425
 [19] 25.08383179 21.92440796 25.00762939 27.11254883          NA 28.43484497
 [25] 22.50622559 22.11166382 22.81506348 24.34115601 22.92199707 20.95043945
 [31] 24.55453491 26.64300537  9.24276733 22.47113037 27.38101196 23.53463745
 [37] 18.98742676 19.72445679 22.23977661 25.50119019 21.85986328 27.18572998
 [43] 27.18444824          NA 25.62026978 21.80828857 21.23226929 24.92419434
 [49] 21.91983032 21.62698364 21.27548218 20.55923462 24.84759521 27.54678345
 [55] 23.49304199 22.37500000 22.19006348 21.24896240 23.65878296 21.23699951
 [61] 22.41238403 23.33654785 25.99050903 20.78567505 18.01757812 21.74682617
 [67] 22.79064941 21.69039917 21.13232422 21.51205444 21.50689697 16.27420044
 [73] 18.50244141 20.52450562 17.49423218 20.44497681 21.35034180 23.42193604
 [79] 21.88961792 20.44680786 19.99380493 18.09481812 19.46200562 20.47964478
 [85] 18.96121216 18.83239746 19.01208496 15.15979004 27.13888550 20.65533447
 [91] 21.22195435 20.86169434 25.98287964 23.44711304 21.01406860 19.04754639
 [97] 25.42294312 18.51547241 23.36746216 23.94201660 24.23007202 22.91497803
[103] 23.34155273 26.04537964 22.15588379 24.92193604 23.44769287 24.59655762
[109] 22.22421265 21.66250610 27.99789429 23.97222900 24.24713135 13.13516235
[115] 24.49844360 25.81390381 25.42269897 21.58169556 24.78771973 21.99295044
[121] 21.14257812 25.12527466 25.67956543 23.61407471 24.67300415 24.18783569
[127] 20.77862549 25.67538452 26.57922363 22.12509155 24.74151611 23.58184814
[133] 25.79272461 22.81613159  1.70199585 25.98675537 24.28372192 22.01342773
[139] 24.12420654 23.05694580 23.25421143 20.97067261 23.17373657 25.30014038
[145] 24.96301270 18.03448486 18.77041626 21.03237915 26.08963013 29.33422852
[151] 19.85153198 24.58743286 23.38894653 20.73156738 27.69683838 25.97430420
[157] 20.31170654 26.32522583 24.71795654 10.88302612 21.44021606 12.06213379
[163] 27.46405029 26.12057495 25.46618652 23.64132690  1.71194458 24.15173340
[169] 24.89807129  4.91909790  0.00479126 23.85864258 24.91903687 25.87432861
[175] 26.73992920 20.74322510 24.39007568 16.77392578 20.58496094 25.49160767
[181] 23.52938843 25.64340210 14.95117188 24.70315552 15.95147705 24.41192627
[187] 20.90802002 25.69467163 14.07995605 23.76800537 19.06704712 26.21997070
[193] 26.47195435 25.91790771 25.83911133 19.01885986 28.35205078 26.45825195
[199] 28.26171875 19.81338501 26.99111938 26.59683228 23.12304688 27.66772461
[205] 27.03781128 20.43734741  6.90191650 26.98605347 29.61547852 26.92276001
[211]  6.01611328 26.39141846 27.74734497 24.06723022 23.33062744 25.95223999
[217] 24.37252808 17.75241089 28.44070435 19.81460571 27.10183716  3.55050659
[223]  1.27673340          NA 25.21716309 21.71572876 23.14364624 26.33218384
[229] 25.80389404 20.38043213 27.58081055 23.45700073  6.66702271 28.20016479
[235] 25.96405029 26.48559570 25.19372559 23.54125977 25.22180176 21.46951294
[241] 19.53155518 19.04403687 25.19680786          NA 11.43389893 21.22674561

4

Simple feature collection with 246 features and 6 fields
Geometry type: POLYGON
Dimension:     XY
Bounding box:  xmin: 730421.1 ymin: 4712096 xmax: 732532.4 ymax: 4714961
Projected CRS: WGS 84 / UTM zone 18N
First 10 features:
   TYPE_ NOTES                                      SIMMONS_SO
1     Bf  <NA>                           Gloucester stony loam
2      G  <NA>                Gloucester stony fine sandy loam
3    Wvs  <NA>                    Whitman very stony silt loam
4     Sf  <NA>                                Acton stony loam
5      G  <NA>                Gloucester stony fine sandy loam
6     Gx  <NA> Gloucester stony fine sandy loam- shallow phase
7      G  <NA>                Gloucester stony fine sandy loam
8      G  <NA>                Gloucester stony fine sandy loam
9     Sf  <NA>                                Acton stony loam
10     G  <NA>                Gloucester stony fine sandy loam
                      MESIC_SOIL                     DRAINAGE_C
1                    Canton loam                   well drained
2        Montauk fine sandy loam                   well drained
3  Whitman loam- extremely stony            very poorly drained
4                  Scituate loam moderately well drained (SFSL)
5        Montauk fine sandy loam                   well drained
6         Hollis fine sandy loam   somewhat excessively drained
7        Montauk fine sandy loam                   well drained
8        Montauk fine sandy loam                   well drained
9                  Scituate loam moderately well drained (SFSL)
10       Montauk fine sandy loam                   well drained
                         geometry max_canopy_height
1  POLYGON ((732280.3 4714932,...          22.99683
2  POLYGON ((732251.1 4714949,...          21.86002
3  POLYGON ((732276.4 4714955,...          22.84927
4  POLYGON ((732224.3 4714943,...          21.72421
5  POLYGON ((732197 4714939, 7...                NA
6  POLYGON ((732121.7 4714871,...          25.71927
7  POLYGON ((732156.6 4714931,...          14.42514
8  POLYGON ((732086.3 4714905,...          17.37231
9  POLYGON ((732080.6 4714903,...          16.14319
10 POLYGON ((732051.2 4714881,...          18.34756

5

6