1 (DATALIB) 0 SCADS DATASETS and DATA LIBRARIES --------------------------------- Once you know where your installation has stored the system files created by SCADS (as discussed in the previous section), you will then need to turn your attention to accessing a specific module, or "SAS dataset", within that file, or "SAS data library". While there are a few "level 0" files created by SCADS that are not SAS data libraries, this discussion is limited to SCADS data which is in SAS format. One of the ways in which SCADS attempts to simplify access to census files is by converting the information to SAS datasets and then, typically, reorganizing the data into different "levels". The level of a SCADS dataset is a measure of how many conversion processes have been applied to the data. Thus we refer to original versions of census files as "level 0" datasets (files). A level 1 dataset is created from a sequential file by means of a simple SAS data step that converts the input file records to SAS observations. The data is not altered in terms of basic structure; there is usually a simple 1-to-1 correspondence between records on the input file and observations in the SAS dataset. Typically, missing (suppressed) value flags are used to assign SAS missing values to the appropriate variables. Obviously, some convention for associating input fields with SAS variable names is needed. In most cases, SCADS level 1 conversion modules will use the same variable names used in the data dictionaries that accompany most census files. Where tables of data occur, the convention is to store the table entries as vari- ables named TxIy, where x is the table number, and y the item number within the table. For example, on STF3 Table 15 has 52 entries. It is described as SEX(2) by AGE(26); the first 26 items are counts of total persons for 26 age categories; the next 26 are the correspond- ing counts for females. In the corresponding SAS dataset the count of total persons under 1 year of age is stored in variable T15I1. The count of total persons aged 1 and 2 years is in T15I2. The count of females under one year is in T15I27 (the female counts--i.e. the second row--are in variables T15I27 through T15I52). Not all SCADS files have a level 1 version (STF4 files do not, for example), but most do. They are most commonly useful for STF1 and STF3 files where you need to access multiple summary levels in one pass--i.e. you want to look at county, tract and block group data together; or because you need to access data in its original split form--i.e. you want census tract data within place and MCD as opposed to complete tract summaries. Many non-STF files are so simple that a level 1 dataset is all that is needed. Level 2 SCADS datasets are derived from level 1 datasets (usually) and involve "vertical" manipulation of the data. Since records (ob- servations) in SCADS files typically represent geographic unit summa- ries, creating a level 2 dataset usually involves aggregation and/or reordering the geographic summary units. The most important exam- ples are STF's 1 and 3, where the level 2 data libraries differ from the level 1's as follows: 1. Instead of being a single dataset with different geographic summary levels mixed together, level 2 data libraries contain multiple datasets, each containing summary observations only for a specific geographic level. Thus, a level 2 data library for STF3C contains datasets named STATES, COUNTIES, SMSAS, CONDISTS, etc. whereas the corresponding level 1 dataset, STF3CL1, contains summaries for each of these geographic levels mixed together. 2. In many instances level 2 datasets are the result of an aggregation of component pieces to form a complete unit summary. On STF3A, for example, the TRACTS dataset contains only one observation per tract. This observation is derived, in many instances, by aggregating multiple tract within place and MCD summary observations on the level 1 dataset. A special variable, NA, is added to level 2 datasets which have been created by aggregation. NA will be missing or have a value of 1 for geocodes that did not require aggregation, and will contain an integer value of 2 or more for other geocodes corresponding to the number of component pieces that were aggregated. In some instances, most notably on STF3B ZIPS datasets, an additional feature of these datasets is that a "primary" higher level geocode is assigned to indicate where the majority of people in the place or ZIP reside. The higher level code is usually a county or SMSA. For example, on STF3A places (cities) are summarized at two levels: level 13 sum- marizes places within state, county and MCD, as well as by complete places within state. In creating the level 2 dataset we look at all the level 13 records for a place to determine the county/MCD combination with the largest portion of the place's population--and assign these codes to the level 27 (complete place) summary record which does not contain either of these codes. This comes in very handy when people ask for a report for all cities in St. Louis county. A similar assignment of SMSA and county codes to complete ZIP summaries (level 35) takes place on STF3B. Level 3 datasets are not as well defined as levels 1 or 2. We can talk about the level 1 dataset for STF1C or the level 2 database for STF3A for Virginia, but we can't really talk about 'the' level 3 TRACTS dataset for Virginia. Instead, level 3 is a generic term for a dataset or data library that is derived from a level 2 dataset or li- brary by means of "horizontal reduction". Just as we used "vertical manipulation" to refer to altering what observations meant in going from level 1 to level 2, we use "horizontal reduction" to refer to altering and eliminating variables within an observation. A level 2 dataset observation for a geographic area on STF3 will contain about 20 identifier fields (STATE, COUNTY, AREANAME, etc. depending upon type of geography), a set of 26 suppression flags and 1026 table cell items. This is great for reference or for 1-shot selective access, but often users want to extract just a small number of revelant data items and put these into a dataset (usually on-line) where they can be scrutinized and ranked, merged, mapped, FSCALCed, etc. We use the term "level 3" to refer to these datasets. To make the creation of such entities simpler (and more uniform) for STF3 users, SCADS in- cludes a special collection of macros that can be used to create "level 3 variables". See the section LVL3SETS for a more complete discussion. In summary: Level 0 refers to raw files (sequential, not SAS). Level 1 refers to sequential files as single dataset SAS data libraries. Level 2 refers to level 1 data segregated into different datasets for different geographic levels and often-times with some collapsing or assignment of useful higher level geographic codes. The term applies to entire SAS data libraries as well as individual SAS datasets. Level 3 refers to datasets/data libraries in which the very large level 2 dataset observations containing all items for all tables have been replaced by much smaller observations containing data items derived from the table cells and assigned mnemonic variable names.