NOT FOR QUOTATION WITHOUT THE PERMISSION OF THE AUTHORS
THE LEXIS PROGRAM FUR CREATING SHADED CONTOUR
W SOF DEM0GRAPH.C SURFACES
B r a d l e y A. GambiLL James W. VaupeL
December 1985 WP-85-94
Working P a p e r s a r e interim r e p o r t s on work of t h e International Institute f o r Applied Systems Analysis a n d have r e c e i v e d only limited review. Views o r opinions e x p r e s s e d h e r e i n d o not necessarily r e p r e s e n t t h o s e of t h e Institute or of i t s National Member Organizations.
INTERNATIONAL INSTITUTE FOR APPLIED SYSTEMS ANALYSIS 2361 Laxenburg, Austria
Acknowledgments
We thank Nathan Keyfitz, Anatoli I . Yashin, Martina Joestl-Segalla, and Susanne Stock.
THE
LG)(ISPROGRAM FOR CREATING SHADED CONTOUR W S OF DEMOGRAPHIC SURFACES
B r a d l e y A. Gambill a n d James W. Vaupel
INTRODUCTION
The LEXIS computer program, which w a s developed at t h e International Insti- t u t e f o r Applied Systems Analysis (IIASA) and Duke University, is intended to aid demographers in t h e analysis of l a r g e a r r a y s of data. I t s application as a supple- ment t o o t h e r methods of graphic display i s demonstrated in 'Thousands of Data at a Glance: Shaded Contour Maps of Demographic Surfaces" (Vaupel, Gambill, and Yashin, 1985) and will not be discussed h e r e . This p a p e r provides instructions on t h e use of t h e program, gives some hints concerning t h e art and c r a f t of using t h e program in a c r e a t i v e way, and briefly describes t h e algorithm used in designing t h e program. A diskette containing a copy of t h e LEXIS program may b e obtained from t h e a u t h o r s o r from IIASA. The program is copyrighted but t h e diskette is not p r o t e c t e d against copying: please feel f r e e t o make and distribute copies. By making t h e program available t o demographers and o t h e r s interested in mapping t h e contours of s u r f a c e s , w e hope t o encourage t h e development of t h i s method of d a t a analysis. We would, of course, sincerely a p p r e c i a t e i t if w e and t h e Interna- tional Institute f o r Applied Systems Analysis were acknowledged when t h e program o r some modified version of i t i s used t o produce maps f o r presentation o r publica- tion. Comments and suggestions a r e welcome!
ADDRESS COMMENTS TO: Bradley A. Gambill, 1315 Morreene Rd, Apt. 5H, Durham, N.C. 27705. USA o r t o James W. Vaupel, Humphrey Institute of Public Affairs, University of Minnesota, 301 19th Avenue South, Minneapolis, Minnesota 55455, USA.
ADDRESS REQUESTS FOR COPIES OF THE PROGRAM TO: e i t h e r of t h e above o r t o Population Program, International Institute f o r Applied Systems Analysis, A-2361 Laxenburg, Austria.
USE
OF THE PR0GEt.Mil Important P r e l i m i n a r i e sWe assume throughout t h i s manual t h a t t h e r e a d e r h a s some knowledge of t h e IBM personal computer and t h e DOS operating system. If t h i s i s not t h e c a s e , we recommend t h a t a potential u s e r of t h e LEXIS program review t h e DOS manual pro- vided with his o r h e r IBM o r IBM-compatible personal computer. Because t h e pro- gram does v e r y l i t t l e input/output checking, such knowledge may b e quite helpful.
We have not yet developed t h e program s o t h a t i t c a n readily r e c o v e r from various e r r o r s t h e u s e r might make: i t i s b e s t t o be c a r e f u l and if you d o make a n e r r o r , t o start again.
W e also assume t h a t t h e r e a d e r h a s had some e x p o s u r e t o t h e use of shaded contour maps f o r demographic analysis. If not, t h e r e a d e r might p e r u s e Vaupel, Gambill and Yashin (1985). Caselli, Vaupel and Yashin (1985), o r Zeng, Vaupel and Yashin (1985).
The LEXIS program r e q u i r e s an IBM o r IBM-compatible personal computer with g r a p h i c s and with at least 128K of memory. The diskette accompanying t h i s manual contains two files: LX.COM and USFERT, The use of t h e program will b e discussed s h o r t l y , but it i s important t h a t t h e program b e copied t o a diskette formatted by t h e u s e r ' s computer t o include t h e DOS system and GRAPHICS f o r convenience. W e recommend t h a t t h e original diskette and a backup copy b e s t o r e d in a s a f e place.
P r i n t i n g Y a p s from the Screen
To p r i n t a LEXIS map from t h e computer s c r e e n , you must e n t e r GRAPHICS at t h e
>
DOS prompt b e f o r e beginning t h e LEXIS program. Once t h e s u r f a c e h a s been completely drawn on t h e s c r e e n , e n t e r t h e <shift> and <PrtSc> keys simultaneous- ly t o p r i n t t h e map.Format of Input D a t a
The d a t a t o b e used by t h e LEXIS program must b e in ASCII format, with m r e - petitions of a p a t t e r n consisting of t h e value of a label (such as t h e c u r r e n t y e a r ) foliowed by n d a t a items (such as mortality r a t e s at various ages). The value of n must b e l e s s than 150 and t h e value of m must b e l e s s t h a n 300. For example, t o plot a s u r f a c e of mortality r a t e s q (a , t ) from a g e 0 t o 9 9 and y e a r 1900 t o 1982 t h e f i r s t d a t a e n t r y in t h e input file would b e 1900, t h e second e n t r y q (0,1900), t h e
t h i r d e n t r y q (1,1900), and s o on up t o t h e 1 0 l s t e n t r y which would be q(99.1900).
The 102nd e n t r y would be 1901, followed by q(0.1901). and s o on up through q(99.1901). This p a t t e r n would be r e p e a t e d up through t h e y e a r 1982, t h e v e r y l a s t e n t r y being q(1982,99). The label does not have t o b e a y e a r : i t could be a n age o r a life-expectancy o r t h e value of any o t h e r variable t h a t d e s c r i b e s t h e data. Similarly, t h e successive d a t a values following t h e label d o not have t o per- tain t o successive y e a r s of age. but could p e r t a i n t o successive values of any o t h e r variable t h a t d e s c r i b e s t h e second dimension of t h e data. In any case, with input d a t a in this format, t h e map will have t h e n-variable (e.g., age) on t h e y-axis, t h e m-variable (e.g.. y e a r ) on t h e z-axis, and t h e d a t a values (e.g., t h e q's) as t h e t h i r d dimension r e p r e s e n t e d in t h e map.
Zeroes may b e used t o r e p r e s e n t missing values in t h e d a t a , if t h e a c t u a l d a t a r a n g e does not include z e r o . This use of z e r o s is discussed below.
Beginning the
LeXIS
ProgramTo begin t h e LEXIS program, simply type LX at t h e DOS prompt. A t i t l e s c r e e n will a p p e a r at t h e start of t h e program and disappear a f t e r a f e w seconds, leaving t h e Main Menu on t h e s c r e e n .
Main
Menu
OptionsA-
Initializing data filesA l l d a t a t o be mapped must b e converted and s t o r e d in a file specially c r e a t e d by t h e initialization p r o c e d u r e of t h e LEXIS program. This p r o c e d u r e begins with t h e selection of option A from t h e Main Menu. The u s e r is prompted t o e n t e r t h e disk d r i v e and name of t h e input d a t a file, as w e l l as t h e disk d r i v e of t h e output file. The initialization p r o c e s s creates two files. both with t h e s a m e prefix as t h e input file, with t h e new d a t a file given t h e extension .DAT, and a n o t h e r file, which contains information about t h e specifications of t h e d a t a , given t h e extension .SPF.
The information contained in t h e .SPF file i s provided by t h e u s e r of t h e LEXIS program, as described in t h e next s t e p below. A list of t h e r e q u i r e d information will a p p e a r on t h e s c r e e n , and t h e c u r s o r will move from place t o place t o prompt t h e u s e r t o e n t e r t h e a p p r o p ~ i a t e numbers. The u s e r i s asked t o provide informa- tion on both t h e "input file" (ASCII file) and "initialized file" (.DAT file).
The information provided about t h e input file must a c c u r a t e l y d e s c r i b e t h a t file: any e r r o r h e r e will lead t o program f a i l u r e o r s t r a n g e output. The s t a r t i n g points f o r t h e initialized file c a n b e g r e a t e r t h a n t h e s t a r t i n g points f o r t h e input file and t h e ending points c a n b e less t h a n t h e ending points f o r t h e input file. This option allows t h e u s e r t o c r e a t e a .DAT file containing less information t h a n i s con- tained in t h e original ASCII file
-
a useful option if t h e ASCII file contains regions of numbers t h a t will n e v e r b e graphed, such as missing values o r i n a c c u r a t e numbers.After t h e u s e r h a s e n t e r e d t h e requested information. t h e s c r e e n might ap- p e a r as follows:
X-Axis information
Input file Initialized file
S t a r t i n g point: 1900 1900
Ending point: 1982 1982
Label:
-
YearY-Axis information
S t a r t i n g point: 0 0
Ending point: 99 99
Label:
-
AgeNotice t h a t t h e z - a x i s information must b e e n t e r e d f i r s t , t h e n t h e y-axis in- formation. In o u r example of a mortality s u r f a c e , w e would e n t e r t h e year-axis in- formation, followed by t h e age-axis information. Once all n e c e s s a r y information h a s been e n t e r e d , t h e program will begin t h e p r o c e s s of c r e a t i n g t h e .DAT file by printing t h e label (e.g., y e a r ) of t h e f i r s t column on t h e s c r e e n , followed by t h e la- bel of e a c h successive column. Checking t h e column labels as they a p p e a r on t h e s c r e e n i s a n excellent way t o b e s u r e t h a t t h e d a t a i s in t h e p r o p e r format, and contains t h e p r o p e r number of e n t r i e s in e a c h d a t a column. Once t h e initialized files are c r e a t e d , t h e y are s t o r e d on t h e diskette and a r e available f o r all f u t u r e mapping.
I t i s recommended t h a t t h e u s e r maintain two l i b r a r i e s of d a t a
-
one with t h e original ASCII files, and t h e o t h e r containing LEXIS.DAT files. The e x t r a e f f o r t re- quired t o maintain a second set of d a t a will b e rewarded with significant time-savings l a t e r , especially in c a s e s of frequently mapped data.
B: Selecting D i s p l a y C o l o r s
The selection of p a t t e r n i s a powerful option provided by t h e LEXIS program.
Included in t h e program a r e two s e t s of color combination p a t t e r n s o r "palettes"-- t h e "screen" p a t t e r n s which fade from g r e e n t o yellow t o r e d , and t h e "print" pat- t e r n s which use t h e c o l o r s n e c e s s a r y t o produce a p p r o p r i a t e s h a d e s of g r e y when a contour map is p r i n t e d on a n IBM o r Epson p r i n t e r o r displayed on a n a p p r o p r i - a t e black and white monitor. The s c r e e n p a t t e r n s a r e probably most pleasing t o t h e e y e , and provide distinguishable shades of logically progressing c o l o r s on t h e s c r e e n ; t h e p r i n t p a t t e r n s provide t h e most easily distinguishable p a t t e r n s when displayed on t h e p r i n t e r . I t i s possible t o alter t h e s e s c r e e n p a t t e r n s (but not t h e p r i n t p a t t e r n s ) by e n t e r i n g 3 f o r p a t t e r n c o l o r and t h e n placing a 1, 2 o r 3 n e x t to t h e a p p r o p r i a t e region when prompted t o do so; t h e value 4 denotes t h e default value such t h a t t h e c o l o r will b e t h e same as on t h e s c r e e n p a t t e r n . W e have found i t useful t o shade r a t i o s u r f a c e s with just t h r e e colors, one r e p r e s e n t i n g t h e area below 1, one t h e region approximately equal t o 1 , and t h e last t h e region above 1.
Other examples of u s e of t h i s option are included in Vaupel, Gambill and Yashin (1985); experimentation will help a u s e r decide which color p a t t e r n s lead t o t h e most informative maps.
Selection of display c o l o r s i s optional, with background c o l o r z e r o , line c o l o r z e r o , and a s t a n d a r d s c r e e n p a t t e r n being t h e default settings. An experienced u s e r of t h e LEXIS program may find t h e selection of display c o l o r s t o b e a useful option. By selecting t h i s option, t h e u s e r i s a b l e t o s e l e c t background c o l o r , line color, and p a t t e r n t o b e used in c r e a t i n g t h e map. The choice of background color i s self-explanatory, and i s a m a t t e r of personal taste f o r t h e u s e r . The selection of line c o l o r depends on t h e d a t a and t h e u s e r ' s goals: if t h e lines are a n important p a r t of t h e map, t h e y should b e drawn in a color d i f f e r e n t from t h o s e used t o c r e a t e t h e p a t t e r n s being used (yellow f o r t h e p r i n t p a t t e r n s , background f o r t h e s c r e e n p a t t e r n s ) . If t h e e x a c t location of t h e lines is less important t h a n t h e gen- eral t r e n d s of change within t h e s u r f a c e , t h e n i t may b e more informative t o hide t h e lines by making them t h e c o l o r of t h e most dominant c o l o r of t h e p a t t e r n s being used. Experimentation will allow t h e u s e r t o determine which combinations of color provides t h e most effective presentation of data.
C: C r e a t i n g a map from a data f i l e
Once a l l preliminary initializations and selections a r e completed, t h e map c a n b e c r e a t e d by selecting t h e C option from t h e Main Menu. The s u r f a c e c r e a t i o n menu will a p p e a r and prompt t h e u s e r t o s e l e c t t h e t y p e of file t o b e displayed.
The map c r e a t i o n p r o c e s s is v e r y similar f o r all options, with t h e main difference coming in t h e initial prompt f o r filenames.
E n t e r i n g f i l e n a m e s
If only one file i s t o b e used in c r e a t i n g t h e map, only one input prompt will b e given. If two files are t o b e used, t h e initial prompt will b e f o r t h e numerator o r minuend filename, and t h e second prompt f o r t h e denominator o r s u b t r a h e n d file f o r r a t i o and difference s u r f a c e s , respectively.
Map s i z e
The n e x t s t e p in c r e a t i n g a map i s t o e n t e r t h e size of t h e s u r f a c e t o b e displayed. The program will display t h e file specifications of each input file used in c r e a t i n g t h e s u r f a c e , and t h e n prompt t h e u s e r t o e n t e r specifications f o r t h e map t o b e c r e a t e d . To map t h e e n t i r e d a t a file, simply e n t e r ( r e t u r n > f o r e a c h s t a r t i n g and ending point. To map only p a r t of a file, e n t e r t h e a p p r o p r i a t e numbers when prompted t o d o so. If t h e map being c r e a t e d i s e i t h e r a r a t i o o r difference s u r f a c e , i t i s important t h a t t h e u s e r t a k e c a r e in e n t e r i n g t h e size of t h e s u r f a c e , s o t h a t t h e boundaries d o not extend beyond t h o s e of e i t h e r s o u r c e d a t a set.
Duta w i t h z e r o s
Once a l l of t h e s e numbers are e n t e r e d , t h e u s e r will b e asked if t h e a c t u a l d a t a include zeros. If t h e d a t a r a n g e includes z e r o , then "Y" should b e e n t e r e d at t h i s prompt. If, however, z e r o s are used only t o denote missing values, in c o h o r t d a t a f o r example, then t h e u s e r should e n t e r "Nu o r ( r e t u r n > . For r a t i o s u r f a c e s , division by z e r o will b e set equal t o t h e background color.
Smoothing
Next, t h e u s e r will b e asked if t h e s u r f a c e should b e smoothed. If smoothing i s d e s i r e d , t h e u s e r must e n t e r a n odd number less than o r equal t o twenty-one. The smoothing p r o c e d u r e simply r e p l a c e s e a c h point in t h e s u r f a c e with t h e binomial weighted a v e r a g e of t h e points in t h e n by n s q u a r e surrounding t h e point. F o r example, if n i s five, 25 points surrounding t h e original point will b e a v e r a g e d us- ing t h e following weights:
When a point i s n e a r a boundary, t h e weighted a v e r a g e i s t a k e n o v e r a l l t h o s e points within t h e surrounding s q u a r e f o r which d a t a are available.
L i n e s e l e c t i o n
Line s e l e c t i o n i s p e r h a p s t h e most important decision t h a t must b e made in c r e a t i n g a s h a d e d c o n t o u r map. The LEXIS p r o g r a m p r o v i d e s s e v e n d i f f e r e n t op- tions f o r selecting t h e b e s t lines:
1. "Mortality s u r f a c e lines" begin with .000667 and t h e n i n c r e a s e by 50% from o n e line t o t h e n e x t . W e found t h e s e i n t e r v a l s t o b e useful in drawing c o n t o u r maps of mortality s u r f a c e s . The c o n t o u r s are placed at t h e following levels (where B d e n o t e s "boundary "):
2. "Fertility s u r f a c e lines" are placed at i n t e r v a l s w e found t o b e convenient when analyzing f e r t i l i t y s u r f a c e s :
B 1
=
0.001 B5=
0.05 B9=
0.13 B13=
0.21 B2=
0.01 B6=
0.07 B10=
0.15 B14=
0.23 B3=
0.02 B7=
0.09 B l l=
0.17 B15=
0.25 B4=
0.03 B8=
0.11 B12=
0.193. "Ratio lines" a r e placed at levels we sometimes found useful when analyzing s u r f a c e s t h a t r e p r e s e n t e d t h e r a t i o of two s u r f a c e s (e.g., male vs. female mortality). Each contour is 10 p e r c e n t g r e a t e r t h a n t h e previous contour, as follows:
B 1
=
0.513158 B5=
0.751315 B9=
1.1 B13=
1.61051 B2=
0.564474 B6=
0.826446 B10=
1.21 B14=
1.771516 B3=
0.620921 B7=
0.0909091 B l l=
1.331 B15=
1.948717 B4=
0.683013 B8=
1 812=
1.46414. The "difference lines" option allows t h e u s e r t o e n t e r high and low values f o r a s u r f a c e . The program t h e n calculates t h e levels of 15 lines between t h e two points. These lines, depending on t h e u s e r ' s choice, a r e placed e i t h e r at even multiples o r even intervals.
5. The "even multiple lines" option allows t h e u s e r t o e n t e r a beginning point, and a multiplier. The f i r s t line is placed at t h e beginning point and t h e o t h e r lines are s p a c e d at even multiples of t h e multiplier given. Thus, if 1.1 is t h e given multiplier, t h e lines i n c r e a s e by 10 p e r c e n t , s t a r t i n g at t h e beginning point.
6. The "auto select lines" option t a k e s t h e high and t h e low of t h e input file, and places 1 5 lines between t h e two points. The lines a r e placed at even multiples o r even intervals, depending on t h e u s e r ' s r e s p o n s e t o a prompt.
7. The "user e n t e r e d lines" option allows t h e u s e r t o p l a c e t h e lines at any d e s i r e d values. By placing more t h a n one line at t h e same value, some of t h e contour lines and s h a d e s c a n b e suppressed. In this way, a map with only five levels, f o r example, c a n b e c r e a t e d .
Once t h e lines have been selected, t h e program will begin generating t h e s u r - f a c e , with no o t h e r user-entered information n e c e s s a r y until t h e s u r f a c e is fully completed.
Surface Manipulation
When all calculations f o r t h e s u r f a c e have been completed (drawing t h e bord- er i s t h e last s t e p in t h e process), t h e u s e r may view labeling, s t a r t i n g and ending points, and lines drawn on t h e map by entering <Fl>. A new s c r e e n will a p p e a r with t h e p e r t i n e n t information, and a new s c r e e n manipulation menu at t h e bottom.
<Fl>View Map
-
This option allows t h e u s e r t o flip back and f o r t h between t h e map and information s c r e e n s with t h e touch of a key.<FZ>Add Grid
-
This option enables t h e u s e r to add a g r i d to t h e s c r e e n map in o r d e r to g e t more p r e c i s e z and y a x i s readings. Within t h i s option t h e u s e r may c h o s e where to start t h e g r i d on each a x i s , t h e g r i d line increments, t h e c o l o r of t h e g r i d lines, a n d a l s o a c o l o r to "exclude" from t h e grid. W e h a v e found t h a t i t i s sometimes more informative t o l e a v e t h e c o n t o u r lines intact, on t o p of t h e g r i d , because i t r e l e g a t e s t h e g r i d t o t h e background, r a t h e r than t o t h e foreground of t h e map. By e n t e r i n g < r e t u r n > f o r e a c h option, t h e default numbers listed on t h e s c r e e n will automatically b e chosen.<F3>Save S c r e e n Map
-
This option allows t h e u s e r t o s a v e t h e s c r e e n image on t h e output d i s k e t t e f o r l a t e r viewing with t h e Recall p r o c e d u r e included in t h e Main Menu.<F4>View Key
-
This option will p u t t h e c o l o r key of specified size on t h e s c r e e n for viewing or printing.<F5>Return to Main Menu
-
This option ends t h e map manipulation p r o c e d u r e , and puts t h e u s e r back at t h e main menu level.D: R e c a l l screen f i l e
A s mentioned in t h e previous section, i t i s possible t o s a v e a map with t h e
<F3> command, and t h e n r e c a l l i t f r o m a d i s k e t t e with t h i s command. A f t e r t h e file name and disk d r i v e i s e n t e r e d , t h e file will a p p e a r o n t h e s c r e e n , and a l l map manipulation options mentioned in t h e previous section will again b e possible.
E: R e t u r n to DOS
Selecting t h i s option will end t h e LEXIS session and r e t u r n t h e u s e r t o t h e DOS o p e r a t i n g system.
ALGORITHM AND DESIGN DECISIONS
To more fully understand t h e shaded contour maps c r e a t e d by t h e LEXIS pro- gram, t h e u s e r may find i t helpful t o understand t h e g e n e r a l n a t u r e of t h e algo- rithm used in LEXIS and to b e aware of c e r t a i n design decisions t h a t w e made o v e r t h e c o u r s e of t h e p r o g r a m ' s development. The program r e s u l t e d from f r e q u e n t in- t e r a c t i o n between a d e m o g r a p h e r with some knowledge of computers and a comput- e r s c i e n c e s t u d e n t with a keen i n t e r e s t in demography. Working t o g e t h e r t o develop t h e program and simultaneously conducting some substantive r e s e a r c h
with i t enabled us t o make substantial improvements in t h e program in i t s eighteen months of development. This section outlines some of t h e more subtle f e a t u r e s of t h e shaded contour maps c r e a t e d by t h e program.
I t i s important t o f i r s t discuss t h e differences t h a t e x i s t between t h e LEXIS contour maps and t h e more conventional contour maps often used by g e o g r a p h e r s , a r c h i t e c t s , geologists, and o t h e r s interested in studying s u r f a c e s . The most obvi- ous difference i s t h a t we have chosen t o shade t h e LEXIS maps t o show t h e various levels of t h e s u r f a c e , r a t h e r t h a n t o label t h e lines with numbers. This p r o c e d u r e allows u s t o indicate "cliffs" on a s u r f a c e without drawing multiple contour lines closely spaced t o g e t h e r . That is, sudden s u r f a c e changes of more t h a n one level a r e r e p r e s e n t e d by a single contour line, with t h e r a p i d change in level indicated by a jump in c o l o r o r shade between t h e adjacent regions.
Because t h e LEXIS program does no interpolation b e f o r e c r e a t i n g a s u r f a c e , t h e a p p e a r a n c e of a contour map depends on t h e number of d a t a points used in c r e a t i n g it. Maps c r e a t e d with few d a t a points will tend t o include s t r o n g rectangu- lar p a t t e r n s , whereas contours on maps made from l a r g e r a r r a y s of d a t a will ap- p e a r more rounded. I t i s possible t o change t h e a p p e a r a n c e of t h e maps with a lit- t l e creativity. Rounded maps will become more r e c t a n g u l a r if enlarged and viewed in portions. Rectangular contours can b e smoothed by interpolating t h e d a t a t o produce a l a r g e r a r r a y of d a t a points.
The LEXIS program determines t h e location of contour lines by replacing ac- tual d a t a points with i n t e g e r s r e p r e s e n t i n g t h e t i e r , o r region of height, into which t h e d a t a point falls. With fifteen contour lines, t h e r e are sixteen t i e r s on t h e s u r - face. Next, e a c h point i s evaluated in terms of i t s relationship t o adjacent pbints.
Various p a t t e r n s among nine-point s q u a r e s a r e included in t h e program, and e a c h point, with t h e eight points t h a t surround i t , i s checked f o r conformity with one of t h e s e p a t t e r n s . If t h e a c t u a l p a t t e r n i s s o complex t h a t t h e r e i s more than one discontinuity, t h e middle point i s surrounded by a box. We chose t h i s simple method of drawing lines t o b e a reasonable compromise between t h e competing goals of minimizing computational time and maximizing t h e smoothness and a c c u r a c y of contour lines.
Because a s u r f a c e depicted by t h e LEXIS program i s based on a two- dimensional a r r a y of d a t a , t h e s u r f a c e c a n b e thought of as a s e t of boxes, each box corresponding t o a specific d a t a point. The method used in LEXIS f o r drawing contour lines sometimes draws a line diagonally through a d a t a box. The original d a t a value f o r t h e box i s always given by t h e value on t h e LEXIS map above t h e di-
agonal contour line.
For d a t a pertaining t o single y e a r s of time and a g e , e a c h d a t a box is one y e a r by one y e a r , The tick m a r k s placed along t h e edges of t h e map c o r r e s p o n d to t h e mid-points of t h e boxes t h a t they d e s c r i b e . Thus, a tick mark at a g e z e r o , s a y , will a p p e a r offset slightly f r o m t h e origin and a tick mark at y e a r 1980, in a map t h a t r u n s through 1980, will a p p e a r slightly b e f o r e t h e end of t h e horizontal axis.
If you have any questions o r suggestions concerning
LEXIS,
please write t o one of us a t t h e a d d r e s s e s given at t h e beginning of t h i s p a p e r .References
Caselli, G . , J.W. Vaupel, and Anatoli I. Yashin (1985) MortaLity i n ItaLy: C o n t o u r s of a C e n t u r y of EvoLution. WP-85-24. Laxenburg, Austria: International In- s t i t u t e f o r Applied Systems Analysis.
Vaupel, J.W., G.A. Gambill, and Anatoli I. Yashin (1985) i"housands of D a t a a t a Glance: S h a d e d C o n t o u r Maps of Demographic S u r f a c e s . Laxenburg, Aus- t r i a : International Institute f o r Applied Systems Analysis. Forthcoming R e s e a r c h Report.
Zeng, Y . , J.W. Vaupel, and Anatoli I. Yashin (1985) M a r r i a g e a n d F e r t i L i t y i n Chi- n a : A L e z i s - S u r f a c e A n a l y s i s . WP-85-70. Laxenburg, Austria: International Institute f o r Applied Systems Analysis.
APPENDIX
1: Example Data M a pIn o r d e r t o a l l e v i a t e t h e f r u s t r a t i o n t h a t often r e s u l t s from using a n unfami- l i a r computer p r o g r a m , t h i s appendix outlines t h e p r o c e d u r e f o r c r e a t i n g a LEXIS map of t h e U.S. f e r t i l i t y d a t a contained o n t h e LEXIS d i s t r i b u t i o n d i s k e t t e . W e dis- c u s s , however, only b a s i c s t e p s a n d l e a v e most of t h e options f o r u s e r s t o l e a r n at t h e i r convenience. Whenever w e u s e t h e word " e n t e r " w e mean typing in whatever i s r e q u e s t e d and t h e n hitting t h e < r e t u r n > key.
S t e p 1: Beginning the
LEXIS
program:Before beginning t h e p r o c e d u r e , create a work d i s k e t t e by copying t h e f i l e s contained on t h e d i s t r i b u t i o n d i s k e t t e (LX.COM a n d USFERT) t o a d i s k e t t e format- t e d by y o u r machine t o include DOS. P u t GRAPHICS o n t h i s d i s k e t t e . P u t t h i s d i s k e t t e i n t o d r i v e a: ( t h e l e f t s i d e d i s k e t t e d r i v e ) . A t t h e prompt t y p e GRAPHICS;
at t h e n e x t prompt t y p e LX.
S t e p 2: File Initialization
The d a t a contained o n t h e d i s k e t t e are U.S. f e r t i l i t y rates and r u n from a g e of m o t h e r 1 4 t o 49 a n d y e a r 1 9 4 5 t o 1980. To initialize t h i s d a t a (i.e., t o u s e t h i s d a t a t o p r o d u c e t h e kind of d a t a f i l e r e q u i r e d by t h e LEXIS program), e n t e r A from t h e main menu. The s c r e e n will t h e n look l i k e t h i s :
File Initialization Input File Disk Drive:
Input File Name:
E n t e r A as t h e input f i l e disk d r i v e , and USFERT as t h e input file name. Once t h i s h a s b e e n done, a prompt f o r t h e o u t p u t file d r i v e will a p p e a r , t o which you should answer A.
Assuming all information has been entered correctly, t h e s c r e e n will now ap- p e a r like this, with user responses included:
X-Axis information
Data file Initialized file
Starting point: 1945 1945
Ending point: 1980 1980
Label:
-
YearY-Axis information
Starting point: 14 1 4
Ending point: 49 49
Label:
-
AgeOnce these numbers have been entered, t h e initialization process w i l l put t h e y e a r numbers on t h e s c r e e n as i t processes t h e data, beginning with 1945 and end- ing with 1980. After t h e file has been completely initialized, t h e main menu will r e a p p e a r .
The color p a t t e r n is set to t h e s c r e e n p a t t e r n by default, s o w e will ignore Main Menu option B and select C to create t h e LEXIS map. The Map Creation menu will now a p p e a r on t h e screen. giving t h e user t h e option to c r e a t e a LEXIS map us- ing one or t w o input files. Since t h e r e is only one d a t a file on t h e diskette, e n t e r A. The following input prompt will a p p e a r on t h e screen:
Initialized File Information Initialized file prefix:
Disk drive:
-
The initialized file prefix is again USFERT, and t h e disk drive is again A.
Next, t h e file dimensions will a p p e a r on t h e screen, in t w o places: on t h e top of t h e s c r e e n f o r t h e information of t h e user and on t h e bottom of t h e s c r e e n f o r t h e u s e r to change as h e or s h e wishes. W e will look
at
t h e e n t i r e data s e t , so e n t e r t h e <return> key at each prompt. Once this h a s been done, t h e question 'Will actual data contain z e r o ?" will appear. SinceU.S.
fertility rates are z e r o atsome older and younger a g e s , e n t e r Y b e f o r e continuing.
The next prompt will be: "Smooth t h e s u r f a c e (Y/N) ?". Because t h i s i s t h e f i r s t analysis of fertility d a t a , i t may b e most informative t o look at a map of t h e a c t u a l r a t e s f i r s t , without smoothing. E n t e r N a t t h i s prompt.
The l a s t selection t o b e made is contour line levels. The Contour Line Menu contains seven options, with more than one a p p r o p r i a t e in t h i s case. However, op- tion 2, "Fertility Lines", w a s designed specifically f o r maps of t h i s d a t a , s o e n t e r 2 f o r now. Once t h i s iast selection has been made, t h e map will begin t o develop on t h e computer s c r e e n . I t will t a k e about one minute t o complete, and will b e e n t i r e - ly finished when a yellow b o r d e r a p p e a r s around t h e map.
After t h e e n t i r e map h a s been generated, pressing t h e <F1> key will r e v e a l a t e x t s c r e e n with line information, labeling and s u r f a c e dimensions. Also, on t h e l a s t line will a p p e a r a s c r e e n manipulation menu which outlines u s e r options at this point in t h e mapping p r o c e s s . In o r d e r t o see t h e c o l o r key used in c r e a t i n g t h e map, p r e s s <F4>. Because a l l 1 5 lines were assigned a d i f f e r e n t number, simply p r e s s < r e t u r n > at t h e beginning and end point prompts. After t h e c o l o r key ap- p e a r s on t h e s c r e e n , hitting any key will r e t u r n t h e u s e r t o t h e information s c r e e n . From h e r e , p r e s s <F5> t o end t h e p r o c e s s and r e t u r n t o t h e Main Menu.
This example should give t h e u s e r a p r a c t i c a l , but superficial, understanding of t h e LEXIS program capabilities. I t i s important t h a t t h i s example b e used only as a supplement to, r a t h e r t h a n a substitute f o r , t h e more extensive description contained in this manual.