Bookmark and Share

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

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

Re: st: Aggregating spatial units

From   Scott Merryman <>
Subject   Re: st: Aggregating spatial units
Date   Fri, 20 Apr 2012 13:45:57 -0500

Perhaps using the polygon option within -spmap-?

Using the ancillary files from -spmap-, the example below will create
a map of five 5 aggregate regions:

use "Italy-RegionsCoordinates.dta",clear
xtile group = _ID, n(5)
save foo,replace

use "Italy-RegionsData.dta", clear
spmap using "Italy-RegionsCoordinates.dta", id(id)                 ///
	polygon(data("foo") by(group) fcolor(Reds) oc(Reds) )
rm foo.dta


On Fri, Apr 20, 2012 at 12:59 PM, Gindo Tampubolon
<> wrote:
> Dear good folks,
> Is there a way of aggregating lower scale spatial units into higher ones [say Output Areas into Authority Districts in Britain or perhaps zip codes into counties in the US]? I have Output Areas boundary file in ESRI Shapefiles format and a look-up table from Output Areas to Authority Districts.
> With -shp2dta- and -spmap- I've been able to play around maps, but only with the scale given by the boundary files producer. Perhaps what I'm looking for is something like unionSpatialPolygons {maptools} in R. Just in case, my excuse for asking is: the rest of the analysis is in Stata.
> Many thanks and have a good weekend,
> Gindo
> Cambridge, MA

*   For searches and help try:

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