Skip to content

Instantly share code, notes, and snippets.

@vincentpham1991
vincentpham1991 / README.md
Last active March 29, 2016 22:19
MSAN 622 Homework 2: Javascript Anagrams (4/24)

Due 5pm PST Tuesday 3/29

For this homework you will submit as a fork of this gist

Create a Javascript function to find asociated anagrams in an input list of strings. For the input list, output every string (only once) that has an associated anagram elsewhere in the input list. See an example input and output below:

input_list = ['man', 'list', 'acme', 'talk', 'cat', 'beach', 'came', 'tac', 'naan', 'slit', 'act']

var anagram_finder = function(list) {
@vincentpham1991
vincentpham1991 / README.md
Created April 5, 2016 22:38
D3.js Legends

Join the chat at https://gitter.im/Jay-Oh-eN/data-scientists-guide-apache-spark

These are the materials for my workshop on creating interactive data visualizations with D3! We will be using the following two tools to work through the exercises:

And please do not hesitate to reach out to me directly via email at jondinu@gmail.com or over twitter @clearspandex

Throughout this workshop, you will learn how to make an interactive map of AirBnB listings in SF to better understand the companies impact on the city.

@vincentpham1991
vincentpham1991 / README.md
Last active April 13, 2016 03:54
National Day of Civic Hacking: Learning D3.js (part 1)
@vincentpham1991
vincentpham1991 / README.md
Created April 14, 2016 21:38
Strata Interactive Data Visualization: Exercise 3

These are the materials for my workshop at Strata San Jose 2015 as well as resources and next steps. Videos of the workshop can be found here.

We will be using the following two tools to works through these exercises:

I would love your feedback on the materials either on the Q&A forum (Google Group) or in the Github issues.

And please do not hesitate to reach out to me directly via email at jondinu@gmail.com or over twitter @clearspandex

@vincentpham1991
vincentpham1991 / index.html
Last active April 14, 2016 22:31
Simple Line Chart with Color Gradient
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.12/d3.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.6/moment.min.js"></script>
<style>
body {
font-family: futura;
width: 960px;
@vincentpham1991
vincentpham1991 / cities.csv
Created April 15, 2016 03:16 — forked from d3noob/.block
World map with zoom / pan and cities
code city country lat lon
ZNZ ZANZIBAR TANZANIA -6.13 39.31
TYO TOKYO JAPAN 35.68 139.76
AKL AUCKLAND NEW ZEALAND -36.85 174.78
BKK BANGKOK THAILAND 13.75 100.48
DEL DELHI INDIA 29.01 77.38
SIN SINGAPORE SINGAPOR 1.36 103.75
BSB BRASILIA BRAZIL -15.67 -47.43
RIO RIO DE JANEIRO BRAZIL -22.90 -43.24
YTO TORONTO CANADA 43.64 -79.40
@vincentpham1991
vincentpham1991 / .block
Last active April 28, 2016 22:13
SF AirBnB Listings: Sunburst Partition
license: gpl-3.0
@vincentpham1991
vincentpham1991 / README.md
Created May 1, 2016 06:26 — forked from peterk87/README.md
JS+D3: Zoomable, pannable scatterplot with shift keypress enabled brush multiselect of data points

JS+D3: Zoomable, pannable scatterplot with shift keypress enabled brush multiselect of data points

This JS+D3 gist creates a scatterplot with zooming and panning enabled as well as a brush for selecting or deselecting points using the iris dataset within data.tsv.

The "Get Selection" button gets the current selection of points and prints their ids to the JS console (i.e. console.log(selection);).

The "Clear Selection" button clears the current selection.

@vincentpham1991
vincentpham1991 / ECG2_data.csv
Created May 1, 2016 06:53
Global Zooming via Brush for multiple graphs
date a
1/1/2014 13:00:00 5.0000000e-002
1/1/2014 13:00:01 6.6100000e-001
1/1/2014 13:00:02 9.9700000e-001
1/1/2014 13:00:03 1.0900000e+000
1/1/2014 13:00:04 1.1300000e+000
1/1/2014 13:00:05 1.1550000e+000
1/1/2014 13:00:06 1.1770000e+000
1/1/2014 13:00:07 1.1860000e+000
1/1/2014 13:00:08 1.1930000e+000
@vincentpham1991
vincentpham1991 / README.md
Created May 2, 2016 05:27 — forked from nnattawat/README.md
Integrate brushing and scrolling zoom interactions