Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Two questions on Pisati's -spmap- for plotting shapefile geographic data


From   Jen Zhen <[email protected]>
To   [email protected]
Subject   st: Two questions on Pisati's -spmap- for plotting shapefile geographic data
Date   Wed, 18 May 2011 18:01:15 +0200

Dear list members,

today I found out about Maurizio Pisati's -spmap- command to plot
non-geographic data into geographic maps, and find the command
absolutely fantastic.

I am however still having 2 problem with the implementation and would
be super-grateful for any hints about this:

(1) First, I would like to plot a categorical variable with 2 values,
so I'm using the -clmethod(unique)- option. So there is a total number
of 3 different colors in my map "treated", controls" and "no values".
But I haven't been able to figure out a way to get a legend that will
display the labels ("treated","control","no values") instead of the
values (1,0,.)?

(2) A bit more complicated: My base map delineates the areas of
different districts, which in turn belong to a number of different
states. Now I would like to plot the districts and color them
according to the values of different non-geograpphic variables, but I
would also like to clearly show the borders of the different states.
My polygons describe only the districts within the states, I only have
a database variable that tells me for each district which state it's
in. So I'm wondering:
(a) Is there any way to add a border around the states with my current
data. Or is there any way to construct an additional data layer with
the state polygons based on the district polygons within them?
(b) If not, can I at least use different color schemes within each state?
(c) Or is my goal only achievable if I already have the polygons as a
shape file also for the states?

Thank you so much and all best,
JZ
*
*   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index