addons/geoplot/examples/founders_mod.inp
raw| 1 | open founders.geojson --quiet --frompkg=geoplot |
| 2 | join founders.csv gdp pop --ikey=FID --okey=code |
| 3 | series gdppc = 1000*gdp/pop |
| 4 | |
| 5 | # open full GeoJSON as bundle |
| 6 | bundle b = bread($mapfile) |
| 7 | |
| 8 | # add gdppc per country to properties |
| 9 | loop i=1..nelem(b.features) |
| 10 | b.features[i].properties.gdppc = gdppc[i] |
| 11 | endloop |
| 12 | |
| 13 | # save modified geojson file |
| 14 | bwrite(b, "founders_mod.json") |