This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Stat 133, Fall 2009 Short assignment 5: XML Due Tuesday Oct. 27 at 11 pm on bSpace You may work in groups of up to three people for this assignment if you like, but please upload a file for each person to bSpace. Your task is to create a Google Maps animation showing the times, locations, and magnitudes for magnitude 3+ earthquakes in California, Nevada, and Oregon over the last 40 years. Google Maps uses a particular dialect of XML called KML. I have given you some R code that youll need to modify. A note: If you get stuck, dont try to do everything at once; think about what the XML code is that you want to create first, and only then write your R code to generate it. 1. Use source(&quot;KMLPoints.R&quot;) to run the R code for creating the KML file Earthquakes.kml. Note that when extracting latitude and longitude from the data frame, I included only the first 100 earthquakes. Well change this later. 2. Open up Earthquakes.kml in Google Earth, and also open it up in a text editor to see the text version of the XML. You should see 100 yellow pushpins, which are the default icon in Google Earth. Each pushpin corresponds to a single Placemark node in Earthquakes.kml. Take a look at the R code, specifically the for loop starting for(i in 1:length(coord)) , and make sure you understand how the tree structure within each Placemark node in Earthquakes.kmlsure you understand how the tree structure within each Placemark node in Earthquakes....
View Full Document
- Fall '08