Nutrition d3.parsets
An interactive parallel sets visualisation for D3.js using the USDA Nutrition Data.
Parallel Sets: http://www.jasondavies.com/parallel-sets/.
Nutrition Parallel Coordinates: http://bl.ocks.org/2420080/.
#!/usr/bin/python | |
# Author: Phil! Gold <phil_g@pobox.com> | |
# License: CC0 Waiver http://creativecommons.org/publicdomain/zero/1.0/ | |
import time | |
from Adafruit_I2C import Adafruit_I2C | |
class _MPL115A2_Register: |
An interactive parallel sets visualisation for D3.js using the USDA Nutrition Data.
Parallel Sets: http://www.jasondavies.com/parallel-sets/.
Nutrition Parallel Coordinates: http://bl.ocks.org/2420080/.
I want to write software that helps kill people.
Please, before you call the police and get my github account put on lockdown, allow me a moment to explain. What I really want to do is work on projects that advance the human condition and improve people's lives. I've been in a mad dash to learn how to program for the past four or five years exactly because I realized how much good I could do for the world with a computer.
# Utilities for quickly accessing frequently used directories in bash. | |
# Usage: | |
# $ cd /path/to/project/src/ | |
# $ mark code # Will create a new shortcut. | |
# # Becomes interactive if a shortcut already exists | |
# # m is an alias for mark. You can also `m code` | |
# | |
# $ code # From now on, running this anywhere in the shell | |
# # will put you in /path/to/project/src/code |
doInstall <- TRUE # Change to FALSE if you don't want packages installed. | |
toInstall <- c("jpeg", "reshape2", "ggplot2") | |
if(doInstall){install.packages(toInstall, repos = "http://cran.r-project.org")} | |
lapply(toInstall, library, character.only = TRUE) | |
# Image URL: | |
allImageURLs <- c("http://media.charlesleifer.com/blog/photos/thumbnails/akira_940x700.jpg", | |
"http://upload.wikimedia.org/wikipedia/commons/thumb/e/ec/Mona_Lisa%2C_by_Leonardo_da_Vinci%2C_from_C2RMF_retouched.jpg/402px-Mona_Lisa%2C_by_Leonardo_da_Vinci%2C_from_C2RMF_retouched.jpg", | |
"http://upload.wikimedia.org/wikipedia/commons/thumb/e/e9/Official_portrait_of_Barack_Obama.jpg/441px-Official_portrait_of_Barack_Obama.jpg", | |
"http://cache.boston.com/universal/site_graphics/blogs/bigpicture/obama_11_05/obama22_16604051.jpg", |
I think the two most important messages that people can get from a short course are:
a) the material is important and worthwhile to learn (even if it's challenging), and b) it's possible to learn it!
For those reasons, I usually start by diving as quickly as possible into visualisation. I think it's a bad idea to start by explicitly teaching programming concepts (like data structures), because the pay off isn't obvious. If you start with visualisation, the pay off is really obvious and people are more motivated to push past any initial teething problems. In stat405, I used to start with some very basic templates that got people up and running with scatterplots and histograms - they wouldn't necessary understand the code, but they'd know which bits could be varied for different effects.
Apart from visualisation, I think the two most important topics to cover are tidy data (i.e. http://www.jstatsoft.org/v59/i10/ + tidyr) and data manipulation (dplyr). These are both important for when people go off and apply
The state of Iowa has released an 800MB+ dataset of more than 3 million rows showing weekly liquor sales, broken down by liquor category, vendor, and product name, e.g. STRAIGHT BOURBON WHISKIES
, Jim Beam Brands
, Maker's Mark
This dataset contains the spirits purchase information of Iowa Class “E” liquor licensees by product and date of purchase from January 1, 2014 to current. The dataset can be used to analyze total spirits sales in Iowa of individual products at the store level.
You can view the dataset via Socrata
console.log('Loading event'); | |
// Twilio Credentials | |
var accountSid = ''; | |
var authToken = ''; | |
var fromNumber = ''; | |
var https = require('https'); | |
var queryString = require('querystring'); |
// See also http://stackoverflow.com/a/27228544/2596404 | |
// Blob is your binary data. | |
// blob = ...; | |
// Encode the data and post to server. | |
var reader = new FileReader(); | |
reader.readAsDataURL(blob); | |
reader.onloadend = function() { | |
base64data = reader.result; |
Current events of September 3, 1995 (1995-09-03) (Sunday) : | |
eBay is founded. | |
Current events of September 6, 1995 (1995-09-06) (Wednesday) : | |
NATO air strikes against Bosnian Serb forces continue, after repeated attempts at a solution to the Bosnian War fail. | |
Current events of September 19, 1995 (1995-09-19) (Tuesday) : | |
The Washington Post and The New York Times publish the Unabomber's manifesto. | |
Current events of September 22, 1995 (1995-09-22) (Friday) : | |
American millionaire Steve Forbes announces his candidacy for the 1996 Republican presidential nomination. | |
Current events of September 23, 1995 (1995-09-23) (Saturday) : |