Skip to content

Instantly share code, notes, and snippets.

View josiahdavis's full-sized avatar

Josiah Davis josiahdavis

View GitHub Profile
@josiahdavis
josiahdavis / model.py
Last active August 23, 2017 17:29
Updating the [census canned estimator sample](https://github.com/GoogleCloudPlatform/cloudml-samples/tree/master/census/estimator/trainer) to include key value from input data
# Copyright 2016 Google Inc. All Rights Reserved. Licensed under the Apache
# License, Version 2.0 (the "License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.
@josiahdavis
josiahdavis / .DS_Store
Last active January 13, 2017 21:54
Simple bootstrapping example
@josiahdavis
josiahdavis / Readme.md
Last active November 1, 2015 14:29
Nuance in Yelp Reviews II

Some customers are more nuanced than others.

This visualizations shows the positivity and negativity in yelp reviews. The size of the data points corresponds to the number of words in the review. The sentiment is scored using the NRC lexicon created by Saif M. Mohammad and based on implementation by Matthew Jockers.

@josiahdavis
josiahdavis / .DS_Store
Last active October 30, 2015 03:33
Nuance in Yelp Reviews
@josiahdavis
josiahdavis / .DS_Store
Last active October 30, 2015 22:29 — forked from mbostock/.block
Usefulness in Yelp Reviews
@josiahdavis
josiahdavis / .DS_Store
Last active October 27, 2015 03:10
Complaints in yelp reviews
@josiahdavis
josiahdavis / Readme.md
Last active October 7, 2015 06:51
Word / Rating Association

Analysis

Notes

@josiahdavis
josiahdavis / .DS_Store
Last active October 3, 2015 22:10
What words do people use to describe their coffee shop experience?
@josiahdavis
josiahdavis / README.md
Last active September 26, 2015 01:15 — forked from mbostock/.block
Common Machine Learning Algorithms
@josiahdavis
josiahdavis / Readme.md
Last active October 3, 2015 02:13
How do people feel about Coffee?

Not bad, apparently.

This chart plots the average emtional valence contained within Yelp reviews for coffee shops across 8 emotions, four positive emotions on the right, and four negative emotions on the left. Interestingly, Starbucks seems to provide a less emotionally rich experience than going to other coffee shops. Possibly, this is due to the fact that Starbucks customers dissproportionally dilute their coffee with cream and sugar, and thus dilute their coffee-drinking experience. The greatest joy seems to be coming from the Other category, possibly a testament to the romance often associated with Independent Coffee shops. Apparently, the most anticipated place is Krispy Kreme. It makes sense, people likely eat donuts much less than they drink coffee, so when they go, it's a specical event.

Notes

This chart is built using the the radar-chart-d3 plugin created Alvaro Graves. The emotional valence was estimated using the [syuzhet R package](