Statalist


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

Re: st: tmap problem -- extra lines


From   Sergiy Radyakin <serjradyakin@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: tmap problem -- extra lines
Date   Tue, 20 Oct 2009 03:16:14 -0400

inside -tmap.ado- find where it calls twoway area graph and add option cmiss(n)

option cmissing(y|n)        missing values do not force gaps in area;
default is cmissing(y)
was added in Stata 10 and causes incompatibility in -tmap-
Stata 9 should be fine.

Best, Sergiy Radyakin




On Mon, Oct 19, 2009 at 10:29 PM, June Spector <june.spector@gmail.com> wrote:
> Hello,
>
> I'm having difficulty with tmap -- in particular, there are many extra
> lines that seem to have been drawn between points in the map that was
> created (the map has many extra horizontal lines and looks messy).
>
> I have an administrative dataset with zip codes and number of patient
> visits for each zip code (variable for zip codes called "NAME",
> variable for frequency called "_freq," and file named "zip.dta").  I
> would like to create a state map that illustrates this.  I tried the
> following:
>
> * downloaded zipcode shp files by state from
> http://www.census.gov/geo/www/cob/z52000.html (e.g. for Washington
> state, file called zt53_d00)
> set mem 100m
> shp2dta using zt53_d00, database(wadb) coordinates(wacoord) genid(id)
> use wadb
> dmerge NAME using zip
> replace _freq=0 if _freq==.
> * saved dataset as wadbmerge.dta
> tmap choropleth _freq, id(id) map(wacoord.dta) palette(Blues)
>
> ******
> I tried "drop if _merge!=3" prior to the tmap command, but then whole
> areas of the map drop out.  I also tried using a different shp file
> (from https://wagda.lib.washington.edu/data/geography/us/vector/) --
> the result was improved, but there still were extra lines.
>
> ******
>
> * In case it helps, this is how I created zip.dta:
> insheet using zip.csv
> rename v1 NAME
> sort NAME
> contract NAME
> * saved as zip.dta
>
> Any advice would be greatly appreciated!
>
> *
> *   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index