Skip to content

Instantly share code, notes, and snippets.

@vlandham
vlandham / start_dplyr.R
Created February 3, 2015 00:02
dplyr start
require('dplyr')
require("ggplot2")
require('reshape2')
data <- read.table("~/Downloads/pp_3_body_bytes.txt")
names(data) <- c('bytes')
big <- filter(data, bytes > 20000)
sub <- filter(data, bytes < 20000)
p <- ggplot(sub, aes(x = bytes))
p + geom_histogram()
#!/usr/bin/env python2
"""Script to download texts of a certain author from Project Gutenberg."""
from __future__ import absolute_import
from __future__ import print_function
from gutenberg.textsource import GutenbergEbooks
from gutenberg.corpus import SqliteCorpus
import logging
import re
[
{
"name":"A Better Tomorrow",
"id":"ABetterTomorrow"
},
{
"name":"A Boy and His Dog",
"id":"ABoyAndHisDog"
},
{
// # Reading in Data
// The first step in any data processing is getting the data!
// Here is how to parse in and prepare common input formats using D3.js
// ## Parsing CSV Files
// [D3 has a bunch](https://github.com/mbostock/d3/wiki/Requests) of filetypes it can support when loading data, and one of the most common is probably plain old CSV (comma separated values).
// # Reading in Data
// The first step in any data processing is getting the data!
// Here is how to parse in and prepare common input formats using D3.js
// ## Parsing CSV Files
// [D3 has a bunch](https://github.com/mbostock/d3/wiki/Requests) of filetypes it can support when loading data, and one of the most common is probably plain old CSV (comma separated values).
city state population land area
seattle WA 652405 83.9
new york NY 8405837 302.6
boston MA 645966 48.3
kansas city MO 467007 315.0
@vlandham
vlandham / outline.css
Last active August 29, 2015 14:17
scroll_demo_snippets
#sections {
position: relative;
display: inline-block;
width: 250px;
top: 0px;
z-index: 90;
}
.step {
margin-bottom: 200px;

Learn JS Data is a new guide introducing JavaScript as a language that can support data processing and manipulation.

The idea behind this project is to help those who may have some JavaScript experience, but have not really dealt much with data. Also, the guide can help those who have done data processing in other scripting languages, like python or R, and now have a need for similar data manipulation tools in JavaScript.

While there are many great tutorials and examples for doing data processing in other languages, there appeared to be a deficiency for data munging in JavaScript. We wanted to start to fill this gap in with LearnJSData.com!

It is meant to be a quick but somewhat comprehensive introduction to the topic that includes a small set of native tools and libraries to make data processing fun. Readers should be able to easily utilize these tools and techniques in wrangling their own data.

@vlandham
vlandham / iris.csv
Last active August 29, 2015 14:21
iris
Sepal.Length Sepal.Width Petal.Length Petal.Width Species
5.1 3.5 1.4 0.2 setosa
4.9 3 1.4 0.2 setosa
4.7 3.2 1.3 0.2 setosa
4.6 3.1 1.5 0.2 setosa
5 3.6 1.4 0.2 setosa
5.4 3.9 1.7 0.4 setosa
4.6 3.4 1.4 0.3 setosa
5 3.4 1.5 0.2 setosa
4.4 2.9 1.4 0.2 setosa
@vlandham
vlandham / cog.png
Last active August 31, 2015 15:37
images
cog.png