Summer is winding down, and cooler fall weather is just around the corner. You might soon be able to take a pleasant drive with the windows down, while enjoying the scenery. But where should you go? What are the most scenic roads for that drive? Read along to see a list of the most scenic drive in each state, and see how I develop a more intuitive way to present that list!
But first, here's a picture to get you into the mood for this topic. This picture is from my recently-retired buddy Dennis. He recently went to the Woodward Dream Cruise, where there were over 80,000 special / classic / custom / etc vehicles, and over 1,000,000 spectators admiring them. Wouldn't it be awesome to cruise down a scenic highway in a cool vehicle like this?!?
I originally came across this topic in an article titled Most Scenic Drive in All 50 States. They presented their data in a text list, sorted by state name. They had a picture for each state (but sometimes it was difficult to tell whether the picture above, or below, went with the description). Also, I didn't get a good sense of how near or far these scenic drives were from me, or where I might be visiting/working. Therefore I thought I would try creating a visualization to help present the data in a more useful and informative way.
Getting the Data
The first step was getting the data. I copy-n-pasted the data for each state into an Excel spreadsheet, and imported it into SAS. Below is what the data looked like:
proc import out=my_data datafile="most_scenic_drive.xls" dbms=xls replace;
Cleaning the Data
The data is fairly clean, but if you look closely (circled in red above), you'll see that the apostrophe in "Colorado's" came through as a non-printable character. Perhaps they used a non-standard character in their article, or perhaps something corrupted it when I copy-n-pasted it into the Excel spreadsheet, or perhaps something went amiss when importing it from the spreadsheet into SAS.
Whatever the cause, we can fix it after-the-fact! But we need to know exactly what character it is, so we can change it to a standard apostrophe. The technique I like to use is printing the character data with the $hex format, to find the 2-digit hex code for the character. The bad character is the 9th character in the Colorado description, therefore I can print the first 18 hex digits of the description variable (that's 2 hex digits per letter), and the last 2 hex digits will be the one I want to change.
proc print data=my_data noobs;
var state_name highway_name description;
format description $HEX18.;
Now that I know the bad character is hex code '19'x, I can use the SAS translate() function in a data step to change it to a regular apostrophe.
data my_data; set my_data;
Plotting the Data
Now that I have the data in SAS, it's a simple matter of using Proc GMap to draw a map, and the html= option to enable mouse-over text and drill-downs. The mouse-over text shows the description, and the drill-down launches a Google image search for each state's scenic drive name. Here's how I encoded the information for the mouse-over text and the drill-downs, into a variable called my_html, that I could use with the html= option. Notice the HTML title= and href= tags.
Below is a screen-capture of the map showing an example of the mouse-over text, and a google image search link (URL shown in the bottom edge of the map) - click the map to see the interactive version.
Putting it to use
Remember the Woodward Dream Cruise picture I showed you at the beginning of the blog post? Now, use map above to try to find which state the famous Woodward Avenue is located in. (No cheating!)
And, to reward those of you who stuck with me until the very end of the blog post - here is a very cool picture from my friend Margie. This is Margie's mom, on her honeymoon in 1961 ... on Skyline Drive. (Can you use the map to find which state Skyline Drive is in?)
What's your favorite scenic drive (in the US, or other country)? Feel free to share in the comments!
If you'd like to see all the details, here's a link to the full SAS code.