A radar chart is a graphical method of displaying multivariate data in the form of a two-dimensional chart of three or more quantitative variables represented on axes starting from the same point. The relative position and angle of the axes is typically uninformative, but various heuristics, such as algorithms that plot data as the maximal total area, can be applied to sort the variables (axes) into relative positions that reveal distinct correlations, trade-offs, and a multitude of other comparative measures.
The radar chart is also known as web chart, spider chart, spider graph, spider web chart, star chart, star plot, cobweb chart, irregular polygon, polar chart, or Kiviat diagram. It is equivalent to a parallel coordinates plot, with the axes arranged radially.
The radar chart is a chart and/or plot that consists of a sequence of equi-angular spokes, called radii, with each spoke representing one of the variables. The data length of a spoke is proportional to the magnitude of the variable for the data point relative to the maximum magnitude of the variable across all data points. A line is drawn connecting the data values for each spoke. This gives the plot a star-like appearance and the origin of one of the popular names for this plot. The star plot can be used to answer the following questions:
Radar charts are a useful way to display multivariate observations with an arbitrary number of variables. Each star represents a single observation. Typically, radar charts are generated in a multi-plot format with many stars on each page and each star representing one observation. The star plot was first used by Georg von Mayr in 1877. Radar charts differ from glyph plots in that all variables are used to construct the plotted star figure. There is no separation into foreground and background variables. Instead, the star-shaped figures are usually arranged in a rectangular array on the page. It is somewhat easier to see patterns in the data if the observations are arranged in some non-arbitrary order (if the variables are assigned to the rays of the star in some meaningful order).
The main application of radar charts is to measure multivariable data being shared among similar groups, people, or objects. This means radar charts have an incredibly wide variety of uses in fields including athletics, performance metrics, life sciences, education, and business among many others. These applications allow researchers to visualize data and help them compare, analyze, and effectively make decisions about datasets they are looking at based on the insights provided by the charted variables.
Radar charts commonly used in sports to chart players' strengths and weaknesses. This is done by calculating various statistics related to the player that can tracked along the central axis of the chart. Examples include a basket players shots made, rebounds, assists, etc., or the batting or pitching stats of a baseball player. This creates a centralized visualization of the strengths and weaknesses of a player, and if overlapped with the statistics of other players or league averages, can display where a player excels and where they could improve. These insights into player strengths and weakness could prove crucial to player development as it allows coaches and trainers to adjust a player's training regiment to help improve on their weaknesses. The results of the radar chart can also be useful in situational play. If a batter is shown to hit poorly against left-handed pitching, then his team knows to limit his plate appearances against left-handed pitchers, while the opposing team may try to force a situation where the batter is forced to hit against the pitcher. When used for comparison, they can also illustrate how good an athlete is, such as by a hall of fame candidate to other hall of fame candidates.
Another application of radar charts is the control of quality improvement to display the performance metrics various objects including computer programs, computers, phones, vehicles, and more. Computer programmer often use analytics to test the performance of their programs versus others. An example of this where radar charts may be useful is the performance analysis of various sorting algorithms. A programmer could gather up several different sorting algorithms such as selection, bubble, and quick, then analyze the performance of these algorithms by measuring their speed, memory usage, and power usage, then graph these on a radar chart to see how each sort performs under various sizes of data. Another performance application is measuring the performance of similar cars against each other. A consumer could look at variables such as the cars’ top speed, miles per gallon, horsepower, and torque. Then after using a radar chart to visualize the data, they could decide on what car is best for them based on the results.
One more major usage of radar charts is in life sciences. Radar charts can be used for wide away of related datasets such as strengths and weakness of drugs and other medications. Using the example of two anti-depressants, a researcher can rank variables such as efficacy, side effects, cost, etc. on a scale of one to ten. They could then graph the results using a radar chart to see the spread of variables and find how the differ, such as one anti-depressant being cheaper and quicker acting, but not having great relief over time. Meanwhile, the other anti-depressant provides stronger relief and holds up better over time but is more expensive. Another life science application is in patient analysis. Radar charts can be used to graph the variables of life affecting a person's wellness, and then be analyzed to help them. A more specific example is in the case of athletes, who’s various wellness habits such as sleep, diet, and stress are monitored to make sure they stay in peak physical condition. If any areas would be shown dipping, doctors and trainers could step in to assist the athlete and improve their wellness.
The radar chart is an incredibly useful and powerful tool for data visualization. The wide array of fields they can be applied to, and the multitude of ways they can used in those fields makes them a must learn aspect of data mining and data analytics. They are incredibly useful for the finding performance of different datasets related by the same multivariable set of data, and making decisions based the analysis of those data sets. Additionally, they have relatively easy to read designs that can change colors to help differentiate the objects being looked at, use relatively less space compared to other graphs, and overall have a smooth and presentable look to them. Radar charts have some drawbacks, such as trying to use them when the variables are measured on scales that are not close to each other, and they tend to work best with less than eight to ten variables and groups of three or fewer objects. Despite these drawbacks, radar charts are one of the best tools in a data analytics tool bag for both professionals and enthusiast.
Software can be used to generate Radar Charts in an efficient manner. Python is one example. Within Python different libraries of code can be accessed with different functionalities. Plotly is a useful graphing library for Radar Charts in Python. Plotly supports multiple types of Radar Charts.
To create a basic Radar Chart using Plotly you will need to define a figure which consists of two lists of data, the radii and the corresponding magnitude values. Next Plotly requires you to update the figure's layout which includes aspects such as radial axis visibility and whether or not there is a legend to the graph. Once this is completed, all that is left to do is to call the show function on your figure object which will produce the Radar Chart.
To create a multiple trace Radar Chart using Plotly the process is mostly the same as above with the basic Radar Chart but with one difference. Similar to the steps above you first create a figure object, but now instead of immediately filling this figure with data you instead need to call the add_trace function for each trace you want to add. Within the add_trace function the Radar Chart's radii and magnitude values are inputted for their respective trace.
Plotly is not the only library available to Python to produce a Radar Chart, and Python is not the only programming language they can be produced in. Plotly stands out as a great option for producing Radar Chart's because it is easy to use and flexible. The logic is simple to follow and well documented on their website which is referenced above. The option to add traces or to just use one make it flexible. Python is a good choice for programming with data analysis. New libraries are always being created to go with the plethora that already exist and the learning curve for the language is very low making it a good choice for even those with limited programming experience.
# Example Radar Chart with Multiple Trace # Required import statement to use the library import plotly.graph_objects as go # Define a figure fig = go.figure() # Call the add_trace function fig.add_trace(go.Scatterpolar( r = [<magnitude values>] theta = <radii> fill = 'toself' name = '<trace name>' )) # Repeat the last function call for each trace you want to add fig.add_trace(go.Scatterpolar( r = [<magnitude values>] theta = <radii> fill = 'toself' name = '<trace name>' )) # Update the figure's layout fig.update_layout( polar = dict( radialaxis = dict ( visible = True, ), ), ) # Display the Radar Chart fig.show()
As mentioned previously the usage of radar charts is for a better visual analysis of two or more sets of data points. Often some usages of a radar chart are to show the attributes of things such as video game characters, sports players, and so on. Conversely, radar charts are also used widely in academic and research categories to allow visual analysis of data sets to then further explore more rigorously. We are able to see outliers, clusters (see also Cluster Analysis), and other trend analysis within the data that may otherwise be harder to interpret while visually viewing the data point set itself. An example as shown in Figure 5 is one such usage of a radar chart. In this instance, we utilize the radar chart to visualize two genomic windows to NP's (see also Genome architecture mapping and Purine nucleoside phosphorylase) that they may or may not possess. Our data set consists of fourteen numbers that represent the percentage of NP's that our genomic windows have seen. That is to say that the windows contain those NP sequences. The direct implementation for the result of this radar chart is as follows:
# Create a list of names for the spokes of the chart, these our the NP’s as mentioned above labels = ['Hist1', 'LAD', 'Vmn', 'RNAPII-S2P', 'RNAPII-S5P', 'RNAPII-S7P', 'Enhancer', 'H3K9me3', 'H3K20me3', 'H3K36me3', 'NANOG', 'pou5f1', 'sox2', 'CTCF-7BWU'] # Get how many spokes there will be on the chart, which is how many labels we have N = len(labels) # Call the main function to create the radar chart theta = radar_factory(N, frame='polygon') # Initialize our given data. This will be a list of numbers that will represent the points on the chart case_data = [(7.27, 61.81, 49.09, 20.0, 45.45, 34.54, 25.454545454545453, 16.36, 29.09090909090909, 29.09, 20.0, 23.63, 18.18, 16.36), (10.52, 59.64, 49.12, 24.561, 49.12, 36.84, 21.05, 10.52, 24.56, 26.31, 19.29, 22.80, 21.052631578947366, 22.80)] # Give the size of the chart fig, ax = plt.subplots(figsize=(6, 6), subplot_kw=dict(projection='radar')) fig.subplots_adjust(top=0.85, bottom=0.05) # The intervals of the rings within the radar chart ax.set_rgrids([0,5,10,15,20,25,30,35,40,45,50,55,60, 65, 70]) # The title of the radar chart title = 'Wiki Article Radar Chart Example' ax.set_title(title, position=(0.5, 1.1), ha='center') # Fill in the graph with from out data for d in case_data: line = ax.plot(theta, d) ax.fill(theta, d, alpha=0.15) # Set the names within the chart from our list of names ax.set_varlabels(labels) # Add legend to top-left plot legend = plt.legend(['Community 1', 'Community 2'], loc=(0.9, .95), labelspacing=0.1, fontsize='small') # Show graph plt.show()
Note: The code implementation above is utilizing radar_factory’s radar chart implementation along with matplotlib and other packages. This is functional code that will work if you copy and paste the radar_factory implementation and the code as seen above.
Within this usage of the radar chart our given data points were very close in proximity to each other. Due to this, we could have visually determined that the windows were close in value to each other. Thus in this representation, the importance comes from its visual aspect to show the data points in an easy and agreeable format as shown. Now previewing the radar chart itself we can visually determine that most of the values in relation to the NP were very close. That is to say that the values were usually within the one to five point difference mark. Now that we have determined that fact we could then further explore why that is the case and adjust our data sets to see some possible changes in outcomes as mentioned within the see also above.
Radar charts are primarily suited for strikingly showing outliers and commonality, or when one chart is greater in every variable than another, and primarily used for ordinal measurements – where each variable corresponds to "better" in some respect, and all variables on the same scale.
Conversely, radar charts have been criticized as poorly suited for making trade-off decisions – when one chart is greater than another on some variables, but less on others.
Further, it is hard to visually compare lengths of different spokes, because radial distances are hard to judge, though concentric circles help as grid lines. Instead, one may use a simple line graph, particularly for time series.
Radar charts can distort data to some extent, especially when areas are filled in, because the area contained becomes proportional to the square of the linear measures. For example, in a chart with 5 variables that range from 1 to 100, the area contained by the polygon bounded by 5 points when all measures are 90, is more than 10% larger than the same for a chart with all values of 82.
Radar charts can also become hard to visually compare between different samples on the chart when their values are close as their lines or areas bleed into each other, as shown in Figure 5 below.
Radar charts impose several structures on data, which are often artificial:
For example, the alternating data 9, 1, 9, 1, 9, 1 yields a spiking radar chart (which goes in and out), while reordering the data as 9, 9, 9, 1, 1, 1 instead yields two distinct wedges (sectors).
In some cases there is a natural structure, and radar charts can be well-suited. For example, for diagrams of data that vary over a 24-hour cycle, the hourly data is naturally related to its neighbor, and has a cyclic structure, so it can naturally be displayed as a radar chart.
One set of guidelines on the use of radar charts (or rather the closely related "polar area graph") is:
Radar charts are helpful for small-to-moderate-sized multivariate data sets. Their primary weakness is that their effectiveness is limited to data sets with less than a few hundred points. After that, they tend to be overwhelming.
Further, when using radar charts with multiple dimensions or samples, the radar chart may become cluttered and harder to interpret as the number of samples grows.
For example, take the batting stats table comparing MLB 2021 MVP Shohei Ohtani, vs the stats of the leagues average designated hitters and some Hall of Fame players. These stats represent the percentage of hits, home runs, strike outs, etc per at bat of a player. For more information on what each stat used in the table represents, you can refer to this reference by the MLB. We will use this table below to create Radar charts comparing the 2021 MVP batting stats to the league averages for Designated Hitters and regular batters, in an attempt to visualize performance metrics and visually come to a conclusion that Shohei out performed the average player. Next we will include additional samples into the Radar chart, using Hall of Fame players Jackie Robinson, Jim Thome, and Frank Thomas to compare Shohei to a few of the greatest batters of all time. This Radar chart not only can give us intuition of how Shohei compares to the top historical players, but will also serve a purpose in showing the limitations of having too many samples in a Radar chart.
We can see in Figure 10 how a radar chart can be easily interpreted when the number of spokes and samples is relatively small. When we compare more samples in Figure 11, even without an area fill on the radar chart, it becomes apparent how difficult it can become to interpret or make trade-off decisions.
The chart on the right contains the star plots of 15 cars. The variable list for the sample star plot is:
We can look at these plots individually or we can use them to identify clusters of cars with similar features. For example, we can look at the star plot of the Cadillac Seville (the last one on the image) and see that it is one of the most expensive cars, gets below average (but not among the worst) gas mileage, has an average repair record, and has average-to-above-average roominess and size. We can then compare the Cadillac models (the last three plots) with the AMC models (the first three plots). This comparison shows distinct patterns. The AMC models tend to be inexpensive, have below average gas mileage, and are small in both height and weight and in roominess. The Cadillac models are expensive, have poor gas mileage, and are large in both size and roominess.
One may use line graphs for time series and other data, in the form of parallel coordinates.
For graphical qualitative comparison of 2-dimensional tabular data in several variables, a common alternative are Harvey balls, which are used extensively by Consumer Reports. Comparison in Harvey balls (and radar charts) may be significantly aided by ordering the variables algorithmically to add order.
An excellent way for visualising structures within multivariate data is offered by principal component analysis (PCA).
Another alternative is to use small, inline bar charts, which may be compared to sparklines.
Although radar and polar charts are often described as the same chart types, some sources make a difference between them and even consider the radar chart to be a polar chart's variation that does not display data in terms of polar coordinate.
Dr. Philip J. Kiviat suggested at a recent NBS/ACM workshop on performance measurement that a circular graph, using radii as the variable axes might be a useful form. […] I recommend they be called "Kiviat Plots" or "Kiviat Graphs" to recognize his insight as to their importance.
((cite web)): CS1 maint: multiple names: authors list (link)