Posts for Tag: choropleth

What kinds of vehicles do Americans drive?

Posted In: Energy
Facebooktwittergoogle_plusredditpinterestlinkedinmail

Americans are known for loving cars and driving quite a bit. Drivers in the United States own more cars and drive more than those in any other country. So what kinds of vehicles do Americans drive? This visualization looks at the types of vehicles (by body type and country of origin) across the 50 States and Washington DC.

You can view two different attributes about the types of vehicles in use in the United States:

  • Body type of passenger vehicles
  • Manufacturer/Brand region of origin

The different categories of passenger vehicles include:

  • Cars – includes sedans, hatchbacks, wagons and sports cars
  • Pickup trucks
  • SUVs
  • Vans – includes Minivans and full-size vans

Classification of the vehicles manufacturer (US, Asia or Europe) is based on the company’s headquarters and not the place of vehicle manufacturing. So a Toyota here is an Asian vehicle even if it was assembled in Mississippi.

It is pretty interesting to see the regional differences in vehicle types (cars vs trucks and SUVs) and vehicle brand (domestic vs foreign). Michigan, especially, stands out with their very high domestic ownership. It makes sense as Detroit is the home of the big three US auto manufacturers (Ford, GM and Chrysler). And I hear there’s a very strong culture of owning American cars there (and employee, friends and family discounts as well).

The data is derived from a survey by the US Department of Transportation called the National Household Travel Survey (NHTS) released in 2017. The following is a quote from the NHTS webpage:

The National Household Travel Survey (NHTS) is the source of the Nation’s information about travel by U.S. residents in all 50 States and Washington, DC. This inventory of travel behavior includes trips made by all modes of travel (i.e., private vehicle, public transportation, pedestrian, and cycling) and for all purposes (e.g., travel to work, school, recreation, and personal/family trips). It provides information to assist transportation planners and policymakers who need comprehensive data on travel and transportation patterns in the United States.

Data and Tools:
Data, as stated before, comes from the US Department of Transportation’s National Household Travel Survey (NHTS). That data was processed to identify vehicle characteristics by state and plotted using javascript and the open-source leaflet map library.

car types by state

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

Code Embed: Cannot use CODECSSresize9 as a global code as it is being used to store 2 unique pieces of code in 3 posts

Electric Vehicle Sales By State

Posted In: Energy | Technology
Facebooktwittergoogle_plusredditpinterestlinkedinmail

Where are electric vehicles being sold in the United States?



Electric vehicles are any vehicle that can be plugged in to recharge a battery that provides power to move the vehicle. Two broad classes are battery electric vehicles (BEVs) which only have batteries as their power source and plug-in hybrid electric vehicles (PHEVs) which have an alternative or parallel power source, typically a gasoline engine. PHEVs are built so that when the battery is depleted, the car can still run on gasoline and operate like a hybrid vehicle similar to a regular Toyota Prius (which is not plugged in at all).

Electric vehicles (EVs) have been sold in the US since 2011 (a few commercial models were sold previous to that but not in any significant numbers) and some conversions were also available. Since then, the number of EVs sold has increased pretty significantly. I wanted to look at the distribution of where those vehicles were located. What is interesting is that California accounts for around 50% of the electric vehicles sold in the United States. Other states have lower rates of EV adoption (in some cases much, much lower). There are many reasons for this, including beneficial policies, public awareness, a large number of potential early adopters and a mild climate. Even so, the EV heatmap of California done early shows that sales are mostly limited to the Bay Area, and LA areas.

The map shows data for total electric vehicle sales by state for years 2016, 2017 or 2018 and also the number of EV sales per 1000 licensed drivers (this is all people in the state with a drivers license, not drivers of EVs). If you hover over a state, you can see both data points for that state.

It will be interesting to see how the next generation of electric vehicles continues to improve, lower in price and become more popular with drivers outside of early adopters.

Data and Tools:
Data on electric vehicle sales is from the Auto Alliance website. Licensed driver data was downloaded from the US Department of Transportation’s Bureau of Transportation Statistics website. The map was made using the leaflet open source mapping library. Data was compiled and calculated using javascript.

Electric vehicle sales by state

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

College Admissions By State

Posted In: College
Facebooktwittergoogle_plusredditpinterestlinkedinmail



(more…)

Current Bay Area Air Quality

Posted In: Environment | Health
Facebooktwittergoogle_plusredditpinterestlinkedinmail

Fires are once again raging in California and air quality in one of the most populated metropolitan areas in the country (the San Francisco Bay Area) is quite poor. This map show current air quality in the Bay Area. For more information see the EPA’s Air Quality website.

AQI colors

EPA has assigned a specific color to each AQI category to make it easier for people to understand quickly whether air pollution is reaching unhealthy levels in their communities. For example, the color orange means that conditions are "unhealthy for sensitive groups," while red means that conditions may be "unhealthy for everyone," and so on.

Air Quality Index
Levels of Health Concern
Numerical
Value
Meaning
Good 0 to 50 Air quality is considered satisfactory, and air pollution poses little or no risk.
Moderate 51 to 100 Air quality is acceptable; however, for some pollutants there may be a moderate health concern for a very small number of people who are unusually sensitive to air pollution.
Unhealthy for Sensitive Groups 101 to 150 Members of sensitive groups may experience health effects. The general public is not likely to be affected.
Unhealthy 151 to 200 Everyone may begin to experience health effects; members of sensitive groups may experience more serious health effects.
Very Unhealthy 201 to 300 Health alert: everyone may experience more serious health effects.
Hazardous 301 to 500 Health warnings of emergency conditions. The entire population is more likely to be affected.

For more information and additional maps see the EPA’s Air Quality website.