As we're in the thick of hurricane season, I'm sure some of my fellow map-makers are wanting to create their own custom hurricane maps. In this blog post, I step you through the process, so you'll know where to find all the pieces, and how to put them together. I demonstrate using SAS software, but the same concepts can be applied to most any mapping software.

Before we get started, here's a picture to get you into the mood for hurricanes... Here's a wicket sky pic my friend Paula took at Ocracoke (one of the barrier islands off the NC coast), as Hurricane Dorian approached. The island was evacuated a short time after she took the photo! (Do you think this picture is beautiful, or scary?)

Hurricane Data

Hurricane Dorian is bearing down on the U.S. East Coast as we speak, therefore I'll use that as the data for my example. I went to the NOAA gis data download page, and found the Shapefile(s) for Dorian's cone of uncertainty, and forecast track.

I downloaded and extracted the zip file. Here's a list of all the files in the download - I'm particularly interested in the polygon (pgn) and line (lin) shapefiles.

I used the following code to import the polygon shapefile for the cone of uncertainty, and rename the X and Y variables to long and lat.

proc mapimport

datafile='dorian_shapefile/al052019-040_5day_pgn.shp'

out=cone;

id stormname;

run;

data cone; set cone (rename=(x=long y=lat));

run;

Checking the Data

I then used Proc SGplot to draw the polygon, as a quick sanity-check. (Yep - it's looking good!)

proc sgplot data=cone;

polygon y=lat x=long id=stormname;

run;

Plotting on a Map

It's all well & good to see the polygon for the cone of uncertainty plotted, but unless you have uncanny spatial perception of raw latitude and longitude values, you probably still don't know exactly where (in relation to the U.S. East Coast) Hurricane Dorian is forecast to go. New features in Proc SGmap make it easy to overlay the polygon data on a map, so let's do that!

proc sgmap mapdata=cone noautolegend;

esrimap url="http://services.arcgisonline.com/arcgis/rest/services/NatGeo_World_Map";

choromap / mapid=stormname lineattrs=(color=orange thickness=4px);

run;

The above example draws the cone of uncertainty as an empty polygon, but the choropleth map can also fill in the polygon with color - or more specifically, transparent color. You have to supply some response data for that to happen. I just make up some bogus response data to use.

data cone_attr;

stormname='Dorian';

colorvar='foo';

run;

proc sgmap mapdata=cone maprespdata=cone_attr noautolegend;

esrimap url="http://services.arcgisonline.com/arcgis/rest/services/NatGeo_World_Map";

choromap colorvar / mapid=stormname lineattrs=(color=orange thickness=4px) transparency=.7;

run;

Many of the hurricane forecast maps also show a line and markers in the middle of the cone, therefore let's add that. I import the line (_lin) shapefile, and overlay a series plot of this data on the map to represent the line. And I overlay a scatter plot to represent the markers.

proc mapimport

datafile='dorian_shapefile/al052019-040_5day_lin.shp'

out=line;

id stormname;

run;

data line; set line (rename=(x=long y=lat));

run;

proc sgmap mapdata=cone maprespdata=cone_attr plotdata=line noautolegend;

esrimap url="http://services.arcgisonline.com/arcgis/rest/services/NatGeo_World_Map";

choromap colorvar / mapid=stormname lineattrs=(color=orange thickness=4px) transparency=.7;

series x=long y=lat / lineattrs=(color=firebrick thickness=1px) smoothconnect;

scatter x=long y=lat / markerattrs=(color=firebrick size=20px symbol=circlefilled) transparency=.5;

run;

Finishing Touches

I've now got the map just about the way I want it ... except I would rather it also show a little more of the Bahamas and Florida Keys in the background map. By default, the amount of map shown is automatically chosen, based on the polygon/marker/line data being plotted on the map. One way to show more of the background map is to add a scatter plot marker in the area you want to also show on the map, and make it small/invisible.

data corners;

long_corner=-83.0; lat_corner=24.5; output;

run;

data plot_all; set line corners;

run;

proc sgmap mapdata=cone maprespdata=cone_attr plotdata=plot_all noautolegend;

esrimap url="http://services.arcgisonline.com/arcgis/rest/services/NatGeo_World_Map";

choromap colorvar / mapid=stormname lineattrs=(color=orange thickness=4px) transparency=.7;

series x=long y=lat / lineattrs=(color=firebrick thickness=1px) smoothconnect;

scatter x=long y=lat / markerattrs=(color=firebrick size=20px symbol=circlefilled) transparency=.5;

scatter x=long_corner y=lat_corner / markerattrs=(size=1px) transparency=1;

run;

Now that you know a few tricks about working with hurricane data, what ideas do you have for creating your own custom hurricane maps? Feel free to share them in the comments!

Hurricane Dorian: I'm going to Jacksonville.

U.S. Southeast coast: Jacksonville Florida or Jacksonville North Carolina?

Hurricane Dorian: Yes.

Here's a picture (from my friend Raven) of Dorian sliding past Jacksonville. Can you tell which Jacksonville? 🙂