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   "Austin Nichols" <austinnichols@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: adding US state outlines using SPMAP
Date   Mon, 12 Mar 2007 10:54:08 -0500

Julie Darnell--
You can check Maurizio's theory by looking at the range of coordinates
and redefining them as necessary, e.g.:
use uscoordinates2
su _X
local xmax=r(max)
local xmin=r(min)
su _Y
local ymax=r(max)
local ymin=r(min)

use us-stateoutline.dta
su _X
replace _X=(_X-r(min))*(`xmax'-`xmin')/(r(max)-r(min))+`xmin'
su _Y
replace _Y=(_Y-r(min))*(`ymax'-`ymin')/(r(max)-r(min))+`ymin'
save rev-stateoutline

On 3/12/07, Maurizio Pisati <maurizio.pisati@galactica.it> wrote:
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, Julie Darnell wrote:
>I attempted to execute the syntax kindly offered by Maurizio
>Pisati, but the graph that resulted showed ONLY the outlines
>Any suggestions would be greatly appreciated.
*
*   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