Hackers and Slackers: Data Science for Badasses


9 Posts
Consuming and building APIs.

Cloud SQL Postgres on GCP

Diving into Cloud SQL and its out-of-the-box API

Well folks, I have a confession to make. I've been maintaining an affair with two lovers. That's right; they're none other than Postgres, and Google Cloud. While such polygamy may be shunned by the masses, I believe that somehow, some way, we can just make this menage a trois work. What entices me about Cloud SQL is the existence of the Cloud SQL API , which generates predictable REST endpoints for presumably reading and writing to your database. Please allow a

Google Cloud Author imageTodd Birchard August 10

Abusing Tableau to Handle ETL Workflows

Weaponizing APIs against tyrannical software

Before we get into the specifics of how to sadistically abuse Tableau, let's clear the air: there's something about inaccessible, expensive, proprietary enterprise software that tends to put me in a touchy mood. As we know, B2B software pricing has nothing to do with code quality or even value-add, but rather the tendency of businesses to create time-based urgencies without warning; the kinds of urgencies which may be solved by, say, a tool of sorts.

My first interaction with Tableau

Tableau Author imageTodd Birchard August 03

Automagically Turn JSON into Pandas DataFrames

Let pandas do the heavy lifting for you when turning JSON into a DataFrame.

In his post about extracting data from APIs, Todd demonstrated a nice way to massage JSON into a pandas DataFrame. This method works great when our JSON response is flat, because dict.keys() only gets the keys on the first "level" of a dictionary. It gets a little trickier when our JSON starts to become nested though, as I experienced when working with Spotify's API via the Spotipy library. For example, take a look at a response from their https:

Python Author imageGraham Beckley July 28

Extracting Massive Datasets in Python

Abusing APIs for all they’re worth

Taxation without representation. Colonialism. Not letting people eat cake. Human beings rightfully meet atrocities with action in an effort to change the worked for the better. Cruelty by mankind justifies revolution, and it is this writer's opinion that API limitations are one such cruelty.

The data we need and crave is stashed in readily available APIs all around us. It's as though we have the keys to the world, but that power often cones with a few caveats:

  • Your "key"
Python Author imageTodd Birchard July 04

Dealing with XML in Python

Because you'll probably have to

Life is filled with things we don't want to do; you're a developer so you probably understand this to a higher degree than most people. Sometimes we waste weeks off our lives thanks to an unreasonable and unknowledgable stakeholder. Other times, we need to deal with XML trees.

At some point or another you're going to need to work with an API that returns information in XML format. "Sure," we might think, "I'll just import the standard

Python Author imageTodd Birchard June 19

Creating Endpoints with Lambda

Building an API using AWS, part 2

Sup fam, let's pick back up on our quest to build meaningful shit. If you've been following along so far, you should already have the smarts to set up an RDS database, as well as the general idea behind what lambda functions are.

You should have enough familiarly to dive into the AWS console and create a custom lambda function. For personal preference we'll be using Python 3 to create this endpoint, although the general community does seem to gravitate

APIs Author imageTodd Birchard May 13

API Development in AWS 101

Building an API using AWS, part 1

Enough with the 101 tutorials, it's time to step our game up… we're going to build an API. All those other posts? They were just wax-on wax-off... classic Mr. Miyagi maneuver. This is what separates the men from the boys, the hax0rs from the n00bs, the nerds from the... other nerds.

If you managed to catch the tutorial on setting up RDS on AWS, you're already a step ahead. We're going to make our way through this slowly, which is

APIs Author imageTodd Birchard May 06

Python's Requests Library

APIs like a snake

Last episode we taught you how to make GET requests using Ajax, where you learned to store and pass private keys on the client side like an idiot. Today we'll do the equivalent in Python by using the requests library to interact with API endpoints.

We'll be using JIRA's API as an example of how to format GET and POST requests. There's a ton you can do with this particular API so it's a good way to demonstrate how much

Python Author imageTodd Birchard May 01

API calls with JQuery

APIs for noobs

Making apps kind of sucks if you're not interacting with data or APIs. The information age is over... we have all the information now. All of it. We're in a unique place in human history where we've somehow managed to mine more data than we know what to do with... and a lot of that data is easily accessible via APIs.

We're going to get our feet wet with REST APIs here. Making Ajax GET calls with JQuery is perhaps

Frontend Author imageTodd Birchard April 25