Skip to content

Instantly share code, notes, and snippets.

Cereal Name Manufacturer Type Calories Protein (g) Fat Sodium Dietary Fiber Carbs Sugars Display Shelf Potassium Vitamins and Minerals Serving Size Weight Cups per Serving
100%_Bran Nabisco C 70 4 1 130 10 5 6 3 280 25 1 0.33
100%_Natural_Bran Quaker Oats C 120 3 5 15 2 8 8 3 135 0 1 -1
All-Bran Kelloggs C 70 4 1 260 9 7 5 3 320 25 1 0.33
All-Bran_with_Extra_Fiber Kelloggs C 50 4 0 140 14 8 0 3 330 25 1 0.5
Almond_Delight Ralston Purina C 110 2 2 200 1 14 8 3 -1 25 1 0.75
Apple_Cinnamon_Cheerios General Mills C 110 2 2 180 1.5 10.5 10 1 70 25 1 0.75
Apple_Jacks Kelloggs C 110 2 0 125 1 11 14 2 30 25 1 1
Basic_4 General Mills C 130 3 2 210 2 18 8 3 100 25 1.33 0.75
Bran_Chex Ralston Purina C 90 2 1 200 4 15 6 1 125 25 1 0.67
@a-lexwein
a-lexwein / cereal.csv
Created March 27, 2017 19:34
d3 scatter of cereal
100%_Bran Nabisco C 70 4 1 130 10 5 6 3 280 25 1 0.33
100%_Natural_Bran Quaker Oats C 120 3 5 15 2 8 8 3 135 0 1 -1
All-Bran Kelloggs C 70 4 1 260 9 7 5 3 320 25 1 0.33
All-Bran_with_Extra_Fiber Kelloggs C 50 4 0 140 14 8 0 3 330 25 1 0.5
Almond_Delight Ralston Purina C 110 2 2 200 1 14 8 3 -1 25 1 0.75
Apple_Cinnamon_Cheerios General Mills C 110 2 2 180 1.5 10.5 10 1 70 25 1 0.75
Apple_Jacks Kelloggs C 110 2 0 125 1 11 14 2 30 25 1 1
Basic_4 General Mills C 130 3 2 210 2 18 8 3 100 25 1.33 0.75
Bran_Chex Ralston Purina C 90 2 1 200 4 15 6 1 125 25 1 0.67
@a-lexwein
a-lexwein / index.html
Last active March 27, 2017 22:19
can we make a square
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<!-- Example based on http://bl.ocks.org/mbostock/3887118 -->
<!-- Tooltip example from http://www.d3noob.org/2013/01/adding-tooltips-to-d3js-graph.html -->
<style>
body {
font: 11px sans-serif;
@a-lexwein
a-lexwein / packed-interval-chart.R
Created May 22, 2018 14:11
Recursively maps intervals to non-overlapping segments
library(lubridate)
library(ggplot2)
library(dplyr)
library(viridis)
## takes playlist list and returns min and max track_added_at for each playlist:
endpoints <- lol %>%
filter(playlist_owner == user_id) %>%
mutate(track_added_at = as.Date(track_added_at)) %>%

Keybase proof

I hereby claim:

  • I am a-lexwein on github.
  • I am alexwein (https://keybase.io/alexwein) on keybase.
  • I have a public key ASBy3YH1JeXlmpbWPcVMPLojoPhSA9QrSqHiN8nl3sWKgwo

To claim this, I am signing this object:

@a-lexwein
a-lexwein / talkingpie.R
Created January 5, 2019 15:24
animated pie chart with gganimate
library(dplyr)
library(ggplot2)
library(gganimate)
open <- c(.16, 1 - .16)
closed <- c(.02, .98)
colors <- c("#EDD63F", "#4C4C4C") # yellow and dark gray
data <- tibble(
position = c(open, closed),
@a-lexwein
a-lexwein / old_spotify_scrape.R
Created January 6, 2019 15:45
using httr to get spotify track data
## thanks to http://www.r-bloggers.com/the-eurovision-2016-song-contest-in-an-r-shiny-app/
library(httr)
library(dplyr)
library(purrr)
## I Created a spotify developer account and was given these.
clientID = 'XXXXXXXXX'
secret = 'XXXXXXXXXX'
@a-lexwein
a-lexwein / wein-sets-and-charts.md
Last active July 10, 2019 23:55
Idea for a presentation/workshop on data viz and set theory

Questions to guide feedback:

  1. is it totally incomprehensible?
  2. does it sound like the type of workshop you'd actually want to go to?
  3. how do I turn this into a pitch to share with the organizers?
  4. I've never been to an unconf before, and I'm not sure the current version is unconference-y enough. How do I make more unconference-y.
  5. Do you know of other resources I should check out to inform my thinking here? (less important for getting the pitch out)

Sets, Relations, Functions, and Charts - a talk, maybe

[{"movie":"Joker","totalNominations":11,"actingNominations":1,"directing":1,"directedByAWoman":0,"metacriticScore":59,"rottenTomatoesScore":68},{"movie":"1917","totalNominations":10,"actingNominations":0,"directing":1,"directedByAWoman":0,"metacriticScore":78,"rottenTomatoesScore":89},{"movie":"The Irishman","totalNominations":10,"actingNominations":2,"directing":1,"directedByAWoman":0,"metacriticScore":94,"rottenTomatoesScore":96},{"movie":"Once upon a Time....in Hollywood","totalNominations":9,"actingNominations":1,"directing":1,"directedByAWoman":0,"metacriticScore":83,"rottenTomatoesScore":85},{"movie":"JoJo Rabbit","totalNominations":6,"actingNominations":1,"directing":0,"directedByAWoman":0,"metacriticScore":58,"rottenTomatoesScore":80},{"movie":"Little Women","totalNominations":6,"actingNominations":2,"directing":0,"directedByAWoman":1,"metacriticScore":91,"rottenTomatoesScore":95},{"movie":"Marriage Story","totalNominations":6,"actingNominations":3,"directing":0,"directedByAWoman":0,"metacriticScore":