# unrest in the Mideast GDP map procedure with maple

February 22 2011 by
false
Maple 12

11

I thought I'd create a partial map of the middle east using a procedure with Maple.  Let me say it's not the quickest thing to do when the data format is not particularly favourable.

I downloaded data from Coastline Extractor from ngdc.noaa.gov/mgg/coast.  This gives you point data sets.  You can then use maple to pointplot the points.  Now with some graphs having more than 400,000 points it can slow Maple up a little.  A simple algorithm will reduce the number of points.

I did something like this

If this was my variable containing the data
a:=readdata(c:/27336.dat,2)  #the filename was 27336.dat and contained 2 rows of data

b:=[seq(a[i*16],i=1..nops(a)/16)]:  #the reduced data set

However this didn't allow me to achieve what I intended.  So I set out labouriously (and roughly) manually picking points to trace out the borders of countries.  If anyone has a simpler way please feel free to let me know about it.

In any case I've included a worksheet with my simplified datapoints of countries I completed.  The Map does not include all the countries I finished.  And also the worksheet could be made more efficient by changing the concatenation lists to arrays.  Ironically I left out Tunisia (where the unrest all started) in the map however I did include it in the countries data list so you can always insert it later.  The only other thing I noticed with Maple was when I converted the polygon to 3 dimensions Maple added extra fill along parts of the borders (not really sure why it does that).

You can easily see why Egypt went into unrest.  Look how low it's GDP per capita is compared to it's surrounding countries.  But also notice that Libya's GDP is relatively high hence the very high resistance to change not to mention other things.  I'd imagine Saudi Arabia would have even more resistance.  Just speculation on my part though.