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 <>
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 ..) ///

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.

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

use uscoordinates2
sort _ID
save uscoordinates2, replace
use usdatabase3
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)

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:
*   For searches and help try:

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