Chris, the Below code runs with out any error. Filename datain url 'http://chronicdata.cdc.gov/resource/dttw-5yxu.csv?topic=Overall%20Health&break_out=Overall'; proc import datafile=datain out=cdc_brfss_overall_health dbms=csv replace; getnames=yes; /* The following two procs would print out the schema and data itself, respectively */ /* proc contents; */ /* proc print data=cdc_brfss_excellent_health; */ /* remove non-states from the dataset */ data cdc_brfss_overall_health; set cdc_brfss_overall_health; if Locationabbr = 'UW' then delete; if Locationabbr = 'US' then delete; run; /* Create a dataset that only has "Excellent" responses */ data cdc_brfss_excellent_health; set cdc_brfss_overall_health; if Response ^= 'Excellent' then delete; run; /* Sort the dataset (this is required for the non-paneled box plot coming up to work) */ proc sort data=cdc_brfss_excellent_health out=cdc_brfss_excellent_health; by Year; /* Show a box plot with Year on the X-axis and the data_value on the Y-axis - excellent responses only */ title 'CDC BRFSS asked "How is your general health?"'; title2 'Data source: https://chronicdata.cdc.gov/d/dttw-5yxu'; proc boxplot data=cdc_brfss_excellent_health; plot Data_value*Year / BOXSTYLE=SCHEMATICID odstitle=title odstitle2=title2; label Data_value = 'Crude % of Respondents Who Answered "Excellent"'; id Locationabbr; /* Show a paneled box plot where each panel is a Response (excellent, very good, fair, poor) */ proc sgpanel data=cdc_brfss_overall_health; panelby Response / novarname columns=5; vbox Data_value / category=year datalabel=Locationabbr; label Data_value = 'Crude Percentage' run; /* Show a frequency table to see how many data points each state has */ /* proc freq data=cdc_brfss_excellent_health; tables Locationabbr / nocum; run; */ thanks
... View more