Top Banner
Producing Maps with Producing Maps with SAS Enterprise Guide SAS Enterprise Guide Harmon L. Jolley Harmon L. Jolley
29

Producing Maps with SAS Enterprise Guide Harmon L. Jolley.

Mar 28, 2015

Download

Documents

Elias Gilday
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Producing Maps with SAS Enterprise Guide Harmon L. Jolley.

Producing Maps with SAS Producing Maps with SAS Enterprise GuideEnterprise Guide

Harmon L. JolleyHarmon L. Jolley

Page 2: Producing Maps with SAS Enterprise Guide Harmon L. Jolley.

IntroductionIntroduction

SAS Enterprise Guide has a wizard (Graph|SAS Enterprise Guide has a wizard (Graph|Map) to plot data onto a map.Map) to plot data onto a map.

SAS/GRAPH is a required product for SAS/GRAPH is a required product for maps.maps.

SAS/GRAPH includes SAS datasets that SAS/GRAPH includes SAS datasets that contain geographic data such as ZIP and contain geographic data such as ZIP and FIPS codes. FIPS codes.

An important variable for mapping is An important variable for mapping is _MAP_GEOMETRY_._MAP_GEOMETRY_.

Page 3: Producing Maps with SAS Enterprise Guide Harmon L. Jolley.

Time to Digress for a Trivia Question:Time to Digress for a Trivia Question:

WhatWhat does the acronym ZIP stand for does the acronym ZIP stand for

In ZIP Code?In ZIP Code?

Page 4: Producing Maps with SAS Enterprise Guide Harmon L. Jolley.

Answer:Answer:

The Zone Improvement The Zone Improvement Plan of the early 1960’s Plan of the early 1960’s defined 5-digit postal defined 5-digit postal codes to replace 1-digit codes to replace 1-digit codes. codes.

Example: Example: Chattanooga 9, Tenn. Chattanooga 9, Tenn. became became Chattanooga, TN 37409Chattanooga, TN 37409

Mr. ZIP

Page 5: Producing Maps with SAS Enterprise Guide Harmon L. Jolley.

We now rejoin We now rejoin

the presentationthe presentation

that was in progress.that was in progress.

Page 6: Producing Maps with SAS Enterprise Guide Harmon L. Jolley.

Step 1 – Prepare DataStep 1 – Prepare Data

Identify appropriate map in the MAPS library.Identify appropriate map in the MAPS library. Select Data | Filter and Query from the SAS Select Data | Filter and Query from the SAS EG drop-down menu bar.EG drop-down menu bar. Select the analysis variable from your data.Select the analysis variable from your data. Select other variables of interest.Select other variables of interest. Join your data to MAPS dataset(s).Join your data to MAPS dataset(s). Filter the data to achieve result.Filter the data to achieve result.

Page 7: Producing Maps with SAS Enterprise Guide Harmon L. Jolley.

Step 1 – ExampleStep 1 – ExampleIn the following example, the Prepare Data In the following example, the Prepare Data process flow was created by using Data | process flow was created by using Data | Filter and Query.Filter and Query.

The input datasets (USCITY, US2, and The input datasets (USCITY, US2, and CNTYNAME) are found in the standard CNTYNAME) are found in the standard MAPS library of SAS/GRAPH.MAPS library of SAS/GRAPH.

The input datasets in the example provide The input datasets in the example provide both the analysis variable (POP or population) both the analysis variable (POP or population) and the geocoding variable and the geocoding variable _MAP_GEOMETRY_. _MAP_GEOMETRY_.

There are three SAS datasets joined, but no There are three SAS datasets joined, but no Filter or Sorting.Filter or Sorting.

Page 8: Producing Maps with SAS Enterprise Guide Harmon L. Jolley.
Page 9: Producing Maps with SAS Enterprise Guide Harmon L. Jolley.
Page 10: Producing Maps with SAS Enterprise Guide Harmon L. Jolley.
Page 11: Producing Maps with SAS Enterprise Guide Harmon L. Jolley.

Step 2 – Produce MapStep 2 – Produce Map

Select Map | Graph from the SAS EG Select Map | Graph from the SAS EG drop-down menu bar.drop-down menu bar. Select the type of map.Select the type of map. Assign the analysis variable to Column to Assign the analysis variable to Column to Chart. Chart. Review the Appearance and Title section, Review the Appearance and Title section, and make changes as needed.and make changes as needed.

Page 12: Producing Maps with SAS Enterprise Guide Harmon L. Jolley.

Step 2 – ExampleStep 2 – Example

In the next process flow of the example, a In the next process flow of the example, a United States map was produced to show United States map was produced to show population levels by state.population levels by state.

Under Graph | Map, a 2d choropleth map was Under Graph | Map, a 2d choropleth map was selected. selected.

The population is assigned to the role Column The population is assigned to the role Column to Chart, and the _MAP_GEOMETRY_ to Chart, and the _MAP_GEOMETRY_ variable is assigned to map geometry.variable is assigned to map geometry.

Page 13: Producing Maps with SAS Enterprise Guide Harmon L. Jolley.
Page 14: Producing Maps with SAS Enterprise Guide Harmon L. Jolley.
Page 15: Producing Maps with SAS Enterprise Guide Harmon L. Jolley.
Page 16: Producing Maps with SAS Enterprise Guide Harmon L. Jolley.
Page 17: Producing Maps with SAS Enterprise Guide Harmon L. Jolley.

Step 2 – ExampleStep 2 – Example

The following State View process flow allows The following State View process flow allows the user to select a state, then display a map the user to select a state, then display a map of that state’s data.of that state’s data.

The selection function was constructed using The selection function was constructed using the Parameters of SAS EG.the Parameters of SAS EG.

Page 18: Producing Maps with SAS Enterprise Guide Harmon L. Jolley.
Page 19: Producing Maps with SAS Enterprise Guide Harmon L. Jolley.
Page 20: Producing Maps with SAS Enterprise Guide Harmon L. Jolley.
Page 21: Producing Maps with SAS Enterprise Guide Harmon L. Jolley.
Page 22: Producing Maps with SAS Enterprise Guide Harmon L. Jolley.
Page 23: Producing Maps with SAS Enterprise Guide Harmon L. Jolley.

Step 3 – Enhance ResultsStep 3 – Enhance ResultsYou can create a Code object, then edit to You can create a Code object, then edit to add SAS/GRAPH code to add functions not add SAS/GRAPH code to add functions not supported in the SAS EG map wizard. supported in the SAS EG map wizard.

Right-click on the Map object, then select Add Right-click on the Map object, then select Add as Code Template.as Code Template.

Page 24: Producing Maps with SAS Enterprise Guide Harmon L. Jolley.
Page 25: Producing Maps with SAS Enterprise Guide Harmon L. Jolley.
Page 26: Producing Maps with SAS Enterprise Guide Harmon L. Jolley.

Step 4 – Publish ResultsStep 4 – Publish Results

SAS EG has many formats available in the SAS EG has many formats available in the Export function.Export function.

PDF and HTML are good choices for maps.PDF and HTML are good choices for maps.

Page 27: Producing Maps with SAS Enterprise Guide Harmon L. Jolley.

Step 4 – Publish ResultsStep 4 – Publish Results

SAS EG has many formats available in the SAS EG has many formats available in the Export function.Export function.

PDF and HTML are good choices for maps.PDF and HTML are good choices for maps.

Page 28: Producing Maps with SAS Enterprise Guide Harmon L. Jolley.

Right-click on the Map object, then Properties | Results to set the Report Format.

Page 29: Producing Maps with SAS Enterprise Guide Harmon L. Jolley.

Contact InformationContact Information

Harmon JolleyHarmon Jolley

[email protected]@bellsouth.net