Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spmap distortion

    Hello,

    I have been trying to make a map using census tract shape file obtained from Census Bureau.
    I am not sure if it is the issue with spmap command that produces distorted boundaries (see the attached image) across the region (census tract).
    Below is the code that I used. The blurred region could be the major cities like Austin, Houston, and Dallas in TX and maybe the issue is due to the fact that there are so many regions overlapped to fit in the map size.

    In addition, the right corner (south-east), the boundary is also strange because there are unnecessary lines at the end of the border. If anyone knows how to fix these problems, I would really appreciate it. Thanks.

    Code:
    spmap X1 using "example.dta", id(id) fcolor(Reds2) clmethod(custom) clbreaks(0 1 2)  polygon(data(Tracts_coord.dta) ocolor(black)) legend(label(2  "1 store (54)") label(3 "2 stores (2)"))
    Click image for larger version

Name:	Screen Shot 2022-08-03 at 11.11.29 PM.png
Views:	1
Size:	401.3 KB
ID:	1676335

    Last edited by Priver JM; 03 Aug 2022, 21:24.

  • #2
    It is not that the polygons are overlapping but that you are plotting over 5000 separate polygons where some of them are very small. Asjad Naqvi's -clipgeo- might be of use: https://github.com/asjadnaqvi/stata-clipgeo

    The line off the apparent county borders in the south east are the Padre Islands that run along the coast:

    Click image for larger version

Name:	Capture.PNG
Views:	1
Size:	27.4 KB
ID:	1676384

    Comment

    Working...
    X