Skip to content

Instantly share code, notes, and snippets.

@vlandham
vlandham / index.html
Last active August 27, 2015 16:31 — forked from tafsiri/index.html
2D Picking with canvas
<html lang="en">
<head>
<meta charset="utf-8">
<title>2D Picking with canvas</title>
<meta name="description" content="">
<meta name="author" content="Yannick Assogba">
<script src="//rawgit.com/mrdoob/stats.js/master/build/stats.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/dat-gui/0.5/dat.gui.js"></script>
@vlandham
vlandham / part1.md
Last active March 21, 2024 12:57
Feature Branches and Pull Requests : Walkthrough

Here's a little walkthrough of how Yannick and I are using feature branches and pull requests to develop new features and adding them to the project. Below are the steps I take when working on a new feature. Hopefully this, along with watching the process on Github, will serve as a starting point to having everyone use a similar workflow.

Questions, comments, and suggestions for improvements welcome!

Start with the latest on master

When starting a new feature, I make sure to start with the latest and greatest codebase:

git checkout master
@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

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 / 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;
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
// # 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).
[
{
"name":"A Better Tomorrow",
"id":"ABetterTomorrow"
},
{
"name":"A Boy and His Dog",
"id":"ABoyAndHisDog"
},
{
#Script for scraping Chronicling America
import requests
import re
import csv
from bs4 import BeautifulSoup, SoupStrainer
import os
from time import sleep
from datetime import date, datetime, timedelta
#search_terms is a string of words separated by spaces.