NAME
m.in.stf1.db3 - Import Demographic records from Census STF1A dBase3 (CDROM) Files
(GRASS Sites Program)
SYNOPSIS
m.in.stf1.db3 help
m.in.stf1.db3 [-f] [-p] [-n] sc=string [ sc=str . . ] in=/cdrom/stf1a0ss.dbf > result_file
This command may be run in command line mode only. Parameters used
must be in the order specified.
PARAMETERS
- -f
- Output to stdout the list of all field name and starting positions
for the Identification Section of the STF1A file. Other
parameters are not necessary and will be ignored.
- -p
- Print several information items to stderr as the 10 input
files are opened.
- -n
- Output only the sequential number and STF1A logical record
number (LOGRECNU) of matching records to stdout.
- sc=string
- sc is starting column or a capitilized reference name from
the Identification Section of the STF1A Data Dictionary;
string is characters to match there. A negative test may
also be made with: sc!=string. If more than one test is
specified the results are "anded" resulting in a
conjunction of the results of the expressions. (See
m.in.stf1.tpe for complete details.)
in Path/file for dBase files for state ss.
DESCRIPTION
This program is provided to read and assemble the Census STF1A data records
from a set of 10 files for one state. The files are usually on a CD-ROM, but
this is not necessary providing the proper path is given for the in=
parameter and all 10 files are in the same directory with their normal names.
The output consists of data from the 10 input files assembled into records
identical to the STF1A tape distribution format. The output records are each
about 4800 characters and a pair constitute a logical STF1A record.
Users of GRASS 4.1 and the Census STF1A files on CD-ROM will generally use
this program to select appropriate subsets of STF1A records; write them to
one or more files (in the STF1A tape format); and then either process these files
directly with
v.apply.census
to print demographics, create site maps or label
vector maps, or use m.in.stf1.tpe to extract further subsets.
The STF1A CD-ROM data sets for most states are very large, 100+ MB. This
program may take 20 to 60 minutes for a single extraction, so plan carefully
and don't discard useful subsets that you create on disk.
EXAMPLES
Insert the appropriate CD-ROM and mount it (see your system administrator).
(We assume here that it is mounted as the file system /cdrom.)
To extract all Census tract summary records for the state of South Dakota:
- m.in.stf1.db3 -p 11=140 in=/cdrom/stf1a0sd.dbf > tracts.SD
The 11=140 parameter selects those records which have the character string
'140' beginning in column 11 of the assembled records. Columns 11-13 are the
Summary Level (SUMLEV) field which is used in almost every selection from
CD-ROM.
To extract all block group records for Lawrence County, South Dakota:
- m.in.stf1.db3 -p SUMLEV=150 CNTY=081 in=/cdrom/stf1a0sd.dbf > bg.081.SD
150 is the SUMLEV for block groups and 081 is the county code for Lawrence Co.
SEE ALSO
m.in.stf1.tape is used as a post-processor to select further subsets of
STF1A records. NOTE: Unix utility programs, such as grep or awk,
cannot be used for the for processing the STF1 files due to their very
long record lengths.
AUTHOR
Dr. James Hinthorne, GIS Laboratory, Central Washington University, May 1992.