Announcement

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

  • Using grmap to create a redlined map of the Cleveland Area

    Hello. I am having trouble with the grmap command when creating a redlined map of the Cleveland Area. There should be 4 designations of holc_grade (1=A, 2=B, 3=C, and 4=D), but when I encode the string variables, the map only shows 1-2, 2-3, and 3-4.
    I would also like 4 to have a red color, 3 to have a yellow color, 2 to have a blue color, and 1 to have a green color.

    This is the code I am currently using:

    ssc install spmap
    ssc install shp2dta
    ssc install mif2dta

    cd "C:\Users\Liam\OneDrive - The College of Wooster\IS_DATA"
    spshape2dta cartodb-query, replace
    use cartodb-query, clear
    encode holc_grade, gen(holc_n)
    grmap holc_n

    Thank you for any help!
    Attached Files

  • #2
    use the grmap options -clmethod(unique)- and -fcolor()-

    Code:
    //Cleveland's City Neighborhoods (Statistical Planning Areas)
    copy http://planning.clevelandohio.gov/gisdata/neighborhoods_SPAs.zip .
    unzipfile neighborhoods_spas.zip
    spshape2dta  "City Neighborhoods/City_Neighborhoods"
    use  "City_Neighborhoods" ,clear
    generate rannum = uniform()
    egen group = cut(rannum), group(4)
    replace group = group + 1
    grmap group, clm(u) fcolor(green blue yellow red) legend(pos(6) row(1))
    Click image for larger version

Name:	cleveland.png
Views:	1
Size:	107.8 KB
ID:	1733663

    Comment


    • #3
      Thank you so much! it worked!

      Comment

      Working...
      X