Hi guys,

I am trying to map the result by using "spmap" command, yet keep having troubles with the error saying "master data not sorted"...

Below is the code that I used,
------------------------------------------------
use "$processed/production_regional.dta", clear

format weight_edible_ameday %4.2f
spmap weight_edible_ameday using vietmap_province_region3.dta, id(_ID) fcolor($colorscale) ///
legend(symy(*1) symx(*1) size(3) pos(4)) ///
title("Total harvest (kg/day/AME)", size($titlesize)) cln(7) ///clm(c) clb($cats) ///
note("Source: ***** crop production", size($notesize))
graph export "$maps/prod_region_weight.png", as(png) replace
------------------------------------------------


Can anyone tell me how I can resolve this problem?

Many thanks,

Manny