Location Is Everything: Getting Into ArcGIS in 5 Minutes
By: Mark Cleverley
Tags: Earth, Maps, GIS, Data Science, Python

In the digital age we never lack for information, but often have trouble finding useful knowledge. The answer is nuance.

Context makes data truly useful.

Add the Pareto Principle: Of all the total information about some topic, 80% of the “useful knowledge” is contained in about 20% of the net information.

Some context matters more than others.

You will often be reminded of this. We don’t mind petting a salamander but steer clear of alligators, even though their shape and function is largely the same.

It’s why Facebook knows what ads to show you, even though it doesn’t have access to all the thoughts in your brain (yet).

They don’t know “all that’s on your mind”. But analyzing your GPS data, search history (they own Instagram, remember) and yes, listening through your phone’s microphone is enough to understand “what’s on your mind enough that you bother talking and writing about”.

That’s why you see strangely specific ads for something you talked about with your friend but never searched for. This is context at work.

And as any real estate agent would tell you, there’s one type of context that usually trumps all others: location.

Geospatial Data

Everything (that we know of, at least) physical exists somewhere in space. If the object or topic you’re studying is able to be geotagged & recorded on a map, it’s often surprisingly helpful to do so.

Google Maps gives you a handy estimate of traffic on your route: It’s able to do this by tracking (hopefully anonymized) GPS data from phones it’s installed on.

By comparing the distance between consecutive location update “pings” and the time they were issued, it can discern in real-time when cars are backed up on a highway they normally travel 60mph on.

However, working with GPS data seems like an awfully big field to get into, technically speaking. Fortunately, other people have already done most of the heavy lifting regarding coordinate-friendly data structures and packaging:

ArcGIS is one of the more robust geospatial analysis software libraries out there. It has a host of features from data storage, server integration, in-built deep learning and smooth visualizations.

It is, without a doubt, the next clear step on our journey to understand why hexagons are so prevalent in nature, and why they’re so useful for geographic data modeling.

If that seems like a stretch, here’s a module diagram straight from their tutorial page. Tessellation is just another word for “efficient Euclidean data compression”.

They have various pricing plans for their full desktop & business suites, but the easiest way forward is to create a free Developer account to use with the API and Python modules.

They have a number of setup options, but I elected for the clean Anaconda command line installation: conda install -c esri arcgis . If you’re like me and enjoy living dangerously, make sure to install all new packages directly in your main environment.

As is tradition for messing around with a new data science toolkit, open up a Jupyter notebook and install a good-looking theme, as only the most terrifying of beasts code against a bright white background.

Data in Frame

Their tutorial is quite comprehensive. We’ll start by importing the base library and instantiating a GIS object using our account we made earlier.

from arcgis.gis import GIS

gis = GIS("https://www.arcgis.com", "username", "password")