File: us_states_json.inp

package info (click to toggle)
gretl 2022c-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 59,552 kB
  • sloc: ansic: 409,074; sh: 4,449; makefile: 3,222; cpp: 2,777; xml: 599; perl: 364
file content (22 lines) | stat: -rw-r--r-- 554 bytes parent folder | download | duplicates (2)
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