Know your APIs

Adam Pfister
2 min readJun 8, 2018

Python. So hot right now.

I’ve been digging into the ArcGIS API for Python recently, and decided it would be a great fit to make some updates to the ACLED datasets available in the Living Atlas. It would be especially helpful to make updates to the historic datasets as they are released from the ACLED website. With that in mind, I put together a Jupyter Notebook that will document the process.

If you aren’t aware, a Jupyter Notebook gives you the chance to step through lines of code and document what each part is doing. Take a look!

Whaddabout JavaScript?

So glad you asked. When I first published my AWS Lambda script to grab the most recent ACLED events, I was making raw HTTP requests. LITTLE DID I KNOW that some Esri superstars were making life easier by introducing arcgis-rest-js:

compact, modular JavaScript wrappers for the ArcGIS REST API that run in Node.js and modern browsers.

Right. On. All I had to do was swap out the raw HTTP requests for the much easier (and more readable) calls offered by the feature-service module. You can see how I implemented calls to authenticate, and both delete and insert features:

There’s much, much more to the ArcGIS Developer ecosystem. So, when it comes to APIs & SDKs, odds are we got you covered.

--

--

Adam Pfister

People don't talk that way anymore. Maybe we should. have macbook. will travel.