R

Lollipop Plot

January 21, 2022
visualization
ggplot2, R

Overview # A lollipop plot is essentially the same thing as a bar plot. Visually, instead of a bar, a lollipop plot is made up of line segments with dots at the ends. A lollipop plot is a good way to show the relationship between a categorical variable and a numerical variable. The big advantage of a lollipop plot over a bar plot is it’s visually lighter on a plot in the sense that the object on the plot takes up less space. ...

Dumbbell Plot

January 20, 2022
visualization
R, ggplot2

Overview # A dumbbell plot can show changes or differences within a given observation, grouping, or category along some numerical dimension. That numerical dimension can be a measure of some sort or a point in time (which really is just a measure of time). Visually, a dumbbell plot looks like… a dumbbell. An individual dumbbell plot is really nothing more than a line segment connecting distinct points on a plot. ...

Ridgeline Plot

January 19, 2022
visualization
R, ggplot2

Overview # A ridgeline plot (previously referred to as as a “joyplot”) is a way to examine the distributions of a numerical variable for several different groups. Ridgeline plots can present values in absolute terms (i.e., the heights of the ridges correspond to the actual values) or as densities (i.e., the heights of the ridges correspond to proportions within edge ridge component). Ridgeline plots showing absolute values is sort of like a filled line plot. ...

Parliament Plot

January 16, 2022
visualization
R, ggplot2

Overview # Well, this one’s a fun one. Parliament plots are a way to visualize the composition or votes of legislatures, with the shapes representing seats positioned in a manner reminiscent of the actual seating arrangements. Those seats can be mapped to party or faction affiliations, or even voting alignments. Once mapped, associations can be reflected using such features as colors or shape types. In terms of application, parliament plots are very similar to waffle plots. ...

Venn Diagram

January 15, 2022
visualization
R, ggplot2

Overview # Venn diagrams are used to visually show commonalities between groups. Usually, distinct groups are represented in Venn diagrams as circles or ellipses. Where these shapes overlap represent commonalities between groups. Oftentimes, the different parts of a Venn diagram are labeled with the groups' defining features and with counts of the number of things that fall within each part of the Venn diagram. So if there’s a circle for Group A, and another circle for Group B, and there’s some overlap of those two circles, where there is overlap represents individuals that are part of both Group A and Group B. ...

Donut Chart

January 12, 2022
visualization
ggplot2, R

Overview # A donut chart is more or less a pie chart. Similar to a pie chart, a donut chart conveys a senses of relative proportions of different categories or groups. Like a pie chart, a donut chart suffers from the same major flaw: its design makes it inherently difficult for people to visually draw clear comparisons between categories. Data # Donut charts require a categorical field and a numerical field. ...

Pie chart

January 9, 2022
visualization
R, ggplot2

Overview # Well, this is potentially a controversial one: pie charts. A pie chart is a circular plot that is divided into wedges, where the wedges reflect categories, and the size of the wedge corresponds to the proportion of the categories. The major criticism of pie charts is that humans do a very poor job of visually comparing angular wedges. The whole point of data visualization is to convey dense data clearly, and pie charts fail at that, especially if there are too many categories. ...

Setting up Utterances on Blogdown

January 7, 2022
howto
R, blogdown, utterances, blog, comments, Hugo

I like the idea of engaging with visitors here. It’s a reliable way to gather feedback and it really bring a static post to life. The most common and streamlined way to do so is with an on-page commenting system. And so began my quest to implement a commenting system on this site. Begone, Disqus # There are a whole bunch of commenting systems out there. One of the most popular is Disqus. ...

Box and Whisker Plot

January 3, 2022
visualization
ggplot2, R

Overview # A box and whisker plot (aka boxplot) is a way to show data distribution. The dividing lines along the “box” part of box and whisker plot typically represent the median (the middle observation in a sequentially sorted dataset), the upper quartile (the observation that is the middle point of the upper half of the dataset), and the lower quarter (the observation that is the middle in the lower half of the dataset). ...

Correlation Plot

December 23, 2021
visualization
ggplot2, R

Overview # Correlation refers to the tendency for different data fields (or variables) to move together. Here’s a simple conceptual example: we typically expect that as a person’s height goes up (such as when the person ages and grows), that person’s weight would go up as well. In this case, we could say there is a strong positive correlation between height and weight. If the fields move in the same direction (e. ...