Skip to content

Instantly share code, notes, and snippets.

View widged's full-sized avatar

Marielle Lange widged

View GitHub Profile

Importing the csv file from data.govt.nz. The header row is "Title","Url","DatasetType","Agency","AgencyContact","AgencyContactEmail","AgencyContactPhone","Description","Format","UpdateFrequency","Cost","CostInformation","SubmissionSource","Licence","LicenceURL","Date listed","Date last updated","DatasetLastUpdated","DatasetCreation","Guid"

USING PERIODIC COMMIT 100
LOAD CSV WITH HEADERS FROM "https://data.govt.nz/search/csv/?q=&CategoryID=0"
  AS line
WITH line LIMIT 500
@widged
widged / README.md
Created October 14, 2015 22:53 — forked from enjalot/README.md
cosine similarity

Click on the various examples

Each example is a random vector in the same "space" as the sample in the top left.

Drag on individual rows

Each row represents one dimension of our vectors. You can drag them back and forth to change the value of our vector for that dimension.

Watch how the similarity bar changes

The bar below each vector is a measure of how similar it is to the sample in the top left.

Whats going on?

@widged
widged / README.md
Created October 14, 2015 22:54 — forked from enjalot/README.md
manhattan distance

Click on the various examples

Each example is a random vector in the same "space" as the sample in the top left.

Drag on individual rows

Each row represents one dimension of our vectors. You can drag them back and forth to change the value of our vector for that dimension.

Watch how the similarity bar changes

The bar below each vector is a measure of how similar it is to the sample in the top left.

Whats going on?

@widged
widged / east.geojson
Created October 16, 2015 05:15 — forked from mapsam/east.geojson
a geometry collection
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@widged
widged / README.md
Last active December 11, 2015 04:48
D3 for layout management
@widged
widged / README.md
Last active December 11, 2015 06:41
Load graphs in different tabs (stackoverflow)
@widged
widged / d3.phylogram.js
Last active December 14, 2015 21:19 — forked from kueda/d3.phylogram.js
d3.phylogram.js, stackoverflow answer
/*
d3.phylogram.js
Wrapper around a d3-based phylogram (tree where branch lengths are scaled)
Also includes a radial dendrogram visualization (branch lengths not scaled)
along with some helper methods for building angled-branch trees.
d3.phylogram.build(selector, nodes, options)
Creates a phylogram.
Arguments:
selector: selector of an element that will contain the SVG
@widged
widged / index.html
Last active December 15, 2015 04:39
D3js simple grouping
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>D3 grouping</title>
<script src="http://d3js.org/d3.v2.min.js"></script>
</head>
<body>
<style type="text/css">
@widged
widged / README.md
Last active December 15, 2015 08:59 — forked from mbostock/.block

Negative Bar graph transposed from horizontal to vertical

@widged
widged / index.html
Created October 3, 2013 01:35
ResponsiveTester Usage
<!DOCTYPE html>
<head>
<! -- ... -->
<link rel="stylesheet" href="css/responsiveTester.css">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
<! -- ... -->
</head>
<body>