The ATLAS files are raw data coordinates, along with Census Tract identifying numbers, but some processing is necessary before SAS (or any other software) can make a map from these coordinate numbers.
To see a list of the ATLAS files, enter the following command in an RCF UNIX session:
ls ~datastor/census/atlas90
or visit the following Web page:
www-rcf.usc.edu/~datastor/census/atlas90/
Each file is named with the format ATLAS90.xxxT,
where "xxx"
is a three-character abbreviation of the county represented in that
file.
For example, ATLAS90.LOST (!) is the file for Los Angeles County.
In addition, the census/atlas90 directory has two files pertinent to the Atlas files and Census Tract boundaries in general. CT708090.CORRESP contains details about the changes in Census Tract boundaries over the last three censuses. CT708090.DATA contains aggregated raw data such as total population, population by certain ethnicities, population by age categories, marital status and so forth. NOTE: all the file names in the census/atlas90 directory are UPPER CASE as shown in the examples, while the directory itself remains lower case.
The VKC (Applied Social Sciences) Library has a 10-page "code book" that outlines the contents of all the ATLAS90 files.
Each ATLAS file contains X and Y map coordinates for each Census Tract
in the county, beginning with a "title line" that
contains the State, County and Census Tract numbers and other
information.
As an illustration, the first few lines of
data in ATLAS90.LOST for Census Tract 1011 look like:
"060371011.00",91
-118.302500,34.273900
-118.301500,34.274200
-118.301083,34.274425
-118.300200,34.274900
-118.298900,34.275200
-118.298600,34.275400
(etc.)
06), the County Code
(037), and the Census Tract number
(1011.00), followed (after the last double quote)
by a number representing the number of coordinates listed
for that tract.
Each line after the "title line" contains two
numbers, separated by a comma.
These are the X and Y coordinates for drawing the
boundaries for that particular Census Tract.ITS provides a sample program for reading in the Atlas coordinate data and mapping the Census Tracts using SAS/GRAPH. The same SAS data set created in this program can be imported into SAS/GIS as a GENPOLY (Generic POLYgon) file. The complete sample program is in:
http://www.usc.edu/its/doc/statistics/help/census/programs/atlasmap1.sas
and the elements of that program are explained here.
The graph that results from the program can be viewed at:
http://www.usc.edu/its/doc/statistics/help/census/miscellaneous/atlas.gif
Reading the Coordinates into a SAS Data Set.
The sample program makes a "permanent" SAS data set
in the /tmp area, as shown in the following
LIBNAME statement.
This can be specified anywhere you like, or you can use
temporary SAS data sets for this operation, if you prefer.
The raw data are stored on the RCF, and are specified in the sample
program using the following FILENAME statement:
libname atlasdta '/tmp/';
filename inatlas '~userserv/public_html/census/atlas90/ATLAS90.LOST';
The first step in mapping the coordinates found in the ATLAS files is to create a SAS data set with the following variables:
TRACT X Y
Although the STATE, COUNTY and COORDNUM variables are not necessary for basic maps, since they are present in the data, they are read in by this sample program.
/*** THESE FIRST LINES GIVE SAS THE LIST OF DESIRED TRACTS ***/
%let traclist=%str(
2218,2219,2226,2227,2246,2247,2311,2312
);
/*** THIS IS THE MAIN DATA STEP TO CREATE THE SAS DATA SET ***/
data atlasdta.atlas1; infile inatlas; keep tract coordnum x y;
retain state county tract coordnum;
input @1 test $1. @;
if test='"' then do; state=.; county=.; tract=.; coordnum=.;
input @2 state 2. @4 county 3. @7 tract 4. @16 coordnum 2.; end;
else input @1 x 11. @13 y;
format x y 12.6;
if x=. and y=. then delete;
if tract in (&traclist.);
In the program above, the list of Census Tract numbers is assigned
to a "symbolic variable" called traclist
in the %LET statement, and then used in the later
IF statement as &traclist.
Annotating the Map with Customized Labels. The use of Annotate data sets in SAS/GRAPH is a difficult, but ultimately rewarding process, as it allows nearly complete flexibility in labeling a graph to your specifications. The sample program contains an annotate data set that adds labels to the map, but since using the Annotate facility is relatively complex, the details are left to the SAS/GRAPH documentation, which you should consult if you are interested.
The annotations used in the sample program for this particular map places the text 'USC Campus', a palm-tree symbol, and the Census-Tract numbers in the appropriate places on the map surface. The SAS code for the Annotate DATA step looks like this:
data atanno; length text $ 9 hsys xsys ysys $ 1;
input style $ hsys $ xsys $ ysys $ function $ text $ x y size;
cards;
cartog 1 1 1 label L 45 50 6
centb 1 1 1 label USC 45 45 4
centb 1 1 1 label Campus 44 40 4
centb 1 1 1 label 2218 29 91 4
centb 1 1 1 label 2219 29 75 4
centb 1 1 1 label 2226 12 52 4
centb 1 1 1 label 2227 34 53 4
centb 1 1 1 label 2246 79 54 4
centb 1 1 1 label 2247 56 73 4
centb 1 1 1 label 2312 25 17 4
centb 1 1 1 label 2311 64 23 4
;
Once the Annotate data set (ATANNO) is created, it is then
referenced using the ANNO= option of the
PROC GMAP statement, as shown in the next
section.Creating the Map of the Census Tracts. You are now ready to create the map itself. This is done with a PROC GMAP statement with an appropriate CHORO statement, as shown in the following portion of the sample program:
pattern1 value=mempty repeat=5000;
proc gmap map=atlasdta.atlas1 data=atlasdta.atlas1 anno=atanno;
title1 h=2 f=centb 'Census Tracts in USC Neighborhood';
title2 h=1.5 f=centb 'Los Angeles, California';
footnote1 h=1.3 f=centb 'Source: 1990 Census ATLAS files';
id tract; choro tract / discrete nolegend coutline=black;
Many of the statements and features in this sample are optional,
including the TITLE and FOOTNOTE
statements.
The PATTERN statement assures that each of the
Census Tract areas will be empty; otherwise, SAS will fill them with
patterns.
The display of the map is automatic, unless you are directing the map information to a Graphics Stream File (GSF) for later printing and/or saving. See the SAS/GRAPH User's Guide and the ITS online information on SAS/GRAPH at
http://www.usc.edu/its/doc/statistics/sas/
for more information on how to use GSFs.