Data: Area in Acres collected by Month (June-September) from 2017-2023.
Goal: Create a Ridgeline plot that shows seasonal variation of area. With x axis as Month, Y axis as Year, and height of ridgeline relative to Acreage within that month.
Is this even possible using ggridges? Currently I can only get it to populate Ridgelines with the y axis as year and x axis as acres. I am guessing as the Acres is a continuous set while months is discrete.
Code:
ggplot(poss_kelp, aes(x = Acres, y = Year, group = Year)) +
geom_density_ridges(fill = "#00AFBB", alpha = 0.7) +
labs(x = "Total Area (Acres)", y = "Year", title = "Ridgeline Plot of Kelp Forest Area by Year")
Though I’d rather have something more along the lines of
ggplot(poss_kelp, aes(x = Month, y = Year, group = Year) +
.......
That clearly wont get what I am looking for as I never even call the area data.
I have made a sketch, though the posit community wont let me upload it as a new user, so, hoping maybe I can add that to the thread in the coming days.
Relatively new to R and first time working with Ridgelines so any advice welcomed. I have a lot of thoughts on where to go, but don't want to bias results of this post.
Hi @CarterWebb
Welcome to the Posit Community Forum.
It's not clear to me how you can plot density ridgelines when you have only 28 observations (7 years x 4 months). There are other graphical output options that you could consider. I have included some simple ones below (apologies if these are obvious and you know about them already):
Hi @DavoWW,
No worries on reminding me of those graphical options, it is appreciated, though, I am quite familiar with them.
For further context, I assist a kelp forest monitoring program that typically uses the data visualization options you have specified. Though they can hinder understanding of how the forests are continuously spatially dynamic in size, something that the density ridgelines could get across far better. For this reason I am exploring other options. I find ridgelines to be aesthetically simpler to process and am trying to create examples to get feedback on from volunteers.
The visual separation that ridgelines can provide from year to year and (potentially) by month will, I believe, assist in volunteers' ability to understand and interpret the spatial patterns and correlate environmental changes they observe while surveying sites on the water.
What I am interpreting from your response is that since we have a small discrete set of multivariate (acreage by month and year) data, ridgelines simply wont work as they are best suited for continuous univariate data?
Can the, histogram variant to ridgelines assist in solving this issue?