Tuesday, April 21, 2009

More Final Project progress and comments

There have been a few problems I've run into while designing this that still need figuring out, mainly design and look-wise problems, along with a few back-end problems.

Here are some things that still need figuring out:
  • In showing 1 hour data, should there be separation of color for earthquakes that happened within the last ten minutes as opposed to quakes that happened within the last 45 minutes?
  • In one day data, color will also be used to differentiate the time between the earthquakes. How many classes is best? 3 Colors, RED ORANGE YELLOW for 1 hour, 6 hours, 12+hours? Four classes? A smooth gradient going from red to yellow over a 24 hour span?
  • Same problem for 1 week data- 1 day, 3 day, 5+ days? etc?
  • Splash screen - needs alot of love and more a better and more appealing flow. (although I do like the seismogram I made, just not its placement etc)

  • BACKEND PROBLEMS:
  • Keep track of earhquake markers to allow for on the fly changes of size or other options by user
  • Keep track of earthquake markers in different data sets (1 hour, 1 day, 1 week) to allow the user to toggle between them without having to redraw everytime
  • Catch errors when user tries to view earthquakes when an active internet connection is not available - display cached data? Same problem for GoogleMap tiles not loaded.
  • fix pan left up down right buttons.
  • fix 'show source' content.
  • change the info content
  • Preloader to load all data before trying to display the map.
I didn't want to show the progress of my final project but decided to do so anyways. I figured who best to ask for opinions and ideas than the people I'm presenting it to.

If you guys have any ideas on visual changes and/or backend programming changes pleasseee let me know!


http://mason.gmu.edu/~jgonzalf/earthquakev2as3.html
(note this is NOT the most recent update)

Final Project Progress

For my final project I really wanted to make a map that would be constantly changing; Something that could, whenever it were viewed, tell you what was going on at the moment in time. With technology increasing and the availability of live feeds from so many sources, this seemed like a great idea.

I ended up deciding to use the feeds from the USGS to map earthquake data around the world. Its very impressive actually see the amount of earthquakes we have in the US daily, even though most go unnoticed and not felt.

To view the data I'm using, click HERE to view 1 days data, and HERE to view a weeks worth.

Now some example code and explanation of it:
---------------------------------------------------------------
  1. var url:String="http://earthquake.usgs.gov/eqcenter/catalogs/eqs1day-M1.txt";
  2. var usgsDataLoader:URLLoader = new URLLoader();
  3. usgsDataLoader.addEventListener(Event.COMPLETE, textLoaded);
  4. usgsDataLoader.load(new URLRequest(url));
  5. function textLoaded(event:Event):void {
  6. var usgsDataDay:String=event.target.data as String;
  7. }
---------------------------------------------------------------
Line 1 makes a new variable called url which contains the location to the data file we are trying to fetch and read.
Line 2 creates a new url loader - this will read information from a URL and load it into flash.
In line 3, we add an event listener to our url loader - once the URL is loaded into flash, the function "textLoaded" is run.
We finally load our usgsDataLoader variable with the info from our URL.
upon completion of loading our data, we call our textloaded function and make a new variable of type string which holds the data from our loader

There you have it...how to load external data into flash. Although we now have our data loaded into flash, there is alot we have to do before we can actually make use of it such as parsing and splitting it up or searching through our text to find parts of interest, and even more work before we can incorporate it into our FLASH ide, making information in the text actually affect something in our flash movie.

If you have any questions on how this code works feel free to post up.

switching over to AS3.0

So yea - Not that I'm a big ActionScript coder (actually...not one at all) - I had been used to using the simple functions of AS2.0 - But a few weeks ago, I finally made the switch. Not because I wanted to do, but mainly because I wanted to use a map API that required the use of actionscript 3.0.

Surprisingly, the switch was pretty painless and only took a little bit to figure out its work-flow. Maybe I do have an advantage since I am a computer science major and the structure and work flow of as3 is something I'm much more used to.

Although AS3.0 will most likely look more intimidating to new coders because its a much more verbose and full language which separates the programming side with the flash IDE side, it really is much more flexible and easier to debug.

If you guys are thinkign about switching over, I say do so. Although it'll require a learning curve, there are many tutorials out there on switching over.

Actionscript.org is a great resources for any AS related questions and topics - heres a good as3 tutorial:
Getting started with AS3
and there are many more if you need some resources!

Thursday, April 9, 2009

Geog411 - Lab 10 - Tsunamis and PSDs

Pre-Tsunami

Post-Tsunami

Geog411: Labs 8 and 9

Forgot to post lab 8 last week since I was away, so a double lab post today:

Google earth KMZs

Placemarks HERE

GMU Campus Buildings HERE

Also got a headstart on my final project over the weekend and am pretty happy with the idea and how its coming along