Are you using Stata 8? With -tmap- I believe you would use the
-addplot()- point with -label- subcommand.
With -spmap- you could do something like:
spmap population using "C:\DATA\us maps\uscounty.dta", id(_ID) cln(2)
oc(gs12 gs12) fcolor(white white) legend(off) ///
label(data(foo2.dta) y(lati) x(longi) label(batch) size(vlarge)) ///
title("Big Foot Sightings in Pennsylvania")
which would produce:
http://docs.google.com/Doc?id=dcpv7s6q_30g8fvj4gs
Scott
On Fri, Mar 27, 2009 at 1:19 PM, Vitorino, Maria Ana
<[email protected]> wrote:
>
> Dear stata-list users,
>
> I have a dataset with the following four columns: observation, latitude, longitude, batch_number
> As a small example, the first six rows of the data look something like the following:
>
> 1 39.977741 -75.287768 1
> 2 39.98695 -75.301235 1
> 3 40.0937201 -75.0205653 2
> 4 40.8956971 -76.8081187 3
> 5 40.041349 -75.070036 3
> 6 40.142553 -74.919325 3
>
> I would like to plot the observations in a map (US map, or ideally, Pennsylvania map) and use as markers the observations' batch_number(which is in the last column of the data).
> I searched the documentation for tmap but couldn't come up with how to do it.
> Any help is appreciated.
> Thanks!
>
*
* 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/