Using ggplot2 in R

Challenge

In this project, we wanted to explore the ggplot2 package in R. So, we had to answer a series of questions related to a dataset with some variables from a sample of wines, using the library.

Deliverable

For each question posed, we responded with graphs, attempting to observe the relationships between variables. Below are some plots. In my GitHub there are a few more examples and the dataset.

In this graph, we can see the relationship between two variables related to wines, acidity, and pH. The higher the pH, the lower the acidity, indicating a negative correlation. The blue line represents a linear regression model with these two variables.

Here, we have three variables in the same graph. The X-axis represents wine density, the Y-axis represents acidity, and the colors of the points represent quality. The higher is the density, the higher is the acidity of the wine, indicating a positive correlation between these two variables. Note that there is no concentration of a color in a specific part of the graph, so we cannot conclude that wine quality is related to acidity or density.

In this example, we can see a boxplot with the chloride amount for each quality rating of the wines. The higher the wine quality, the narrower the range of chloride quantity. Additionally, the lower and upper limits have progressively lower values as the wine quality increases.

Ana Andrade