Premium access provided by: MIT Personal account: Create | Sign in
Documentation: ACS 2014 (5-Year Estimates)
you are here: choose a survey survey document chapter
Publisher: U.S. Census Bureau
Document: ACS 2014-5yr Summary File: Technical Documentation
citation:
Social Explorer; U.S. Census Bureau; American Community Survey 2014 Summary File: Technical Documentation.
ACS 2014-5yr Summary File: Technical Documentation
Appendix D: Examples
Example of Creating a Table Using SAS
Here is an example of how to access the Summary Files for one table for all geographies from the ACS Summary File. The following 2005-2009 ACS 5-year Summary File example is also applicable to the current ACS Summary File.

Question: I am interested in downloading table B01001 for all published ACS geographies, how would I do this?

1)Go to the Sequence Number and Detailed Table Number Lookup File (Chapter 2.3) to locate sequence number for table B01001. There are Excel and SAS dataset versions of the file. They are available at www2.census.gov/acs2009_5yr/summaryfile

2)Use SF_All_Macro.sas in http://www2.census.gov/acs2009_5yr/summaryfile/UserTools/. Run the macro:

%TableShell(B01001);

This macro will provide metadata information on a given table, in this case B01001.

3)The following SAS dataset will be created with information about table B01001:

Table IDSequence NumberLine NumberStart PositionTotal Cells in TableTotal Cells in SequenceTable Title
B010010013 749 CELLS SEX BY AGE
B010010013    Universe: Total population
B0100100131   Total:
B0100100132   Male:
B0100100133   Under 5 years
       
B01001001347   75 to 79 years
B01001001348   80 to 84 years
B01001001349   85 years and over


We can see that table B01001 is located in Sequence 0013; this applies to all published geographies.

4) We can read into SAS all tables in the 0013 sequence by running the SAS Example Macros:

%CallSt;

This macro will run a do loop creating State two-digit abbreviations, which will allow a simple way to read the Summary Files into SAS for all geographies. Each time a valid two digit state abbreviation is created, the macro %AllSeqs is run with the two digit state abbreviation.

The %Allseqs Macro performs the following tasks:

A.Read the geographic header file - %AnyGeo Macro.

B.There is a do loop to allow you to choose which sequences you would like to read in for example if you wanted sequence 0010 set the loop to be do x=13 %to 13; - The 0 values will be filled in.

C.Within the do loop the following macros will be executed:

a.%TablesBySeq, -- This will give information about the whole 0003 sequence, not just table B01001.

b.%ReadDataFile - This macro is called two times once for each type of estimate. This macro will generate and run SAS code for each sequence specified in the do loop in step 2 and for each geography specified in the %Callst macro.

c.Lastly, there is a merge statement that will merge together each of the three types of estimates and the geography header file by sequence number per geography.

5) You now will have all tables in the 0013 sequence read into SAS in the following dataset names, if the code is not modified, in the work directory Sf0013.sas7bdat.

©2024 Social Explorer. All rights reserved.