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. I can not figure out how to create designated values for each number without it being random.
Here is my current code:
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
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))
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. I can not figure out how to create designated values for each number without it being random.
Here is my current code:
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
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))