"Over the river and through the woods, to grandmother's house we go" ... and how much should we expect to pay for gasoline during the trip? Read this blog to find out!
I recently wrote a blog post about some of the factors that impact the price of gasoline. The blog had some interesting information, but when it comes down to it what we really want to know is how much will we be paying for our next tank of gas!
You've probably got your favorite low-price gas station in your local city, but did you know that the prices vary widely from state to state? According to AAA, the state averages for regular grade gasoline range from $2.25 to $3.70 per gallon today! Therefore, if you're going to be driving on a long trip, you might be able to save some money by planning your route, or the timing of your fill-ups, so you're buying gas in one of the lower-priced states.
To analyze & visualize the data in SAS, I wrote a little program that reads in the HTML code of the AAA Web page, and parses out the state names and gasoline prices, and then plots the prices on a map, color coded by quintiles (each 1/5 of the states are a different color, based on their gasoline price):
The above map is great for quickly determining which states have higher and lower gasoline prices. But what about the 'impact' of those prices? I thought it would also be interesting to know how many people the high & low prices are affecting. For example, although Wyoming is a fairly large state geographically (and therefore has a lot of 'red' in the map above), the population is low, and therefore the high gasoline price in Wyoming doesn't affect many people.
In order to visually 'weight' the map by population, I plotted the data using a rectangular tree map, where the size of each rectangle represents the number of people in each state. Now it's easier to see, for example, that Texas has a low gasoline price (bright green), and also has a large population (large rectangle size).
Now that you've seen the data, what state do you plan to fill up in, while traveling over the holidays?