Create a Map of Correlations Between Well Water Level and Model Recharge
Source:R/ModelCorrMap.R
ModelCorrMap.Rd
This function generates a map visualizing the correlation between well water level changes and model-reported recharge. It colors divides based on whether the correlation is positive or negative. It also combines this map with a scatter plot showing the relationship between well water levels and model recharge.
Arguments
- x
A data frame resulting from the `Correlation()` function, containing:
- Divide
The divide ID.
- correlation
The correlation coefficient between `mean_change_mm` and `deltaSTR`.
- y
A `ggplot` object produced by the `ModelScatter` function, representing the scatter plot of well water level change vs. model recharge.
- z
A spatial data frame (sf object) with divide information, including the `divide_id` column
Details
The function takes in the output from the `Correlation()` function and uses it to create a map that highlights divides with positive and negative correlations. It adds labels and includes various map features like scale and north arrow. The combined map and scatter plot provide a comprehensive view of the correlation analysis.