Announcement

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

  • spmap with map(backgroundmap) option

    Hi,

    I was trying to draw a HRR-level map with US background. The map(backgroundmap) option gave me "syntax error" message. My code worked well without this option. Could somebody help? Here are my codes.

    /* Work well */
    use "test_HRR.dta", clear
    spmap test_HRR using "hrr_coords.dta", id(_polygonid) ///
    clmethod(quantile) clnumber(5) ///
    legend(position(5) rowgap(1) size(vsmall) ///
    order(6 "328.3 to <338.6 (61)" 5 "325.1 to <328.3 (61)" 4 "322.4 to <325.1 (62)" 3 "319.0 to <322.4 (61)" 2 "295.3 to <319.0 (61)" 1 "Data Unavailable")) ///
    fcolor(BuGn) ndfcolor(white) oc(black ...) ndo(black) os(vvthin ...) nds(vvthin)

    /* Syntax error when adding backgroud map */
    spmap test_HRR using "hrr_coords.dta", id(_polygonid) ///
    clmethod(quantile) clnumber(5) ///
    legend(position(5) rowgap(1) size(vsmall) ///
    order(6 "328.3 to <338.6 (61)" 5 "325.1 to <328.3 (61)" 4 "322.4 to <325.1 (62)" 3 "319.0 to <322.4 (61)" 2 "295.3 to <319.0 (61)" 1 "Data Unavailable")) ///
    fcolor(BuGn) ndfcolor(white) oc(black ...) ndo(black) os(vvthin ...) nds(vvthin) ///
    map("usst51coord.dta") mfcolor(stone)

    Three datasets used in the code are attached.

    Thank you very much!

    Haiyong
    Attached Files
Working...
X