Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: adding US state outlines using SPMAP


From   Maurizio Pisati <maurizio.pisati@galactica.it>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: adding US state outlines using SPMAP
Date   Mon, 12 Mar 2007 08:34:11 +0100

I tried to apply a similar syntax to the example datasets:

use Italy-RegionsData.dta
spmap relig1 using Italy-RegionsCoordinates.dta, id(id) ndfc(white) fc(Blues) ocolor(gs12 ..) ///
polygon(data(Italy-OutlineCoordinates.dta))


and I seem to get what you're looking for.
Given your description, it sounds like your maps are expressed in different coordinate systems, so that they cannot be properly combined. Just a guess, anyway.
Best,
Maurizio





At 01.41 11/03/2007, you wrote:

I attempted to execute the syntax kindly offered by Maurizio
Pisati, but the graph that resulted showed ONLY the outlines
of the states but with the correct legend (showing the custom
breaks 0 1 2 3 4 32 and selected color palette). It did not
display within each state outline the shaded cbsa/metro
areas.

use uscoordinates2
sort _ID
save uscoordinates2, replace
use usdatabase3
delimit;
spmap numberoffreeclinics if conterminous & type2=="metro"
using "uscoordinates2",
id(id) ndfc(white) fc(Blues) ocolor(gs12 ..) clmethod(custom)
clbreaks (0 1 2 3 4 32)
polygon(data(us-stateoutline.dta));

Note: uscoordinates2 is the base map with the x and y
coordinates for the cbsa metropolitan areas and us-
stateoutline is the base map with x and y coordinates for the
48 contiguous states. usdatabase3 contains the id,
numberoffreeclinics, type2, and conterminous variables.

Also (I'm not sure if this is relevant), the graphs that are
produced have very different shapes. The map of cbsa/metro
areas is stretched out and takes up the entire graph area and
the map of the US states is small and is positioned in the
upper lefthand corner. The US state map does not include
Alaska or Hawaii.

Any suggestions would be greatly appreciated.

Thank you,
Julie Darnell

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index