I thoroughly enjoyed my first hackathon (you can read about my experience about scope from a previous post). The opportunity arose through BetaNYC to participate in the Mobility for All Abilities Hackathon, part of the larger National Day of Civic Hacking of 2019.

I was on the Reliable Access to Subways team, partnered with TransitCenter and United for Equal Access NY and our prompt was this:

We want to explore *why* elevators and escalators breakdown, and present the data in a way that illuminates patterns and insight into solutions.

Here are some things to keep in mind if you’re going…

In researching Afinn sentiment analysis, I came across a post on Stack Overflow with this simple request:

I want to understand the afinn code

from afinn import Afinn
from nltk.corpus import gutenberg
import textwrap
afinn = Afinn()
sentences = (" ".join(wordlist) for wordlist in gutenberg.sents('austen-sense.txt'))
scored_sentences = ((afinn.score(sent), sent) for sent in sentences)
sorted_sentences = sorted(scored_sentences)
print("\n".join(textwrap.wrap(sorted_sentences[0][1], 70)))
A novel “BY A LADY”

This is the code included in Afinn’s documentation. Before we break down what’s happening here, let’s take a step back and look at Afinn’s purpose and why I think this block of text is a funny use of it. A read of…

If these two pandas could append to a CSV, they’d be more useful than cute

I wasn’t able to find a simple solution for this, so here we go with this blog post. May as well make myself useful while my code is running, right?

I regularly need to find myself the same exact recipe for chocolate chip cookies, and I’m regularly annoyed by all the exposition before the recipe, so I’m including the recipe first.

# numpy isn't necessary except to generate some dataimport numpy as np
import pandas as pd
# our first dataframe, 100 random rows, 4 columns with headersdf = pd.DataFrame(np.random.randint(0,100,size=(100, 4)), columns=list('ABCD'))# writing the csvdf.to_csv('test.csv')#…

Does your Yelp review matter? It depends. I recently finished a very early version of my PIZZAmetrics project, which involved a lot of work with Yelp data. During a conversation with Michael Carlisle, we started asking when a restaurant’s Yelp reviews start observing the Law of Large Numbers.

Over 75 year of pizza deliciousness (photo credit: me)

I’m fortunate that my project focused on the best pizzerias in New York City, which also include some of the most reviewed pizzerias in NYC on Yelp. For the purpose of this blog post, I’ll be focusing on L&B Spumoni Gardens’ reviews from May 17, 2006 through July 22, 2019.

When you…

Institutional Escape, from the Flatiron School “Dark Science” Game Jam

Making a game during at the Flatiron School’s “Dark Science”-themed game jam helped me better understand classes and Object Oriented Programming, but more importantly it helped me understand scope.

We used pygame to program the game with the most experienced of us watching and coding-along with about two hours of tutorials. Pygame was the most logical choice, since we all have experience working in Python, but it doesn’t mean working with it to build a game was easy.

We had grand plans. Our game was going to be a top down action game like The Legend of Zelda or Pokemon…

it’s a figure with an ax. you’ll get this joke eventually.

In a previous blog post, I wrote about how I’ve always enjoyed tearing something apart (and sometimes reassembling it) to understand it better. If it worked for Da Vinci, it should work for me, right? The purpose of this blog post is two fold. I intend to tear Matpltlib and pyplot apart to have a deeper understanding of how it works on a conceptual level (with visual and code examples) and then I also intend to show as many examples as possible of how different keyword arguments can change the appearance of a plot.

This wasn’t the project that I…

Jeanne Dielman, 23 Commerce Quay, 1080 Brussels

Let’s talk about web scraping for a moment, because I thought it would be easy, it almost was!

First, I have an interest in pizza. It’s more than an interest, let’s call it a passion. NYC’s pizza history was recently called into question, but that won’t impact this topic.

I’m interested in pizza and suddenly learned web scraping, what was I to do? I started collecting information. I already had a spreadsheet of every pizza place that’s recently been listed as the “best” in New York, with about 175 on the list across all five boroughs.

all images from clango.org’s t-shirt store

When I was a kid, I was the kind of kid that took things apart, but not in that “kid genius” way. I liked tinkering with things. I never got to the point where I would disassemble something, but I’d just take it apart in small bits and see what happened without them.

Rob Blatt

Data science, pizza, data analytics, visualizations, and explorations.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store