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.
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.
I will use Visio to generate the chart. I have done similar charts in two other posts:
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.
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).
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%.