Closed bpbond closed 5 years ago
A box plot showing the SLA values for each species with individual data points overlayed and labeled by tag #. The #'s are offset horizontally, but the points are too close together to be able to separate them vertically
@hmoore28 Nice job! 👏 Cool. Re the overlapping text, remember geom_jitter()
and @stephpenn1 has experience with ggrepel()
which I believe 'repels' labels (but not points) from each other for readability. Can you color by canopy position please?
Interesting that the SLA values for most species cluster pretty tightly, with some significant exceptions. @lilliehaddock we're going to want to look closely at outliers, e.g. samples from tree 1560.
The box plot is now colored by canopy position. I tried both geom_jitter()
and geom_text_repel()
. When using both the box plot and overlaying each individual data point, the data points that are outliers and represented individually show up twice - once as an outlier and once as an individual data point, i.e. 1739 in NYSY.
geom_jitter()
looks to move the points around but not the labels.
With ggrepel()
, the labels are actually readable, but there are still so many that the plot is super messy.
Thanks @hmoore28 ! Nice. Interesting to see those differences. Again, @lilliehaddock we're going to want to check some of those outliers (e.g. 1739, 1621, 1560): wrong species? Mistake in data entry? Or just a goofy leaf, i.e. an oddball but a real one?
I used geom_text_repel()
here, but it still looks cluttered.
I'll look into the outliers and see what is going on there.
Very nice! Maybe faceting by tree species would be clearer? Also, why do your plots have an NA
tree species but Hailey's doesn't? 🤔
The "by 1802" LITU doesn't have a species in the inventory so it was showing up as NA! Haley helped me fix that issue.
Below is the SLA plot faceted by plot.
This is a more simplified version with no tag labeling. Its interesting to see how SLA varies by plot!!
Here is the SLA faceted by plot. I'm not sure how to remove the CAGL8 plot though!!
Interesting! Thanks.
Tasks here (please check off when completed):
Data
SLA Data.csv
, open a PRReading in data and computing SLA
We'd prefer that you each do the following, in your own branches. But if you want to work on a common branch and split the tasks, that's fine too.
SLA.R
script to compute specific leaf area (SLA), which is area divided by mass. Use adplyr
pipeline to do this?geom_text
)Joining
[x] Next, read in (
read_csv
) thess-inventory.csv
tree inventory file. Summarize it. Write adplyr
pipeline that prints a nice table of the mean and standard deviation of DBH, by plot and tree species for live maple trees only. It should look something like this:[x] Select just the
Plot
,Species
, andTag
columns. Call this new datasetinventory_small
[x] The next pipeline should join the
SLA
andinventory_small
datasets, probably usingleft_join()
.[x] Plot the SLA data by species, faceting by plot.
Please open a PR with this code. In the PR comments, paste in the beginning of the output table and plot(s).