The Mendoza Line

Above average data visualizations

Click on each logo to switch images and click again to start the animation.

Last week, the Supreme Court set off a wave that ended up legalizing same-sex marriage in these 10 states: Indiana, Oklahoma, Utah, Virginia, Wisconsin, Colorado, Nevada, West Virginia, Idaho, and North Carolina. This brought the number of states with same-sex marriage to 30 and the percentage of LGBT people who can now legally marry to 60.7%. I explain how I got that estimate here.

But the the Supreme Court unleashed another wave this week: a torrent of same-sex marriage GIFs. I collected three other animated maps from Bloomberg Politics, the Huffington Post, and Quartz that show the trajectory of same-sex marriage in the United States. I compared the strengths and weakness of each graphic below.

Read More

Last updated: October 18, 2014.
Note: The map and bar chart show when same-sex marriage licenses were first issued in each state.
Click here to embiggen this graphic.

By David Mendoza

Updated Saturday, October 18th:
Alaska and Arizona started recognizing same-sex marriages yesterday, becoming the 30th and 31st states to recognize such unions. More than 63% of LGBT people can now marry in America.

Updated Friday, October 10th:
On Friday, same-sex marriage became legal in both Idaho and North Carolina. That brings the total number of states with same-sex marriage up to 29 and the percentage of LGBT people who can marry to 60.7%.

Updated Thursday, October 9th:
According to the AP, same-sex marriage finally became legal in Nevada today. At the same time, gay and lesbian couples have also started getting married in West Virgina. This means — as of Thursday, October, 9th — 57.4% of LGBT Americans can get married in 27 states. The GIF has been updated to reflect these developments.

Updated Monday, October 6th:
It seems same-sex marriage has been stopped in Nevada by the Supreme Court before it could even start. That means only 55.8% of LGBT Americans can marry. The GIF has been fixed.


Original post: On Monday, the Supreme Court declined to hear same-sex marriage cases from 5 states, allowing previous lower court rulings to go into effect. This increased the number of states that recognize same-sex marriages from 19 to 24, plus the District of Columbia. The state of Colorado — which was not among the 5 states to have a same-sex marriage case denied, but is part of one of the affected circuit courts of appeals — also began to recognize same-sex marriages on Monday.

As I was preparing to publish this article, the Nine Circuit Court of Appeals ruled that same-sex marriage bans in Idaho and Nevada are unconstitutional. The Governor and Attorney General in Nevada have already declared that they will no longer defend the Silver State’s same-sex marriage ban. However, Idaho decided to appeal the Ninth Circuit’s decision to the Supreme Court and Justice Anthony Kennedy has halted same-sex marriage from going into effect there.

Currently, 55.8% 57.4% 60.7% 63.2% of LGBT Americans live in states that allow same-sex marriage. I calculated that number using state population data from the Census Bureau and estimates of the LGBT population from Gallup and the Williams Institute.

Unfortunately, Phil Bump of the Washington Post bested me once again, arriving at this estimate before I did. I envy his spreadsheeting speed — not really. But as Bump predicted, his estimates are already out of date. He displayed his results in a line chart that showed that the percentage of LGBT people living in states with same-sex marriage exceeds the percentage of all Americans who live in those same states. Allison McCann also visualized this trend for FiveThirtyEight. According to her calculations, around 52% of all Americans — as of October 7th — live in states where gay and lesbian people can wed.

I made a similar graphic like the one above that showed that we reached the halfway milestone on the road to full marriage equality last June. Yet, upon further review, that estimate may be flawed because the data I used from the Census Bureau is less than perfect. I explain how below.

Read More

By David Mendoza

The state of California has over 38 million people, but only 80 state representatives and 40 state senators. That means, you’re very poorly represented politically if you live in the Golden State. For every member of the California State Assembly, there are over 400,000 state residents. It’s even worse in the California State Senate. Each state senator represents nearly 1,000,000 Californians. By comparison, New Hampshire is the ninth least populated state, but has the largest state legislature in the country with 424 elected officials. The General Court of New Hampshire — which is what the Granite State’s legislature is called — has one representative for every 3,309 residents and one senator for every 55,144 residents.

If Californians were as well represented as New Hampshirites, the California State Assembly would need 11,584 members and 695 senators. Likewise, if New Hampshirites were as poorly represented as Californians, the statehouse in Concord would be a very lonely place since it would only have 3 representatives and 1 senator.

The charts below show the ludicrous disparity in representation between large and small states.

Read More

Click here to embiggen this graphic.


By David Mendoza

Last week, Julia Belluz of Vox argued that people inefficiently donate money to charity. Rather than directing donations towards fighting the diseases that ravage the most people, we give money for less pragmatic reasons. For instance, someone might donate to a charity in order to honor a family member killed by a certain disease. While commemorating someone with a donation is reasonable, Belluz believes allowing our donations to be influenced by celebrities and viral marketing campaigns is not.

Belluz points to the Ice Bucket Challenge as an example of how good publicity can attract more money than actual death tolls. To show this, the article includes this bubble chart that displays the number of people killed by eight diseases on the right side and the amount of money raised by fundraisers associated with those same diseases on the left. It purports to show how the ALS Association has raised more money than other fundraisers, despite the fact that motor-neuron diseases like ALS kill comparatively fewer people. As of today, this bubble chart has been shared over 7,000 times on Facebook. It’s unfortunate then that though the numbers presented in the chart are accurate, the way the data is displayed is not. I reveal why below and explain how my scatter plot above displays the data more honestly.

Read More

By David Mendoza

Walt Hickey, FiveThirtyEight’s lead lifestyle writer, has a knack for ending controversial debates by dropping data on people. He settled the dispute among lame dads about what constitutes classic rock. He fired the last shot in the endless war over the Oxford comma. He even used data to shame people into eating their steak the correct way — rare.

Well, Hickey’s done it once again. Last month, he published the results from a “Star Wars” survey FiveThirtyEight commissioned. Many readers were upset by the fact that 20% of respondents chose one of the three prequels as their favorite film in the franchise. Many commenters suspected that this aberration might be due to the poor judgement of younger fans. As always, Hickey posted his survey data to GitHub and goaded someone on Twitter to start a “generational fight.”

Looking through the data, here’s what I found. In this struggle for generational supremacy, it’s middle-aged “Star Wars” fans versus the young and old. While large majorities in every age group preferred the original trilogy over the prequels, large majorities of middle-aged respondents selected one of the first three “Star Wars” movies as their favorite, whereas just under three-fourths of those under 30 and over 60 did the same.

Click here to embiggen this image.

Read More

The fine folks at Tumblr recently added The Mendoza Line to its Politics and Government spotlight page. We’re now featured alongside other great Tumblrs run by The Daily Show, Foreign Affairs, The White House, and even Michele Bachmann. Thanks to everyone at Tumblr for making this happen!

Click here to see the entire graphic.

By David Mendoza

The Inter-Parliamentary Union (IPU) tracks the percentage of women serving in national legislatures around the world. The IPU updated its figures last month and found that Rwanda remains the country with the highest percentage of female legislators. Women made up 64% of Rwanda’s Chamber of Deputies, the lower house of the country’s bicameral legislature. Since 2008, at least 50% of Rwanda’s lower chamber has been composed of women. This gender parity has produced tangible results for the women of Rwanda, including greater access to paid maternity leave, reclassifying non-consensual martial intercourse as rape, and expanding the availability of abortions.

By comparison, just over 18% of the U.S. House of Representatives and 20% of the U.S Senate are made up of women. Overall, the United States is tied with San Marino — the tiny country of just over 32,000 people — for 85th place in the world. If we count American state legislatures, 36 had a higher percentage of women serving than the United States did nationally. Additionally, one state legislature ranks in the global top 10. As the the chart above shows, Colorado had the highest percentage of female representatives serving in its legislature at 41%. You can see where all 50 states ranked internationally here.

I included two additional pieces of information on the chart to provide a more nuanced presentation. First, I noted the existence of gender quotas for female legislators by adding a pink “Q” next to each country’s name if it had a statutory and/or constitutional quota for female legislators. This information comes from the quotaProject, a database maintained by the International Institute for Democracy and Electoral Assistance, the Inter-Parliamentary Union, and Stockholm University. Second, I included Freedom Ratings produced by the watchdog organization Freedom House. I did this to show how much each country respects human rights and civil liberties. This is denoted on the chart by the color of each bar. Countries rated as “free” by Freedom House appear green. “Partly free” countries are yellow and “not free” show up as red. American states are all colored blue.

Below are additional charts providing further context on this issue.

Read More

Click here to embiggen this image.

By David Mendoza

The Supreme Court ended its term last week by handing down two controversial split decisions that invalidated the contraception mandate and weakened unions. The acrimonious media coverage these cases and others received confirmed the polarized nature of the Supreme Court for many Americans. However, this perception belies the level of consensus that actually exists on the court.

In spite of the many conspicuous examples of disagreement, most cases decided by the Supreme Court don’t have any justices voting in the minority. According to figures compiled by SCOTUSblog, the high court ruled unanimously on 66% of cases adjudicated on the merits this term. Combining data from SCOTUSblog and the Supreme Court Database, the GIF above shows that this was the highest percentage of cases decided by the court without a dissent in over 25 years.

However, before we credit this trend entirely to the leadership of Chief Justice John Roberts, it is important to note that since 1946, a plurality of cases decided by the Supreme Court were ruled on unanimously. So this is not a new trend. The Roberts court, however, has been marginally more united in its disposition of cases than its predecessors. Between 1946 and 2013, the court arrived at a unanimous decision just over 40% of the time. The Roberts court has performed better with approximately 46% of cases decided without a dissent.

Read More

Click here to embiggen this image.

By David Mendoza

Walt Hickey did what centuries of grammar pedants and pedagogues couldn’t: he ended the debate over the use of the Oxford comma. Well, not really, but he did commission a fascinating poll for FiveThirtyEight that helps us identify which people are passionate about proper comma use.

The poll asked 1,129 Americans to determine which of these sentences was correct: “It’s important for a person to be honest, kind and loyal.” Or: “It’s important for a person to be honest, kind, and loyal.” The first sentence has a single comma, while the second one has two. According to the results, 57% of respondents selected the latter option, which included an Oxford comma. So clearly the people who advocate for the use of an additional comma between the penultimate item in a series and a conjunction in a sentence win.

But who makes up this pro-Oxford comma majority and the grammar heretics in the minority? Thankfully, being the brilliant, generous, and transparent journalist that he is, Hickey released the data from FiveThirtyEight’s poll on GitHub. Using this data, I made the Sankey diagram above that shows the intensity with which people choose sides in this debate. As we can see, a larger majority of respondents chose the sentence that included an Oxford comma when they also said they cared “a lot” about its use in grammar — 77% vs. 57%. When combined with people who said that they cared “some” about the use of Oxford commas, these two subgroups represented 74% of all respondents who selected the sentence that had an Oxford comma in it.

By comparison, 50% of respondents, who did not chose the sentences with an Oxford comma, said that they did not care “much” or “at all” about this type of punctuation. An additional 2% of non-Oxford comma users didn’t answer the question.

Below, you’ll find additional Sankey diagrams examining more of FiveThirtyEight’s poll results.

Read More

Click here to embiggen this image.

By David Mendoza

Recently, there has been increased attention paid to the resurgence of measles in the United States. But despite this uptick, it’s important to remember how effective the measles vaccine has been at reducing the prevalence of the disease. Since 1963, when John F. Enders helped develop the first vaccine against the measles, the number of cases of this respiratory disease has declined considerably. By the end the 1960s, according to Samuel L. Katz, Chairman Emeritus of Pediatrics at Duke University, “annual measles cases had been reduced by more than 90%.” Immediately before then, approximately 400 people died and more than 3 million people were infected by measles every year.

The chart at the top of the page displays the remarkable reduction in the measles incidence rate per 100,000 people in the United States. The incidence rate is defined by the CDC as the number of new cases of a disease over a given period that is then divided by the average population of a locality. So in this cases, the incidence rate measures the number of measles cases reported to the CDC adjusted for each state’s population. The chart is ordered from the states with the highest average incidence rate at the top and the states with the lowest rates at the bottom. I gathered the data for this visualization from Project Tycho, a database maintained by the University of Pittsburgh. The researchers at Project Tycho culled their data from weekly surveillance reports from the NNDSS. Specifically, I used Level 1 data, which has been standardized into a common format for easier analysis.

I provide more context below.

Read More

Click here to embiggen this image.

By David Mendoza

The United States reached an important milestone yesterday: for the first time ever, a majority of same-sex couples can now legally marry.

Illinois became the sixteenth state to recognize same-sex marriages when Gov. Pat Quinn signed the Religious Freedom and Marriage Fairness Act last November. However, most same-sex couples in the Prairie State couldn’t receive a marriage license until June 1. Illinois is home to over 24,000 same-sex couples, according to the 2012 American Community Survey. These same gay and lesbian couples make up 3.9% of all such couples in the United States. And it was this 3.9% that pushed America over the half way point on the road to full marriage equality.

I explain how I reached my results and provide more context about the state of same-sex marriage in America below.

Read More

Click here and here to embiggen these images.

By David Mendoza

It may come as a surprise that the current Congress has the fewest number of veterans serving in either chamber in nearly 50 years. There are presently 89 veterans in the House of Representatives and 20 in the Senate. Since 1965, the number of veterans serving in the House and Senate has decreased by 64% and 68%, respectively.

Using data complied by the Brookings Institution, I created the animated bar graphs at the top of this page. The two charts display the changes in the occupational background of both chambers of Congress. It’s important to note that members of Congress were allowed to choose more than one occupation, so the totals may exceed the actual number of Representatives or Senators.

Read More

By David Mendoza

The great Walt Hickey of FiveThirtyEight wrote two excellent articles about the ambiguity of which states constitute the Midwest and the South. On Wednesday, Hickey released the data from his posts on GitHub and asked readers to remix his work. Specifically, Hickey wanted people to use the zip code data from his SurveyMonkey Audience poll results to answer these questions:

Where are the Southern and Midwestern expatriates? Do local definitions of regions explain the Midwestern inability to agree on the core states? And how split are residents of difficult-to-categorize states, such as Missouri and Virginia, on their own identity?
I decided to use Google Fusion Tables to map this zip code data and see if I could answer some of these questions.

Read More

Click here to embiggen this image.

By David Mendoza

Last week, I created a GIF that displayed the increase in the imprisonment rate in the United States over the last 34 years. After posting it on Reddit, several commenters asked about the link between crime and the imprisonment rate. So inspired by Hans Rosling, I decided to make an animated bubble graph that charts the violent crime rate against the imprisonment rate for each state between 1978 and 2012. For the imprisonment rate, I used the same data from the National Prisoner Statistics Program (NPS) that I made my original GIF with. For the violent crime rate, I used data from the Uniform Crime Reporting Program (UCR) database. The UCR Program includes murder, non-negligent manslaughter, forcible rape, robbery, and aggravated assault in its tabulation of violent crime.

Admittedly, this is a rather simplistic analysis. Despite the fact that many states saw a nearly simultaneous increase in its imprisonment rate as its violent crime rate decreased, this is not dispositive proof that one caused the other. Below, I review briefly some evidence that attempts to determine whether or not the increase in the imprisonment rate contributed to the decline in violent crime over the last 20 years.

Read More

Click here to embiggen this image.

By David Mendoza

According to the Bureau of Justice Statistics (BJS), between 1978 and 2009, the number of federal and state prisoners increased by an extraordinary 428%. The total number of people in prison peaked in 2009 at more than 1.5 million people. Since that point, for four consecutive years, the number of prisoners released from prison has been greater than the number admitted, meaning the overall population has declined. This hasn’t happened in three decades. The latest numbers from the BJS show that in 2012 the number of prisoners admitted into state and federal prisons was the fewest since 1999.

The majority of prisoners — 87% — are held in state prisons. Using data from the National Prisoner Statistics Program (NPS), I created the GIF above. It displays the increase in the imprisonment rate in every state prison between 1978 and 2012. The NPS defines the imprisonment rate as followed: “The number of prisoners under state or federal jurisdiction sentenced to more than 1 year per 100,000 U.S. residents.” Below, I explain why the number of people in prison at the state level has increase so much and delve deeper into the numbers behind our prison system.

Read More

© 2013-2014 David Mendoza