~dricottone/chicago

ref: 8058818ab1775985000952de520bcbb8069b7528 chicago/src/03_Demographics.sas -rw-r--r-- 945 bytes
8058818aDominic Ricottone Added license 1 year, 7 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
libname IPUMS "/home/u44593168";

/* Population */
proc means data=IPUMS.people sum;
	var PERWT;
run;

/* Median Age */
proc means data=IPUMS.people median maxdec=1;
	var AGEP_NUM;
	weight PERWT;
run;

/* Population by age range */
ods select freqplot;
proc freq data=IPUMS.people;
	format AGEP_CAT AGEP_CAT_f.;
	tables AGEP_CAT / plots=freqplot(orient=vertical scale=percent);
	weight PERWT;
run;

/* Population by age category */
proc gchart data=IPUMS.people;
	format AGEP_CAT2 AGEP_CAT2_f.;
	donut AGEP_CAT2 / discrete clockwise slice=outside value=none percent=outside freq=PERWT;
run;
quit;

/* Sex */
proc gchart data=IPUMS.people;
	format SEX SEX_f.;
	donut SEX / discrete clockwise slice=outside value=none percent=outside freq=PERWT;
run;
quit;

/* Race & Ethnicity */
ods select freqplot;
proc freq data=IPUMS.people;
	format RACE_ETH RACE_ETH_f.;
	tables RACE_ETH / plots=freqplot(orient=vertical scale=percent);
	weight PERWT;
run;