
Both are great but are not exactly what I imagined and needed. There are other authors who have done similar functions such as Alastair Rushworth with his inspectdf::inspect_cor() and Matt Dancho with correlationfunnel:: plot_correlation_funnel(). Basically, it is the result of a sorted long-format correlation matrix from a dataset which may contain dates and other categorical features, that has been transformed with one-hot encoding and some additional features creations. I am sure there must be another academic name for this specific kind of analysis, but as I haven’t found it out there yet, that is how I’ve been addressing it. To install the former, run the following in your R session. And, if they are negative it means that as one gets larger, the other gets smaller (often called an “inverse” correlation).įor the following examples, we will be using the lares library and dplyr’s Star Wars dataset. When the value is positive, it means that as one variable gets larger the other gets larger. It represents how closely the two variables are related: if this value is close to 0, it means that there is no relationship between the variables. These correlation coefficients might take values in the range of -1 to 1 (or -100% to 100%).


So, is there an alternative or mathematical trick for us to use our data as it is and discover high correlation variables/values?Ĭorrelation works for quantifiable data in which numbers are meaningful, thus it cannot be calculated with categorical data such as gender, cities, or brands. Usually, we have numerous categorical variables in our data, that contains valuable information which might be hard to catch without a correlation analysis. A correlation analysis is a statistical technique that can show whether and how strongly pairs of variables are related, but all features must be numerical.

A well-done correlation analysis will lead us to a greater understanding of our data and empower us with valuable insights.
