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: Maps request: EU-27 countries (spmap, shp2dta)
From
Maurizio Pisati <[email protected]>
To
[email protected]
Subject
Re: Maps request: EU-27 countries (spmap, shp2dta)
Date
Mon, 15 Nov 2010 09:59:04 +0100
I may be missing something here, but in -spmap- it's pretty straightforward to select only the polygons you want to plot: just use the standard -if/in- options. For example, using the example datasets shipped with -spmap-, you can map only the northern part of Italy as follows:
/* Open attribute dataset */
use "Italy-RegionsData.dta"
/* Full map */
spmap fortell using italy-regionscoordinates, id(id)
/* Partial map */
spmap fortell using italy-regionscoordinates if zone==01, id(id)
Best wishes,
Maurizio Pisati
Il giorno 15/nov/2010, alle ore 09.43, Niels Schenk ha scritto:
> Dear François,
>
> Would you please briefly summarize the method you have found in R, or
> provide a link to the information that you used? This would help me and
> possibly also other statalist members.
> This weekend I have been struggling with the same issue that you had.
> After some searching I found out how to select one municipality from a
> national shapefile of the Netherlands.
> My solution that worked in Stata:
> - download and install the freeware program QGIS at
> http://www.qgis.org/
> - open the original shapefile in QGIS by adding a vector layer
> - selecting the areas you need (right click on the map, go to attribute
> table and select areas based on the attributes provided)
> - go to layer - export selection as vector file
>
> This gives you a shapefile that you can import into stata using
> shp2dta.
>
> Best,
>
> Niels
>
> On Mon, 15 Nov 2010 00:32:42 +0100, François Briatte
> <[email protected]> wrote:
>> Dear all,
>>
>> As a brief follow-up, I have found a way to use the shapefiles
>> mentioned below with R, in a way that produces exactly the kind of map
>> I was aiming at producing. Problem solved, then.
>>
>> Best regards,
>>
>> François
>>
>
> *
> * 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/