Showing posts with label City Elevation. Show all posts
Showing posts with label City Elevation. Show all posts

Monday, February 1, 2010

The Future Atlantes Part II

I recently posted "The Future Atlantes Part I" and promised a new installment. Well, here it is and it took a great deal of thinking and hair-pulling and teeth-gnashing:

The idea:

Make a 3D graph of the cities (x, y) with their population (z) shown as sticks scaled by 450,000 (the maximum population of the cities under 10 meter elevation was around 12,000,000). This way, it can easily show visual learners which parts of the world have the most people in danger of having to emigrate from their home place due to global warming (either with fair-warning or with a rough storm which inundates the whole place). This dilemma poses another question: how will all these displaced persons find a home or money (who wants a home stuck under the sea)?

My seemingly simple algorithm:

I'll start assuming you know what I did for Part I.
I made some extra rules of coordinates of cities to their corresponding populations. Then, I used the points of the cities under 10 meter elevation to be my x and y coordinates and the population to be my z coordinate (scaled down by 450,000). (This all had to be filtered as well against the not available data). Then, I graphed it with Graphics3D[].

A little more in-depth:

I created one module which took about 3 lines of code to convert a 2D point (the coordinates of a city) to a 3D line(which includes its scaled population and goes straight down: similar to the Filling option of ListPlot). That one module probably did the bulk of the work (well, with Map's help as well).

(Hopefully, I can show full functionality with a video on Wolfram Demonstrations or YouTube, as recommended by Dr. Choi).

The Graph without Labels and Scaled by 450,000:


Graph with Labels and Scaled by 100,000:


Future:

Scale the populations not to a stick length but to a colored point or maybe colored tubes.

Sunday, January 31, 2010

The Future Atlantes Part I

I made a module to plot locations of where, around the world, there would be the greatest probability of inundation with an onset of rising sea levels.

My simple algorithm:

Select all cities which have Coordinates and Elevation; use those to create a rule with the following format: Coordinates->Elevation (in this part of the code, I highly suggest that you reverse the coordinate points since it's given in (latitude, longitude) or (y, x) when you need (x, y)). Then, create a module which accepts the rule as its one and only parameter.

In the module:
Make the argument and make it a list. Then, using an if statement, assign an empty list to itself except Appended the cities with a sea level of under 10 meters. Else, do Null.

Out of the module:
Map the module with the rules of all cities' Coordinates->Elevation. Then, plot the points on top of the plotted world map (I recommend using the "Polygon" property of CountryData).

The Map:



Credits: CityData[], CountryData[], Map[], Graphics[], FreeQ.

Part II: When I get some more time, I'll post up the final, stunning update!