Data visualization with SAS programming

Add water areas into US map

Frequent Contributor
Posts: 77

Add water areas into US map

I would like to know how to add water areas such as lakes, rivers into a US map.

An example:
SAS Employee
Posts: 170

Re: Add water areas into US map

First, you need a data source with the location information for the Lakes and the Rivers. The/Census Tiger files is one source of this information. The shapefiles are found at: You would need AREAWATER (lakes) and EDGES (rivers) data sets. I believe these are per county for each state, so you will need to download all that you are interested in. The number after the year in the filename is the FIPS code for the State and County.

Next, you can import the shapefiles into SAS with Proc MAPIMPORT. This will create a SAS data set.

After importing this data, you will need to subset only the information that you need. These datasets contain other feature information. The descriptions and definitions of the information can be found at Deciding what you want to see will be the hardest part.

Finally, after subsetting the data you need, you will need to create an annotate data set to use with Proc GMAP. Your code will need to do MOVE and DRAW annotate 'functions' to draw the points along the river or the areas of the lakes.

I have never actually done this with the rivers and lakes. I have done a similar thing to draw roads on a map from the census data and the process is similar. The road program is too large to publish here.

If you need further help. contact SAS Tech Support.
SAS Employee
Posts: 967

Re: Add water areas into US map

You'll probably use the 'move' and 'draw' annotate functions to draw the rivers (as lines), but you might want to use the 'poly' and 'polycont' annotate functions to draw the lakes as a polygon (for example, if you want to fill the lake polygon with a blue color).
Ask a Question
Discussion stats
  • 2 replies
  • 3 in conversation