Posts for Tag: US

Size of California Economy Compared to Rest of US

Posted In: Maps | Money

California is one of the world’s largest economies (as measured by gross domestic product), currently ranking 5th in the world (if it were judged as it’s own country). This map divides the rest of the US economy into 6 more or less equal parts (each the size of California’s) and they are all within about 10% of each other.

You can hover over a state with your cursor to get more information about the GDP of that state and the group of states that equal California’s economy.

Gross domestic product is a measurement of the size of a region’s economy. It is the sum of gross value added from all entities in the region or state. It measures the monetary value of the goods produced and services provided in a year.

The main sectors of the California economy are agriculture, technology, tourism, media (movies and TV) and trade. Some of the world’s largest and most famous companies contribute to the California economy, like Apple, Google, Facebook, Disney, and Chevron.

Data and Tools:
Data for state level GDP is obtained from Wikipedia for the year 2017. The map data is processed in javascript and then plotted using the leaflet.js mapping library.

california gdp

How do Americans Spend Money? US Household Spending Breakdown by Income Group

Posted In: Money
How much do US households spend?

One of the key factors in financial health of an individual or household is making sure that household spending is equal to or below household income. If your spending is higher than income, you will be drawing down your savings (if you have any) or borrowing money. If your spending is lower than your income, you will presumably be saving money which can provide flexibility in the future, fund your retirement (maybe even early) and generally give you peace of mind.

I obtained data from the US Bureau of Labor Statistics (BLS), based upon a survey of consumer households and their spending habits. This data breaks down spending and income into many categories that are aggregated and plotted in a Sankey graph.


  • Hover (or on mobile click) on a link to get more information on the definition of a particular spending or income category.
  • Use the dropdown menu to look at averages for different groups of households based on income. This data breaks households into quintiles (groups of 20%) by income. The lowest quintile group is the group of 20% of households with the lowest income (and spend on average ~$25,500/yr).

As stated before, one of the keys to financial security is spending less than your income. We can see that on average, those in the lowest quintiles may be borrowing or drawing down on savings to live their lifestyle, while those in the highest quintiles are saving money and contributing to wealth. This fairly high level of borrowing/drawing on savings from the lowest quintile households may be deceptive because it includes seniors who are drawing down savings that were built up specifically for this purpose, and college students who are borrowing to go to school. These groups generally don’t have significant incomes.

How does your overall spending compare with those in your income group? How about spending in individual categories like housing, vehicles, food, clothing, etc…?

Probably one of the best things you can do from a financial perspective is to go through your spending and understand where your money is going. These sankey diagrams are one way to do it and see it visually, but of course, you can just make a table or pie chart or whatever.

The main thing is to understand where your money is going. Once you’ve done this you can be more conscious of what you are spending your money on, and then decide if you are spending too much (or too little) in certain categories. Having context of what other people spend money on is helpful as well, and why it is useful to compare to these averages, even though the income level, regional cost of living, and household composition won’t look exactly the same as your household.

**Click Here to view other financial-related tools and data visualizations from engaging-data**

Here is more information about the Consumer Expenditure Surveys from the BLS website:

The Consumer Expenditure Surveys (CE) collect information from the US households and families on their spending habits (expenditures), income, and household characteristics. The strength of the surveys is that it allows data users to relate the expenditures and income of consumers to the characteristics of those consumers. The surveys consist of two components, a quarterly Interview Survey and a weekly Diary Survey, each with its own questionnaire and sample.

Data and Tools:
Data on consumer spending was obtained from the BLS Consumer Expenditure Surveys, and aggregation and calculations were done using javascript and code modified from the Sankeymatic plotting website. I aggregated many of the survey output categories so as to make the graph legible, otherwise there’d be 4x as many spending categories and all very small and difficult to read.

household spending

Understanding Tax Brackets: Interactive Income Tax Visualization

Posted In: Money

How is your income distributed across tax brackets?

I previously made a graphical visualization of income and marginal tax rates. That graph tried to show alot of info on the same graph, i.e. the breakdown of income tax brackets for incomes ranging from $10,000 to $3,000,000. It was nice looking, but I think several people were confused about how to read the graph. This Sankey graph is a more detailed look at the tax breakdown for one specific income. You can enter your (or any other) profile and see how taxes are distributed across the different brackets. It can help (as the other tried) to better understand marginal and average tax rates. This tool only looks at US Federal Income taxes and ignores state, local and Social Security/Medicare taxes.

– Use this button to generate a URL that you can share a specific set of inputs and graphs. Just copy the URL in the address bar at the top of your browser (after pressing the button).

Instructions for using the visual tax calculator:

  • Select filing status: Single, Married Filing Jointly or Head of Household. For more info on these filing categories see the IRS website
  • Enter your regular income and capital gains income. Regular income is wage or employment income and is taxed at a higher rate than capital gains income. Capital gains income is typically investment income from the sale of stocks or dividends and taxed at a lower rate than regular income.
  • Move your cursor or click on the Sankey graph to select a specific link. This will give you more information about how income in a specific tax bracket is being taxed.
  • **Click Here to view other financial-related tools and data visualizations from engaging-data**

As seen with the marginal rates graph, there is a big difference in how regular income and capital gains are taxed. Capital gains are taxed at a lower rate and generally have larger bracket sizes. Generally, wealthier households earn a greater fraction of their income from capital gains and as a result of the lower tax rates on capital gains, these household pay a lower effective tax rate than those making an order of magnitude less in overall income.

Here are two tables that lists the marginal tax brackets in the United States in 2018 that form the basis of the calculations in the calculator. 2019’s numbers are pretty similar.

US Tax Brackets and Rates for 2018
Rate Single
Taxable Income Over
Married Filing Joint
Taxable Income Over
Heads of Households
Taxable Income Over
10% $0 $0 $0
12% $9,525 $19,050 $13,600
22% $38,700 $77,400 $51,800
24% $82,500 $165,000 $82,500
32% $157,500 $315,000 $157,500
35% $200,000 $400,000 $200,000
37% $500,000 $600,000 $500,000

You can see that tax rates are much lower for capital gains in the table below than for regular income (table above).

Capital Gains Brackets for 2018
Capital Gains Over
Married Filing Jointly
Capital Gains Over
Heads of Households
Capital Gains Over
0% $0 $0 $0
15% $38,700 $77,400 $51,850
20% $426,700 $480,050 $453,350

For those not visually inclined, here is a written description of how to apply marginal tax rates. The first thing to note is that the income shown here in the graphs is taxable income, which simply speaking is your gross income with deductions removed. The standard deduction for 2018 range from $12,000 for Single filers to $24,000 for Married filers.

  • If you are single, all of your regular taxable income between 0 and $9,525 is taxed at a 10% rate. This means that your all of your gross income below $12,000 is not taxed and your gross income between $12,000 and $21,525 is taxed at 10%.
  • If you have more income, you move up a marginal tax bracket. Any taxable income in excess of $9,525 but below $38,700 will be taxed at the 12% rate. It is important to note that not all of your income is taxed at the marginal rate, just the income between these amounts.
  • Income between $38,700 and $82,500 is taxed at 24% and so on until you have income over $500,000 and are in the 37% marginal tax rate . . .
  • Thus, different parts of your income are taxed at different rates and you can calculate an average or effective rate (which is shown in the summary table).
  • Capital gains income complicates things slightly as it is taxed after regular income. Thus any amount of capital gains taxes you make are taxed at a rate that corresponds to starting after you regular income. If you made $100,000 in regular income, and only $100 in capital gains income, that $100 dollars would be taxed at the 15% rate and not at the 0% rate, because the $100,000 in regular income pushes you into the 2nd marginal tax bracket for capital gains (between $38,700 and $426,700).

Data and Tools:
Tax brackets and rates were obtained from the IRS website and calculations were made using javascript and code modified from the Sankeymatic plotting website.

tax brackets visualization

College Admissions By State

Posted In: College


Most Stressed States

Posted In: Health

Long-term stress has been shown to be detrimental for your health. While it’s probably not possible to completely eliminate stress from people’s lives, there are many individual choices and decisions that can influence the amount of stress that people experience, including where they live, what job they have, their socio-economic conditions etc. . . One interesting bit of data analysis looks at an aggregate level to understand how stress differs from state to state depending on specific economic, demographic and other geographic factors.

This post shows a map of the most stressed states in the United States. The map is color coded from red (most stress) to blue (least stress) as a ranked list. Stress is divided into several categories including:

  • Work Stress is calculated from data on work hours, commute times, job security, unemployment rate, income growth and other metrics.
  • Money Stress is calculated from data on income, debt, credit scores, bankruptcy, housing affordability, poverty levels and other metrics.
  • Family Stress is calculated from data on divorce rates, single parents, childcare costs, parental leave policies and other metrics.
  • Health and Safety Stress is calculated from data on adult health, depression, mental health, health insurance, physical activity rate, crime rate, and other metrics. 

Click on the buttons below the map to switch between the different categories.

Data and tools: The data comes from Wallethub’s analysis of data from a wide range of sources including the US Census, BLS, CDC etc.. Unfortunately the data used is a ranked list rather than a set of scores. The ranking doesn’t tell you if a state is 10% more stressful or 10 times more stressful, just that one is higher than the other. Click the link for a full description of their methodology and data sources. The choropleth map was created using javascript to parse the data and the open source graphing library to visualize it.

Demographic Characteristics of US Voters (2016)

Posted In: Voting

If you need to register to vote, please visit Rock the Vote to get registered in your state.

US politics has more than a few issues, which have been highlighted by the current situation in Washington DC. The protests and greater political awareness from high school students and young adults is a positive sign for democracy, but it needs to be accompanied by increased rates of voting from this demographic. I thought it would be interesting to explore rates of voting in the US across different demographic groups (age, education, income, race). This data is from the 2016 US presidential election.

Total eligible US voting population was about 224 million in 2016 and the overall rate of voting among this population was 61.4%.

The first graph shows the distribution by age. As we can see, the rate of registration and voting increases with age. It is hard to engage young people to be interested in voting but hopefully they will do so in greater numbers this upcoming election.