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]

Re: st: spmap guidance: Two variables resulting in shaded and sized circles centered on lon/lat


From   Maurizio Pisati <[email protected]>
To   [email protected]
Subject   Re: st: spmap guidance: Two variables resulting in shaded and sized circles centered on lon/lat
Date   Tue, 13 Sep 2011 08:14:18 -0500

As Nick correctly pointed out, the current version of -spmap- doesn't allow automatic shading of proportional symbol. However, James can achieve the desired result going through a quick intermediate step. Here's an example using the datasets distributed with -spmap-:


use "Italy-RegionsData.dta", clear

xtile for4q = fortell, nquant(4)

save "temp.dta", replace

use "Italy-OutlineData.dta", clear

spmap using "Italy-OutlineCoordinates.dta", id(id)          ///
   point(data("temp.dta") by(for4q) xcoord(xcoord)          ///
         ycoord(ycoord) proportional(pop98) fcolor(Blues)   ///
         ocol(black ..) size(*1.0))


Best wishes,
Maurizio





Il giorno 11/set/2011, alle ore 22.40, James Sams ha scritto:

> I'm trying to use spmap to create a graph where each geographic entity for 
> which I have data is represented by a circle centered over its central latitude 
> and longitude sized by the population of data I have in that geographic entity 
> and shaded according to the magnitude of another variable. So, the data is:
> 
> Let's say the dataset to map looks like:
> geo_id (specifically 5 digit county-level fips codes)
> LON
> LAT
> id (generated by shp2dta)
> population
> variable_to_shade_by 
> 
> The coordinates file is uscoord (also generated by shp2dta) and has variables:
> _ID, _X, and _Y
> 
> 
> Is spmap the appropriate tool to do this? I don't see how to get the options to 
> interact in the appropriate manner. Some pointers in the right direction would 
> be much appreciated.
> 
> 
> -- 
> James Sams
> [email protected]
> *
> *   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/


*
*   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