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.
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
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)
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…
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.
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.
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…
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…
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.
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.
Data science, pizza, data analytics, visualizations, and explorations.