1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
open us-states.geojson --quiet --frompkg=geoplot
join statepop.gdt population --ikey=postal --okey=Code
print -o name postal population
# cut out Hawaii and Alaska
smpl postal != "HI" && postal != "AK" --restrict
bundle options = null
options.plotfile = "us_states_json.plt"
options.height = 500
outlines_only = 1
if outlines_only
geoplot($mapfile, null, options)
else
# show population levels in shades of blue
options.palette = "blues"
options.title = "US states, population (lower 48)"
geoplot($mapfile, population, options)
endif
|