Posts for Tag: demographics

Assembling the USA state-by-state with state-level statistics

Posted In: Maps
Facebooktwittergoogle_plusredditpinterestlinkedinmail

Watch the United States assemble state by state based on statistics of interest

Based on earlier popularity of the country-by-country animation, this map lets you watch as the world is built-up one state at a time. This can be done along a large range of statistical dimensions:

  • Name (alphabetical)
  • abbreviation
  • Date of entry to the United States
  • State Population (2018)
  • Population per Electoral Vote (2018)
  • Population per House Seat (2018)
  • Land Area (square miles)
  • Population Density (ppl per sq mi) (2018)
  • State’s Highest Point
  • Highest Elevation (ft)
  • Mean Elevation (ft)
  • State’s Lowest Point
  • Lowest Point (ft)
  • Life Expectancy at Birth (yrs)
  • Median Age (yrs)
  • Percent with High School Education
  • Percent with Bachelor’s Degree
  • Residential Electricity Price (cents per kWh) (2018)
  • Gasoline Price ($/gal) Regular unleaded (2019)
  • State Gross Domestic Product GDP ($Million) (2018)
  • GDP per capita ($/capita)
  • Number of Counties (or subdivisions)
  • Average Daily Solar Radiation (kWh/m2)
  • Birth rate (per thousand population)
  • Avg Age of Mother at Birth
  • Annual Precipitation (in/yr)
  • Average Temperature (deg F)
  • These statistics can be sorted from small to large or vice versa to get a view of the US and its constituent states plus DC in a unique and interesting way. It’s a bit hypnotic to watch as the states appear and add to the country one by one.

    You can use this map to display all the states that have higher life expectancy than the Texas:
    select “Life expectancy”, sort from “high to low” and use the scroll bar to move to the Texax and you’ll get a picture like this:
    States with higher life expectancy than Texas

    or this map to display all the states that have higher population density than California:
    select “Population density, sort from “high to low” and use the scroll bar to move to the United States and you’ll get a picture like this:
    States with higher population density than California

    I hope you enjoy exploring the United States through a number of different demographic, economic and physical characteristics through this data viz tool. And if you have ideas for other statistics to add, I will try to do so.

    Data and tools: Data was downloaded from a variety of sources:

    • Population https://en.wikipedia.org/wiki/List_of_states_and_territories_of_the_United_States_by_population
    • Admission to union https://simple.wikipedia.org/wiki/List_of_U.S._states_by_date_of_admission_to_the_Union
    • Educational attainment https://nces.ed.gov/programs/digest/d18/tables/dt18_104.88.asp
    • Highest points https://geology.com/state-high-points.shtml
    • Life expectancy https://en.wikipedia.org/wiki/List_of_U.S._states_and_territories_by_life_expectancy
    • Median Age http://www.statemaster.com/graph/peo_med_age-people-median-age
    • Land area https://statesymbolsusa.org/symbol-official-item/national-us/uncategorized/states-size
    • Mean elevation https://www.census.gov/library/publications/2011/compendia/statab/131ed/geography-environment.html
    • Electricity price https://www.chooseenergy.com/electricity-rates-by-state/
    • Gasoline price https://gasprices.aaa.com/state-gas-price-averages/
    • GDP https://www.bea.gov/data/gdp/gdp-state
    • Sunlight North America Land Data Assimilation System (NLDAS) Daily Sunlight (insolation) for years 1979-2011 on CDC WONDER Online Database, released 2013. Accessed at http://wonder.cdc.gov/NASA-INSOLAR.html on Jun 14, 2019 1:37:15 PM
    • Births United States Department of Health and Human Services (US DHHS), Centers for Disease Control and Prevention (CDC), National Center for Health Statistics (NCHS), Division of Vital Statistics, Natality public-use data 2007-2017, on CDC WONDER Online Database, October 2018. Accessed at http://wonder.cdc.gov/natality-current.html on Jun 14, 2019 1:53:58 PM
    • Precipitation North America Land Data Assimilation System (NLDAS) Daily Precipitation for years 1979-2011 on CDC WONDER Online Database, released 2013. Accessed at http://wonder.cdc.gov/NASA-Precipitation.html on Jun 26, 2019 3:30:40 PM
    • Temperature http://www.usa.com/rank/us–average-temperature–state-rank.htm

    The map was created with the help of the open source leaflet javascript mapping library

    How do Americans Spend Money? US Household Spending Breakdown by Education Level

    Posted In: Money
    Facebooktwittergoogle_plusredditpinterestlinkedinmail
    How much do US households spend and how does it change with education level?

    This visualization is one of a series of visualizations that present US household spending data from the US Bureau of Labor Statistics. This one looks at the education level of the primary resident.

    This visualization focuses on the education level of the primary resident. This is defined in the BLS documentation as the person who is first mentioned when the survey respondent is asked who in the household rents or owns the home.

    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.

    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.

    Instructions:

    • 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 the education level of the primary resident. This data breaks households into the following groups:
      • All
      • Less than HS graduate
      • High school graduate
      • HS grad + some college
      • Associate’s degree
      • Bachelor’s degree
      • Master’s, professional, doctoral degree

      The composition of households and income change as the education level of the primary resident changes, which in turn affects spending totals and individual categories.

    As stated before, one of the keys to financial security is spending less than your income. We can see that on average, income tends to increase with education level. Those with the highest incomes and greatest spending have advanced degrees, but they also save the most money.

    The group with the lowest education level (not finishing high school) have the lowest income and on average needs to borrow or draw down on savings to live their lifestyle.

    How does your overall spending compare with those that have the same education level as you? 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 also make a table or pie chart (Honestly, whatever gets you to look at your income and expenses is a good thing).

    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

    How Much Does Each State Pay In Taxes?

    Posted In: Money
    Facebooktwittergoogle_plusredditpinterestlinkedinmail

    Given that tax day has just passed, I thought it would be good to check out some data on taxes. The IRS provides a great resource on tax data that I’ve only just gotten into. I think I’ll be able to do more with this in the future. This one looks at how taxes paid varies by state and presents it as a choropleth map (coloring states based on certain categories of tax data).

    You can choose from a number of different categories:

    • Mean Federal Tax Paid
    • Mean Adjusted Gross Income
    • Mean State/Local Tax
    • Mean Combined (Fed/State/Local) Tax
    • Percent Income from Dividends and Capital Gains
    • Percent of Returns with Itemized Deductions
    • Number of Tax Returns
    • Mean Federal Tax Rate
    • Mean State/Local Tax Rate
    • Mean Combined (Fed/State/Local) Rate
    • Total Federal Tax Liability

    I may add more categories in the future, so if you have ideas of tax data you want to see visualized let me know and I’ll see what I can do.

    For other tax-related tools and visualizations see my tax bracket calculator and visualization of marginal tax rates.

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

    Data and Tools:

    Data on tax returns by state is from the IRS website in an excel format. The map was made using the leaflet open source mapping library. Data was compiled in excel and calculations made using javascript.

    How much each state paid in taxes

    Scaling the physical size of States in the US to reflect population size (animation)

    Posted In: Maps
    Facebooktwittergoogle_plusredditpinterestlinkedinmail
    States sized to New Jersey’s population density


    Choropleth maps are a pretty useful kind of map that colors distinct areas of the map (e.g. states, counties or countries) to reflect different numerical or categorical values. It is useful to show differences across geographic regions. I’ve been making a bunch of these recently (stressed states, bitcoin electricity consumption, college admissions). One of the issues that can be problematic with these maps is that some regions can be very large but only have very few people. If the choropleth map is tracking a intensity value (like CO2 emissions per capita), a large area with a high color value might visually indicate that total emissions (emissions per capita x # of people) is also high. In the US this is reflected in states like Alaska, Montana and Wyoming, which are large but have very few people.

    I decided to make a modified choropleth map (updated after learning that it’s called a cartogram) that scales the size of the states to be the proportional to the state’s population. States with larger populations show up as larger. This is equivalent to making each state have the same population density. Since New Jersey has the highest population density of any state in the US (1200 people/square mile), it stays the same size in this map and all the other states shrink, to reflect their lower population density. For example, California has a larger population than NJ (4.4x), but its physical size is about 20x larger. So California is shrunk to about 20% its original size to make its physical size 4.4x the size of NJ.

    The states are also colored to show population as well (darker redder colors reflect larger population while yellow/beige reflects small populations).

    States sized to California’s population density

    Living in California, I decided to make another animation, this time with scaled to the density of California, so some states that are less dense will shrink, while others that are denser will grow. New Jersey grows quite a bit. Because many of the dense Northeast states grow a bit, I had to space them out (manually) so you could still see them otherwise they’d overlap too much.

    Data Sources and Tools:
    2015 population and population density data comes from Wikipedia and leaflet.js open source mapping library was used to create the maps. State outlines in geoJSON format come from leaflet. Javascript code was used to scale the coordinates of the geoJSON polygons to the appropriate size and animate the map.

    state size scaled by population

    Post-Retirement Calculator: Will My Money Survive Early Retirement? Visualizing Longevity Risk

    Posted In: Financial Independence | Money
    Facebooktwittergoogle_plusredditpinterestlinkedinmail


    I added a simple spending flexibility parameter that allows you to specify how much you could reduce spending when your portfolio is below a certain threshold (in this case, your original retirement amount (inflation adjusted)).

    Rich, Broke or Dead?

    One of the key issues with retiring is the question of outliving your money. This is also known as Longevity Risk and is especially important if you want to retire early, since your retirement could be 50 years long (or more). This interactive post-retirement calculation and visualization looks at the question of whether your retirement savings can last long enough to support your retirement spending and combines it with average US life expectancy values to get a fuller picture of the likelihood of running out of money before you die.

    It helps to answer the question: If I start out with $X dollars at the beginning of my retirement, will I run out of money before I die?

    (more…)

    Demographic Characteristics of US Voters (2016)

    Posted In: Voting
    Facebooktwittergoogle_plusredditpinterestlinkedinmail

    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.

    (more…)