Visualizing Social Patterns

Details, analysis, and replication files for @datanate’s animated graphs on TikTok. These videos were created in R with ggplot2 and gganimate.

Author
Last modified

May 26, 2024

Americans have short life expectancies

Posted November 20, 2023

Countries that spend more on healthcare tend to have better public health outcomes—except for the United States, the only industrialized nation that lacks universal healthcare. For the amount the US spends on healthcare (which is far more per person than any other developed country) we would expect life expectancies for Americans to be around 7 years higher. Countries with similar life expectancies as the US tend to spend 4-6 times less per person on healthcare.

For years, doctors, public health experts, and economists have been calling for the US to adopt a single-payer healthcare system like Medicare-for-all. Healthcare systems built around private insurance, without a government guarantee of universal coverage, tend to have higher costs and worse public health outcomes. There are a number of reasons for this. Private health insurers profit by inflating administrative costs at least 6 times as much as public insurers, whereas single-payer systems don’t factor in profit. Without a profit incentive, public insurers are also much more motivated to negotiate lower prices on prescriptions and services. Additionally, free primary care visits encourage patients to get routine checkups that can catch problems before they turn into expensive chronic conditions.

This graph shows the member nations of the Organisation for Economic Co-operation and Development (OECD), which encompasses the world’s developed, generally free countries. Each bubble represents a country. Bubbles pop up on the graph when countries join the OECD, which currently has 38 members. The trendline represents the typical relationship between healthcare costs and life expectancy.

Wages have stagnated since the 70s

Posted November 18, 2023

The Economic Policy Institute (EPI), a pro-union think tank, has written extensively about the growing disconnect between wages and productivity. This graph is reproduced from a graph that appears in several books, reports, and articles by the organization’s analysts.

The wages + benefits variable (which the EPI calls hourly compensation) was obtained by the EPI from the Bureau of Labor Statistics. According to the EPI: “Compensation includes all wages and salaries, supplements (such as shift differentials, all kinds of paid leave, bonus and incentive payments, and employee discounts), and employer contributions to employee benefit plans (such as medical and life insurance, workmen’s compensation, and unemployment insurance). The real consumer average hourly compensation is then calculated by deflating the nominal average hourly compensation by the compensation deflator.”

The EPI calculated productivity by dividing the real net domestic product (the GDP minus the depreciation of capital assets) by the total hours worked by all workers in the country. It’s essentially the total value produced by Americans per hour. The fact that wages stagnated while productivity has been rising constantly suggests that workers are keeping a smaller and smaller percent of the value of their labor. Before the 1970s, workers were generally getting raises proportional to the profits that their labor produced, but now raises tend to only reflect inflation and higher costs of living.

Unions help close income gaps

Posted November 16, 2023

This chart shows the relationship between union membership and incomes of the bottom half of individuals relative to the top half in the United States. Throughout the twentieth century, the income share of the bottom 50% of earners usually rose and fell not far behind union membership rates. The chart merely shows a correlation, but economics research has laid out strong evidence for causation too. Studies consistently find that increased participation in unions was a primary driver behind the shift toward a fairer income distribution in the mid-twentieth century and that tighter restrictions on union activity reversed this trend. Unions give workers more bargaining power to demand higher wages and earn a greater share of their companies’ profits. They are particularly powerful at raising wages for the working class, especially as higher-paying jobs have increasingly gone toward more educated workers.

A higher income share of the bottom 50% of earners does not necessarily mean higher wages for this group—just a smaller gap between them and higher earners. In the US, the post-war rise of the income share of the bottom 50% did reflect a steady rise in wages for working-class Americans. This trend lasted until the 1970s, around a decade after union membership started declining. Wages have stagnated ever since then (when accounting for inflation) even though the GDP per capita doubled during this time, which is why the bottom half’s relative incomes have been declining. The gains of the last half century’s economic growth have gone mostly to higher-income Americans.

The union membership rate is more technically known as union density. It measures the percent of wage and salary earners who belong to unions. The union membership data in this graph come from the Economic Policy Institute, which compiled data from multiple sources. The agricultural sector is often excluded from union density estimates since farmers don’t usually unionize, but they appear to be included in these estimates.

The income share of the bottom 50% of earners is one way of measuring income inequality (or more accurately, income equality, since higher values indicate a more equitable distribution). The most common measures of income inequality (e.g., the Gini coefficient and the income share of the top 1% or 10%) follow a U-shaped pattern over the twentieth century, but I wanted a measure that was inverted so it would mirror the shape of the union membership line. The income share of the bottom 50% essentially shows how high wages for the bottom half of earners are compared to the top half. The data come from the World Inequality Database, the preeminent source for economic inequality data from around the world.

Map of parties in American history

Posted November 12, 2023

Each dot in this graph represents a member of the US House of Representatives. The dots are positioned by DW-Nominate scores, a common political science metric of ideology for members of Congress based on their voting records. An algorithm developed by Keith Poole and Howard Rosenthal takes in all roll-call votes in Congress since 1789 and outputs two scores for each member that together are strong predictors of how a Congressperson will vote on any given issue. The horizontal axis of the graph represents dimension 1 of DW-Nominate scores, which generally captures ideology on economic issues and most other prominent political issues.

The second dimension, represented by the vertical axis, is not as straightforward. It does not directly map onto the same concept as the vertical axis in the “Which party is more extreme?” graph, nor does it directly capture ideology on social issues. This dimension changes meaning and importance throughout time. According to Voteview, the home of the DW-Nominate database, this dimension “picks up differences within the major political parties over slavery, currency, nativism, civil rights, and lifestyle issues.” When members of Congress nearly always vote with their party, this dimension is mostly just noise. In recent decades, for example, this dimension is usually a weak predictor of how members of Congress will vote on a bill, but the votes that it does help predict generally relate to abortion and gun rights. In the last few years, it has picked up disagreements between establishment and populist politicians within the Republican Party. In the mid-twentieth century, when the South effectively acted as its own party within the Democratic Party, this dimension captured disagreements over civil rights legislation.

This axis labels (on the left, right, top and bottom of the chart) change throughout the video and are rough approximations of the meaning of each dimension in each era. These labels are somewhat reductionist—they greatly oversimplify the political divisions at any given time—but they represent a general interpretation of the two dimensions.1 There is no official guide defining the exact meaning of each dimension at each time, so I chose the axis labels by reviewing information about the evolving party systems, divisions within major parties, and third parties throughout history. Note that although the axis labels change at two key times in the video, in reality the meanings of the dimensions evolve more gradually.

The ovals showing each party were automatically constructed by a model built into the R package used to produce the graph (ggplot2::stat_density_2d which uses MASS::kde2d). In general, ovals appear for parties with at least 7 members in the House at a given point in time. This number was chosen simply because it produces the smoothest ovals. The software produces weird shapes for parties with too few members, especially when they are spread out around the map.

Economic freedom rankings, 1995-present

Posted November 12, 2023

This graph shows rankings of the 25 countries each year with the highest scores on the Index of Economic Freedom. The Heritage Foundation, a conservative think tank, developed and maintains this index. It defines economic freedom as “the fundamental right of every human to control his or her own labor and property. In an economically free society, individuals are free to work, produce, consume, and invest in any way they please. In economically free societies, governments allow labor, capital, and goods to move freely, and refrain from coercion or constraint of liberty beyond the extent necessary to protect and maintain liberty itself.”

Academic studies often employ this index, but it has also received criticism. Some economists argue that it really only measures business freedom rather than individual freedom. There is no consensus on whether the index is very meaningful: some studies have found it to be a poor predictor of outcomes such as economic growth while others have found the opposite. The index at least measures the extent to which markets are generally free from government intervention, even if that does not always lead to economic growth or personal economic freedom for the masses.

As of 2023, the US has fallen to 25th place in the leaderboard of economic freedom, and Europe dominates the top of the list. It’s not clear exactly why, but there are several possible reasons. First, European countries tend to be less corrupt than the US, which is a major factor in the index. Economic elites in the US have an easier time controlling policy in ways that benefit them at the expense of the competitiveness of the market. Second, European countries tend to have stronger social services such as universal healthcare and government assistance for lower income households, which reduces the personal financial risks of entrepreneurship and encourages innovation.2 Third, while European countries tend to have more regulations than the US, these regulations are usually designed to limit the power of monopolistic corporations. The European Union has aggressively worked to keep markets competitive for small businesses.3

How the South switched sides

Posted November 9, 2023

Each dot in this graph represents a member of the US House of Representatives. The dots are positioned by DW-Nominate scores, a common political science metric of ideology for members of Congress based on their voting records. An algorithm developed by Keith Poole and Howard Rosenthal takes in all roll-call votes in Congress since 1789 and outputs two scores for each member that together are strong predictors of how a Congressperson will vote on any given issue. The horizontal axis of the graph represents dimension 1 of DW-Nominate scores, which generally captures ideology on economic issues and most other prominent political issues.

The second dimension, represented by the vertical axis, is not as straightforward. It does not directly map onto the same concept as the vertical axis in the “Which party is more extreme?” graph, nor does it directly capture ideology on social issues. This dimension changes meaning and importance throughout time. According to Voteview, the home of the DW-Nominate database, this dimension “picks up differences within the major political parties over slavery, currency, nativism, civil rights, and lifestyle issues.” When members of Congress nearly always vote with their party, this dimension is mostly just noise. In recent decades, for example, this dimension is usually a weak predictor of how members of Congress will vote on a bill, but the votes that it does help predict generally relate to abortion and gun rights. In the last few years, it has picked up disagreements between establishment and populist politicians within the Republican Party. In the mid-twentieth century, when the South effectively acted as its own party within the Democratic Party, this dimension captured disagreements over civil rights legislation.

Democracy leaderboard, 1792-present

Posted November 8, 2023

Political scientists use many different approaches for measuring how democratic each country is. Some of the most powerful metrics come from the Varieties of Democracy (V-Dem) dataset. V-Dem developed a sophisticated model that inputs ratings from more than 3,000 experts around the world, weights them by their consistency with other expert ratings, adds in background data (economic, social, and political variables), and generates several indices that summarize the state of democracy in each country for each year as far back as 1789.

The measure displayed here is V-Dem’s Electoral Democracy Index, which measures the extent to which elections are free and fair. V-Dem defines electoral democracy as follows: “The electoral principle of democracy seeks to embody the core value of making rulers responsive to citizens, achieved through electoral competition for the electorate’s approval under circumstances when suffrage is extensive; political and civil society organizations can operate freely; elections are clean and not marred by fraud or systematic irregularities; and elections affect the composition of the chief executive of the country. In between elections, there is freedom of expression and an independent media capable of presenting alternative views on matters of political relevance.”

Free and fair elections, 1789-present

Posted November 8, 2023

Political scientists use many different approaches for measuring how democratic each country is. Some of the most powerful metrics come from the Varieties of Democracy (V-Dem) dataset. V-Dem developed a sophisticated model that inputs ratings from more than 3,000 experts around the world, weights them by their consistency with other expert ratings, adds in background data (economic, social, and political variables), and generates several indices that summarize the state of democracy in each country for each year as far back as 1789.

The measure displayed here is V-Dem’s Electoral Democracy Index, which measures the extent to which elections are free and fair. V-Dem defines electoral democracy as follows: “The electoral principle of democracy seeks to embody the core value of making rulers responsive to citizens, achieved through electoral competition for the electorate’s approval under circumstances when suffrage is extensive; political and civil society organizations can operate freely; elections are clean and not marred by fraud or systematic irregularities; and elections affect the composition of the chief executive of the country. In between elections, there is freedom of expression and an independent media capable of presenting alternative views on matters of political relevance.”

The three countries in this graph were chosen because the US was originally the pioneer of democracy, Sweden is now consistently one of the strongest democracies, and Russia has struggled with democracy. This shows three different paths that Western countries have taken over the last couple centuries.

Footnotes

  1. Some political scientists argue that DW-Nominate scores should used with caution if at all because they are hard to interpret and individual scores can be counteritutive, but others have shown that these scores are powerful predictors of congressional behavior and are useful for big-picture illustrations of political patterns such as this graph.↩︎

  2. To start a business, most Americans have to quit their job, losing their income and health insurance, which is a common concern Americans cite for why they won’t start a business.↩︎

  3. It’s possible some European countries appear to be less economically free than they really are because many regulations and economic policies are outsourced to the European Union. However, the data used to construct the index generally reflect the overall environment in a country, not just national-level policies, so this is likely not inflating the scores.↩︎