
Explore practical data visualization techniques in stata, learn to create and customize graphs from code, compare graph types, and build confident, transferable visual skills for analyzing quantitative data.
Explore how to visualize a single continuous variable using histograms and density plots, interpret probability density functions, and describe mean, median, mode, skew, and kurtosis.
Learn how histograms group data into bins to reveal a variable's distribution, using density to show relative frequency and axis interpretation.
Explore unequal bin histograms in stata, comparing custom bin widths to equal-probability histograms, and learn how adjusting bin sizes and colors highlights specific data ranges and distributions.
Generate basic histograms of hourly wage data in Stata, adjust bin width or pin counts, switch y-axis to density, frequencies, or percent, and explore equal probability histograms via qpr histogram.
Explore kernel density plots and their smoothing advantages over histograms, and learn how bandwidth and kernel choices shape the distribution, its peaks, and interpretation.
Explore how to compare multiple distributions using kernel density plots and overlapping with transparency or mirrored designs, while ensuring common axes for accurate interpretation.
Learn to generate kernel density plots in Stata from temperature data, adjust bandwidth and kernel options, overlay multiple densities with area shading, and merge plots for comparison.
Discover ridgeline plots, or decoy plots, that display many kernel density distributions on a single graph with separate x axes, enabling shape comparison while noting sorting and scaling caveats.
Learn to create ridgeline plots in Stata by stacking nine kernel density plots of January temperatures across divisions, using mylabels to customize y labels.
Explore cumulative density plots to read medians and percentiles directly and compare distributions using the curve's slope. Evaluate advantages and limitations of cumulative density plots for visualizing continuous data.
Explore how to generate cumulative density plots in Stata with a user-written command, using by and over for groups, recast to area plots, and options like frequency and scale.
Spike plots reveal fine data structures by using histograms with many bins to uncover detailed distributions; they require many observations and are poor for comparing multiple distributions.
Learn to create spike plots in Stata by using many histogram bins, adjust bin size with round, and explore the fraction option for density-like views.
Explore rootogram plots that compare data distributions to theoretical ones by rescaling frequencies with the square root, using hanging bars from the theoretical curve to reveal deviations from zero line.
Learn to generate rootogram plots in Sta ta to visually test data against theoretical distributions, overlay normal or other distributions, adjust spike counts, and use confidence intervals to assess normality.
Explore box plots as a box-and-whisker visualization of the five-number summary (min, q1, median, q3, max), including outliers, advantages for comparing distributions, and limitations.
Learn to create vertical and horizontal box plots in Stata with graph box and craft box commands, comparing January and July temperatures across regions using over, by, and salt options.
Violin plots combine a box plot with a rotated kernel density plot on each side to reveal the full distribution alongside summary statistics.
Explore violin plots in Stata, combining kernel density and box plots to reveal distribution details for January and July city temperatures.
Explore stem-and-leaf plots as compact tables showing every data value with stems and leaves, and note their limits for large datasets and the use of default parameters.
Explore stem-and-leaf plots in Stata, comparing text-based and graph-based visualizations, loading auto training data, using stem and digits options, and rotating plots for clear distribution insights.
Explore how dot plots visualize a continuous distribution by displaying each observation as a dot, enabling easy group comparisons and highlighting clusters and outliers.
Explore how to create dot plots in Stata, compare the default dot plot with the strip plot, and use the over option to group data and add means and medians.
Explore how symmetry plots transform data around the median and compare distances from the median to a reference line, revealing distribution symmetry and skew.
Assess whether data are uniformly distributed using a quantile uniform plot, transforming data against fractional ranks to reveal deviations from a rectangular distribution and highlight skewness.
Explore the quantile-normal plot, or probit plot, to test normality by transforming data via the inverse normal transform on the x-axis and revealing deviations from the bell curve.
Explore how a quantile chi-square plot tests whether data are chi-square distributed by a quantile transformation and a reference line, emphasizing degrees of freedom.
Explore quantile-quantile plots, or kuku plots, which compare two continuous distributions by plotting their quantiles. A straight line, often 45-degree, shows similar shapes; deviations reveal shifts or differences.
Explore how quantile plots in Stata diagnose distribution shapes, test symmetry and normality, and compare two variables, with chi-square cases and degrees of freedom, while guiding when to use histograms.
Explore visual options for discrete data in Stata, focusing on countable variables, their ordering, and using tables with frequency, percent, and cumulative percent.
Explore bar graphs in depth, including vertical and horizontal bar charts for discrete data, their interpretation of frequency and percentage, and best practices for labeling, sorting, stacking, and mirroring.
Learn to create and customize bar graphs in Stata using graph bar and horizontal bar charts, including over options, labels, and percent statistics.
Assess why pie charts are often not useful for discrete data, note their visual appeal and limitations, and learn when exploding a slice better conveys a simple proportion.
Learn to create pie charts in Stata with graph pie, using the three modes and key options like explode, label, and sort for clear regional and demographic visuals.
Explore dot charts as an alternative to bar charts, using rows of dots and a blue dot to show counts across many discrete categories and compare groups.
Explore how to craft dot charts in Stata with the graph dot command, using over, percent, and mean statistics to compare occupations, union status, and other categories.
Explore radar plots, or spider plots, using angular spokes to compare many discrete categories. Learn how overlaying multiple groups via spoke length aids comparison, and note interpretability caveats.
Learn to generate radar plots in Stata with the radar command, install it if needed, and customize spokes, axis labels, and aspect for comparing multiple variables.
Explore scatterplots as a go-to visualization for examining relationships between two continuous variables, using dots or markers to display raw data and reveal correlation patterns.
Explore creating and customizing scatter plots in Stata, using two-way commands to overlay multiple variables, and fine-tune markers, colors, labels, connections, and multi-axis options.
Recast dense scatter plots as heat maps by binning data into grid cells and coloring by data proportion. Reveal the positive weight–height relationship in large datasets, while noting interpretive complexity.
Explore how hex plots replace squares in heat maps to improve diagonal visualization, delivering a smoother, more calming visual narrative for weights and height data.
learn to generate heat plots and hex plots in stata with the heat plot command, including color levels and bin width. visualize the nhanes dataset to reveal data density.
Explore sunflower plots, where hexagons and petals visualize data density in scatterplots. Light and dark hexagons indicate observations per region, with bin width affecting petal counts.
Learn to generate sunflower plots in Stata to visualize density and relationships between continuous variables using hexagons and petals, with options for bin width and overlays such as polynomial smoothers.
Explore polar smoother plots, a nonparametric, circular visualization that transforms data to polar coordinates, smooths the central mass around 50%, and compares groups via ellipses and circles.
Learn how to create polar smoother plots in Stata by installing a user-written command, loading car price data, and visualizing price vs mpg with quantile, groups, and customization options.
Explore how lines of best fit summarize relationships in scatterplots, comparing parametric and non-parametric approaches. Understand their use with continuous and discrete data, add confidence intervals, and beware out-of-bounds predictions.
Learn to generate lines of best fit in Stata using two-way scatter plots, linear, quadratic, fractional polynomial, and non-parametric fits, with confidence intervals and by-group overlays.
Learn how line plots connect ordered data points with a line to show trends, distinguishing them from scatterplots and best-fit lines, especially for time-based data.
Learn to create line plots in Stata using the line command, overlay multiple lines, customize connections, colors, and axes, and optionally pair with scatter plots for clarity.
Compare four area plot variants: area, bar, spike, and drop line plots, and learn how each emphasizes the area under the curve to reveal variation.
Learn to create area plots in Stata with the area command to shade under life expectancy time series, and customize with base zero, color, opacity, and overlays.
Range plots extend area line plots by shading the area between two data series to reveal evolving differences across the x axis, such as opening and closing prices.
Explore visualizing differences between data series in Stata with range plots. Learn to overlay graphs using twoway commands, applying area shading, bars, spikes, arcs, and scatter on life expectancy data.
Explore dropline plots as a variant of area plots that draw a top line from each data point to the axis, highlighting sparse observations with labeled points.
Learn to create two-way drop-line plots in stata, visualizing life expectancy versus log GNP per capita, with subgroups, country labels, horizontal and base lines, and overlaid plots.
Rainbow plots use color gradation to encode the ordering of data across multiple plot types, not density, making many groups easier to compare.
Learn to create rainbow plots in Stata by applying color gradation to ordered data, using color palettes to generate and apply colors across lines and bars.
Sparkline plots stack small line charts vertically to reduce clutter and highlight changing trends across many time series.
Explore how to create sparkling plots in Stata using the sparkling command, load the Grunfeld data, and compare multiple time series with options like over, buy, extremes, and white label.
Jitter plots visualize discrete data by randomly displacing values, revealing densities and relationships between categorical variables while keeping the overall pattern recognizable.
Explore how to create jitter plots in Stata to reveal data density and relationships for categorical and continuous variables, using jitter and seed for reproducible visuals.
Explore table plots, a data table transformed into bar-chart visuals, enabling quick, readable comparisons and a visual narrative across discrete health outcomes and age groups.
Learn how to create table plots in stata using the top plot command, explore two-way and three-way tabulations, and apply options like percent, missing data, horizontal bars, and cell labels.
A balloon plot represents the frequency of two discrete variables in a matrix using circles whose sizes indicate counts, allowing multi-directional size comparisons and a softer visualization than table plots.
Learn how to create balloon plots in Stata by weighting markers to represent cell frequencies, using collapse by occupation and industry, and customizing colors, sizes, and labels.
Explore stacked bar charts for two discrete variables, with bars divided into subgroups to show relative contributions and patterns across age groups and health outcomes.
Explore creating stacked bar graphs in Stata with the graph bar command, using weight, over, and stack options, then refine with percentage labels and horizontal bars.
Explore mosaic plots in Stata to visualize two categorical variables, show each category's size with variable-width bars, and interpret the second axis for percentage observations.
Master mosaic plots in Stata, aka spike plots, to visualize two-variable data and relative frequencies using the weight qualifier; compare with bar graphs.
Explore contour plots as a 3d visualization on a 2d plane, using contours to represent the third dimension z across x and y.
Master two way contour and two way control line plots to map depth against northern and eastern coordinates, and tailor levels and color palettes for clearer visuals.
Bubble plots extend scatterplots by encoding a third variable in marker area (not radius), revealing the relationship between x, y, and z with intuitive visuals.
Learn to create bubble plots in Stata by weighting scatterplots with population, applying a quadratic fit, and layering customized visuals, labels, and regional overlays.
Explore how China faces visualize multivariate data for small samples by mapping variables to facial characteristics and comparing observations qualitatively.
Discover how Chernoff faces visualize up to 18 variables in Stata using the Chernoff faces approach, including options for features, labeling, spacing, and legends, plus ordering by a variable.
Explore trie plots, a ternary plotting method that reduces three variables summing to a constant into a two-dimensional triangular graph using barycentric coordinates to visualize relative proportions.
Learn to create tri plots in Stata by installing the trie plot command, preparing data with three proportional variables, and using options to reveal education and occupation patterns.
Make sure to check out my twitter feed for monthly promo codes and other updates (@easystats3)
Learning and applying new visual techniques can often be a daunting experience. This is especially true if you need to generate and code data visualizations yourself.
This course is designed to provide you with a compact, and easy to understand, set of videos that focus on the basic principles behind many common data visualization and how you can code them in Stata.
The course is modular; just click on the graphs that you are most interested in and learn away. You do not need to follow this course linearly.
This course will teach you many different methods to visualize data and how to generate these yourself in Stata
Visualizing and graphing data is a vital in modern data analytics. Whether you are a data scientist, student of quantitative methods or a business user, having an understanding of how to visualise data is an important aspect in getting data information across to other stakeholders. Many different ways of visualising data have been devised and some are better than other. However, each method has advantages and disadvantages and having a solid understanding of what visualization might be best suited is key to delivering a concise and sharp "data message".
Often, it takes years of experience to accumulate knowledge of the different graphs and plots. In these videos, I will outline some of the most important data visualization methods and explain, without any equations or complex statistics, what are the advantages and disadvantages of each technique.
I will also demonstrate how each graph can be created, modified and customised in Stata.
The main learning outcomes are:
To learn and understand the basic methods of data visualization
To learn, in an easy manner, variations and customisations of basic visualization methods
To gain experience of different data visualization techniques and how to apply them
To learn and code many Stata graphs
To gain confidence in your ability to modify and create bespoke data visualisations in Stata
Please note the following: You should have some understanding of how Stata works and what .do files are. If you are totally new to Stata you should take a look at my "Essential Guide To Stata" course that explains Stata from the ground up. This course focuses specifically on how to create many different types of graphs and all their possible options and sub-options.
Specific themes include:
Histograms
Density plots
Spike plots
Rootograms
Box plots
Violin plots
Stem-and-Leaf plots
Quantile plots
Bar graphs
Pie charts
Dot charts
Radar plots
Scatter plots
Heat plots
Hex plots
Sunflower plots
Lines of best fit
Area plots
Line plots
Range plots
Rainbow plots
Jitter plots
Table plots
Baloon plots
Mosaic plots
Chernoff faces
Sparkling plots
Bubble plots
and more