Skip to content

Instantly share code, notes, and snippets.

@kaffyzoo
kaffyzoo / gist:4c4b073811df1a96a5b5
Last active June 17, 2016 20:20
Scraping Google Travel Flights
var flights = $("div:contains('Best flights'):last").parent().children();
if (flights.length === 0) {
flights = $("div:contains('Choose an outbound'):last").parent().parent().children()[1];
flights = $($(flights).children()[0]).children();
}
var avg_time = 0;
var avg_price = 0;
flights.toArray().forEach(function (elm, ind, arr) {
if ($(elm).attr("iti") != undefined) {
@kaffyzoo
kaffyzoo / README.md
Created August 7, 2014 00:59
Alternative Calendar View

d3.js Calendar View Heatmap

d3.js visualization of a calendar heatmap.

Demo can be viewed here

A new layout compared with the original d3.js calendar. The visualization in this repository is better suited for data that span over a couple years, as opposed to decades.