Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | "Vitorino, Maria Ana" <vitorino@wharton.upenn.edu> |
To | "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu> |
Subject | st: using spmap and option "point" |
Date | Mon, 1 Mar 2010 03:35:47 -0500 |
Dear statalist users, Is the following possible? I have 2 files: *file1 is something like: region populationsize id A ... 1 B ... 2 C ... 3 (I also have a file with the region coordinates so that I can use spmap) *file 2 is something like: store_id xcoord ycoord 100 ... ... 201 ... ... 345 ... ... 411 ... ... 544 ... ... I would like to do a map with the stores superimposed on the map but only for the stores that are located in region B or C (note that I don't have that information on file2, otherwise it would be easy to do), excluding store 345 (irrespective of where it is located). If I do something like the following, the problem is that all the stores (even the ones that are not located in regions B or C) show up...and I only want the ones located in regions B or C. spmap populationsize if region=="B" | region=="C" using file1coord, id(id) point(data("file2.dta") xcoord(xcoord) ycoord(ycoord) fcolor(emerald) select(drop if store_id==345)) How can I modify this command line to achieve what I'm looking for? Any help is appreciated. Thanks! Ana * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/