Data visualization with SAS programming

Add water areas into US map

Reply
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:
http://upload.wikimedia.org/wikipedia/commons/2/27/USA_Wisconsin_location_map.svg
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: ftp://ftp2.census.gov/geo/tiger/TIGER2010/. 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 http://www.census.gov/geo/www/tiger/tgrshp2010/documentation.html. 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: 980

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
  • 213 views
  • 2 likes
  • 3 in conversation