State GDPs Relative to National GDPs

Quote of the Day

The only thing that holds you back from getting what you want is paying attention to what you don’t want.

— Abraham-Hicks


Introduction

Figure 1: US State GDPs Compared to Country GDPs.

Figure 1: US State GDPs Compared to Country
GDPs (Source). All data is from 2012.

I am amazed at all the different lists on the Wikipedia. Today, I came across a list of all the US state GDPs and a map (Figure 1) that shows how the state GDPs compare to the GDPs of various nations. I have to admit that I think this is a very interesting chart.

My interest are motivated by  some recent online courses I have taken on databases, web scraping, and dashboards. I now have some skills that I want to practice. Let's see if we can reconstruct this map using data from the Wikipedia.  The chart in Figure 1 is based on 2012 GDP data. Since my analysis will be based on 2015 state data and 2014 national GDP data, I expect that my chart will be a bit different than Figure 1. By its very nature, this comparison is approximate.

Background

Approach

I will use Visio to generate the chart. I have done similar charts in two other posts:

  • The Yearly Cost of Running Networking Gear (Link)
  • Customer Service Math (Link)

I will scrape tables for state and national GDPs from the Wikipedia for analysis in Excel. I will use Excel to determine which nations have GDPs closest to the states. I will then link my list of state and matching national GDPs to a US map that I use all the time in Visio.

Analysis

Figure 2 shows my version of Wikipedia's chart (Figure 1). The easiest way to understand what I did is to look at the Excel and Visio files (source). I was impressed with how well I was able to find matching national GDP values. The maximum matching error was 10%, with many errors under 2% (Appendix A).

Figure 2: My State GDP Map with Comparable National GDPs.

Figure 2: My State GDP Map with Comparable National GDPs.

Conclusion

This is an interesting way to look at the size of the various state economies. I must admit that I was surprised to see that the economy of California is approximately the same size Brazil's economy.

Appendix A: Matching Quality

National and state GDPs will never match exactly. I plot the errors in Figure 3. The largest error occurred between Oklahoma and Bangladesh at 10%.

Figure 3: Matching Errors.

Figure 3: Matching Errors.

This entry was posted in software. Bookmark the permalink.

2 Responses to State GDPs Relative to National GDPs

  1. Randy says:

    Is there a key for the color labeling? I'm not seeing a pattern. Does Visio provide for a programmatic assignment of color in a map? Thanks! Love the blog!

    • mathscinotes says:

      The state colors? Yes, Visio allows you to programmatically assign the colors. I used that feature in my "Customer Service Math" post.

      The color assignments go back a long time, and I have simply kept them. The state groupings were defined by the US Energy Information Agency (e.g. North Central, Mountain West, etc). I arbitrarily assigned colors to each state that reflected how EIA had done the grouping. I have just continued to use the same naming convention over the years.

      mathscinotes

Comments are closed.