R & Python 101: Complex Visuals
When it comes to key findings from data analysts, insights are only as valuable as the data team’s ability to communicate them to the rest of the company. One of the most impactful ways data teams can communicate is by turning ideas into visuals to share with internal stakeholders. The biggest obstacle with this approach is that the information is then limited by what a particular chart can and cannot display. Basic charts can illustrate basic learnings, but it’s impossible to show more complex concepts without a set of complex charting tools.
These advanced charts often explore many phenomena at once and need to be created one layer at a time. Analysts usually build these charts in an iterative process, approaching one factor, and one visual layer, at a time. Depending on the depth of the data, this process can take several hours or even days to analyze the information and create the corresponding graphic.
Using R and Python for more complex visuals
Many analysts use basic charting to efficiently show basic trends: how KPI change over time, what the current value is or the magnitude of a metric across a category. In many cases, those charts are sufficient, but the level of analysis that simple visuals provides may not tell the sufficient amount of information for an effective business decision to be made.
The charting libraries available with R and Python allow data teams to have control over visuals far beyond what has historically been the data analyst toolkit. These charts make deep analysis easier by opening the door for further visualization mappings to illustrate many variables at once.
Some visuals are designed to tell multiple stories, especially the more complex ones. Consider the chart below, which displays the mileage performance of vehicles with different engine types. A first look would illustrate that vehicles with fewer cylinders in the engine would appear to get better overall mileage while driving in the city. But there’s more to this chart: the 8-cylinder engine has a unique shape that needs explanation, the 4-cylinder engine has a long tail while the other two have definite limits and there’s a peculiar bimodal distribution in all three.
This chart can be examined for more findings, but it’s clear that the complete story this data is telling goes deeper than anything that could be derived from simple tables or bar charts.
Creating more complex visuals in Periscope Data
Complex visuals are made easy in R and Python. For example in R, the ggplot2 package allows very detailed control over the aesthetics of a chart. Want to map variable_a to the transparency, then alpha=variable_a. Want to map variable_b to the color, then color=variable_b.
Python also has a lot of customization with visuals through matplotlib. Data teams may prefer to use either language, depending on their background, to visualize data in any way that helps them communicate with their stakeholders. Once the visuals have been created in R or Python, they can be saved directly onto a Periscope Data dashboard and will appear beside all the other charts.
In addition to the granular visual mapping abilities, R and Python also give chart creators more controls to better customize the final visualization that appears in their Periscope Data dashboard.
To learn more about how your data team can use R and Python to create and analyze more complex visuals, download our guide.