Thomas Mahaffey, Jr. Business Library
L001D Mendoza College of Business
University of Notre Dame
Notre Dame, IN 46556
For a serious GIS project, you should not be using Stata (check out CDS's GIS services). That being said, Stata is perfectly capable of producing basic thematic maps. This tutorial walks you through how to produce a map of unhappiness by Census Division (Figure 3).
Generally speaking, to produce a thematic map, you need two ingredients:
The shapefile that you need is in this zipped file. Download it to your hard drive and unzip it to a folder of your choice, preferably the same one in which the necessary do-files and datasets (see the next steps) will reside.
You will need to convert the shapefile to
You do not perform these conversions manually; use the shp2dta command.*
Refer to makemap1.do for the complete command involved in this step.
*You may first need to install shp2dta off Stata's servers by entering ssc install shp2dta.
Merge GSS2012_divisions.dta and the dBase dataset, usdata.dta that was produced by shp2dta (see Step 2A).
Finally, the spmap command ties the unhappiness data to the coordinates data produced by shp2dta (see Step 2B) and generates the map you see in Figure 3.* The basic command is
spmap unhappy using uscoord.dta, id(subreg_id)
Refer to makemap2.do for the complete commands in this step.
*You may first need to install spmap off Stata's servers by entering ssc install spmap.