Geolocation ISP IP Follow Up Tutorial
โœ‚๐Ÿƒ๐Ÿพโ€โ™€๏ธ๐Ÿƒ๐Ÿผโ€โ™‚๏ธ
๐Ÿ“–

Geolocation ISP IP Follow Up Tutorial

Geolocation ISP IP Follow Up Tutorial

We discovered yesterday this great resource for data feeds (thanks to great link for the great lead) at JSON IP and GeoIP REST API (IP Geolocation) by Telize. In the course of discovering its usefulness we saw that it returned geolocation data for what the ISP determined is the geographical location of your visitor IP address for your session with that ISP. So we did this at Newtown here, and went out and about and did the same execution logged into some Telstra free Wi-Fi public connection arrangement.

So if this is the case, what do you think would improve the functionality of the software? Youโ€™ve probably guessed, and the scenario is awfully similar to the scenario of Yahoo YQL Nextbus JSON Primer Tutorial โ€ฆ we compare โ€œourโ€ geographical position with the ISPโ€™s one.

Once you have two geographical positions and you wake up โ€ฆ well, once (a few moons ago) โ€ฆ as a Land Surveyor โ€ฆ youโ€™d be obliged โ€ฆ well, youโ€™d just have to โ€ฆ for all intents and purposes โ€ฆ in the fullness of time โ€ฆ calculate an Earth Great Circle Distance โ€ฆ or if you think we live in a wonderful worrrrrrld โ€ฆ we calculate an Earrrrrrth Great Circle Distance โ€ฆ believe it or not they calculate to be the same?! Hereโ€™s some JavaScript code โ€ฆ



function great_circle_distance(talis, gnolis, latis, longis) {

var ourdist=0.0;

var rgnol=eval((gnolis) * Math.PI / 180.0);

var rtal=eval((talis) * Math.PI / 180.0);

var rlong=eval((longis) * Math.PI / 180.0);

var rlat=eval((latis) * Math.PI / 180.0);

var deltalong = Math.abs(eval(((gnolis)-(longis)) * Math.PI / 180.0));

var acof = eval(Math.sin(rtal) * Math.sin(rlat)) + (Math.cos(rtal) * Math.cos(rlat) * Math.cos(deltalong)); // via //en.wikipedia.org/wiki/Great-circle_distance ... thanks

ourdist = eval(Math.round((Math.acos(acof) * 6371000.0) + 0.00001) * 100) / 100;

return ourdist;

}

So we calculate this in JavaScript and show you this along with three Google Chart Map Chart scenarios โ€ฆ

  1. ISP IP address position
  2. Your position
  3. ISP IP address position and Your position (to see how far apart they are on a map)

โ€ฆ if Magellan had had Google Maps Iโ€™m sure heโ€™d have done something similar.

Hopefully you will find something interesting with todayโ€™s liveโœ‚run, and you can download HTML programming source code you could call geoipโšซhtml, with changes to yesterday described in thislink.



Previous relevant Geolocation ISP IP Primer Tutorial is shown below.

Geolocation ISP IP Primer Tutorial

Geolocation ISP IP Primer Tutorial

Itโ€™s good every now and then to see what is new in the world of data feeds on the internet, so that is how, via this great link, we got onto the wonderful Acronym lookup resource at NaCTeM (The National Centre for Text Mining) which resulted in Acronyms Lookup Follow Up Tutorial yesterday and the day before. Today we turn our attention to another great resource JSON IP and GeoIP REST API (IP Geolocation) by Telize, whose functionality we have really enjoyed, and been intrigued by.

Geolocation is about the โ€œwhereโ€ in life. Arguably the best looked after concept out of โ€ฆ

  • where?
  • how?
  • when?
  • who?
  • why?
  • what?

โ€ฆ for web applications is โ€œwhereโ€ โ€ฆ and as a former Land Surveyor itโ€™s a great and interesting I.T. worrrrrrld out there man person.

But to use that โ€œlastโ€ questioning word โ€ฆ โ€œwhat is the geolocation showing?โ€ โ€ฆ today it is not โ€œyourโ€ position, but with the Telize functionality, it is what your ISP has determined is the publicly released position of the โ€œvisitor IP addressโ€ of your session.

And so it came to pass that we created the HTML/JavaScript (jQuery) geoip.html โ€ฆ nice looking โ€œwordโ€ huh?! โ€ฆ if you want the โ€œwhatโ€ of geoip.html โ€ฆ here it is here. Golly, woke up on the โ€œawkward cussโ€ side of the bed โ€ฆ didnโ€™t we? โ€ฆ eh, wot?! โ€ฆ charley โ€ฆ maaaate?

So took geoip.html on a field trip to one of those public Telstra Wi-Fi connections you get around some public phones sometimes (isnโ€™t it great?) โ€ฆ speaking of which, the public phone near Clemโ€™s in Newtown, at Mardi Gras time got a creative makeover โ€ฆ take a squizz here โ€ฆ and geoip.html came up with this โ€ฆ see how the latitude and longitude are rounded โ€œhugelyโ€ โ€ฆ which puts it right in the middle of the land mass of Australia โ€ฆ guess this is for an inaccurately positionally defined visitor IP address, which I guess is defined by the ISP, in this case Telstra. And so I learn โ€ฆ with the tutorial picture too, I donโ€™t live at Kensington, where the execution here at Newtown got Kensington as the location of the IP address here, so this is a web application for โ€œball parkโ€ usage, but intriguing in the information available none the less, and we link things off all these interesting data items for our liveโœ‚run โ€ฆ try it yourself? โ€ฆ was intrigued by โ€œcontinent codeโ€ and found a useful link that lists countries and their capital cities for a โ€œcontinent codeโ€ โ€ฆ pretty useful .. eh? wot? govโ€™nor? โ€ฆ see you at the Jasmine Allen in two shakes โ€ฆ or see you for a Monte on the Bronte.

Below are linking-to (thank you) websites with derived information of great use โ€ฆ

Hereโ€™s the crux of the HTMLโ€™s JavaScript (jQuery) that sets up the environment for the โ€œonloadโ€ event logic which mainly involves JSON parsing and analysis โ€ฆ



$(document).ready(function() {

$.getJSON("//www.telize.com/geoip?callback=?",

function(json) {

// start of JSON parsing logic

// ...

// end of JSON parsing logic

});

});

So maybe you will find something interesting with todayโ€™s liveโœ‚run, and hope to see you tomorrow with more functionality ideas.

If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.

This entry was posted in eLearning, Land Surveying, Networking, Software, Tutorials and tagged , , , , , , , , , , , , , , , . Bookmark the permalink.

7 Responses to Geolocation ISP IP Follow Up Tutorial

Leave a Reply

Your email address will not be published. Required fields are marked *