Earthquake Spreadsheet and Google Maps
near Mr J Whitehead. ?
Earthquake Spreadsheet and Google maps
After much thinking and a fair amount to of exertion, there is a way to show the site of an earthquake on Google Maps, using the latitude and longitude facts establish in the spreadsheet. This is significantly easier that I thought.
The URL
The foremost position is to grasp the URL - what goes in the speech rod of the browsers. The Google Map API is extremely potent and we are using a small hack of it.
We then join stuff at the extremity of the URL to specify the latitude and longitude as well as the level of zoom.
The URL takes the following shape:
maps.google.co.uk/maps?f=q&hl=en&q=
q=xx.x+yy.y&z=z
Where xx.x = the latitude; yy.y = longitude and z is the even of zoom, 1 being the entire world. This gets stuck onto the end of the URL.
So the following URL would put the partition somewhere in the central of El Salvador.
http://maps.google.co.uk/maps?f=q&hl=en&q=13.7+-89.32&z=10
Excel Law…
This is a little morsel more hard as we require to persuade Surpass to produce the correct URL representing us from a the latitude and longitude facts.
Movement 1 - place the base map URL in an Excel chamber
This is a straightforward reproduction and paste work.
In my case I possess put it into chamber J2.
Step 2 - Build certain lat and long are in a sensible appearance
Build certain your lats and longs are in a sensible format - and that they are consistent. In my case they are in columns E and F - I find it helps to chill the panes so that the titles are always visible.
Step 3 - Concatenation
This is not as rigid as it sounds - we require to make along URL using a order in Surpass called Concatenate - in my case I am going to make a map representing the Boxing Daytime Tsunami 2004.
My Surpass law desire look like this:
=CONCATENATE($J$1,E31524,”+”,F31524,”&z=6″)
This looks involved - but it isn’t.
- $J$1 is a perfect chamber reference to the base URL I am thriving to make.
- E31524 is the chamber containing the latitude
- “+” creates a plus sign in the right location of the URL
- F31524 is the cell containing the longitude
- “&z=6″ is the zoom command
Note all is separated near commas.
Movement 4 - Make the Hyperlink
You possess created what to all intents and purposes is a hyperlink - but we require to tell Surpass. In chamber J31524 create a novel command that turns the value of a chamber into a hyperlink - funnily sufficient this looks like this:
=HYPERLINK(I31524,”Boxing Daytime Tsunami”)
This turns the cell we possess fair created in our concatentation above into a tie which is labelled Boxing Daytime Tsunami.
Simply click on the tie to outlook the location of the Earthquake - opens in IE window.
Next Steps…
There are loads of things we could do with this…..
Proposal 1
In the box that pops up - write the law that inserts some further knowledge round the tremble - e.g. deepness, period, magnitude etc.
Suggestion 2
Stick on image in the box that pops up
Proposal 3
Make a web page - this single is a small challenging - that plots all the quakes for a year (or more). To do this you require to:
- Obtain the API law away Mr W
- See at Google Map APIs - URL here - http://www.google.com/apis/maps/documentation/#Using_XML_and_Asynchronous_RPC
- Make an XML file of the facts
- Employ the spider’s web page stated and the XML document together to create a map of your facts.
Suggestion 4
Create a Macro that allows the consumer to stick in a lat and long (either near clicking a pair of cells or entering the numbers manually). The macro then opens up a spider’s web page.
This could be linked to a command button.
You should direct to try and do single of these…..
Appraisal
This is a classic bit of stuff that could be used as an appraisal - speak round the ones you possess not done, this is what I would do if I was to do this again.
This is seriously hard coding……
Agreeable luck.
Alternate to graphs
If you are not getting on well with your graph, and are not pleased with it, and are struggling to obtain the Surpass formulas in there, this could be a fortune representing you to gather some bullet points as if you do it appropriately it desire strike the following points:
- Perfect cell referencing
- Advanced formulae
- Macros
Plus anything else you can think of….
Most Expensive WhiskyLooking Forward to Monday
The Pedometer
Google Analytics 2.0
MeetNLunch in GuRu
Google Map, Thailand
Browser Window Real Estate
Discussion Area - Leave a Comment