Skip to content

Instantly share code, notes, and snippets.

@mayblue9
mayblue9 / bootstrap.min.css
Created July 19, 2016 01:59 — forked from d3noob/.block
Earthquake Data Discovery using dc.js, crossfilter, d3.js and bootstrap
/*!
* Bootstrap v2.3.2
*
* Copyright 2012 Twitter, Inc
* Licensed under the Apache License v2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Designed and built with all the love in the world @twitter by @mdo and @fat.
*/.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;line-height:0;content:""}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}audio:not([controls]){display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}a:hover,a:active{outline:0}sub,sup{position:relative;font-size:75%;line-height:0;ver
@mayblue9
mayblue9 / graph.json
Created July 19, 2016 00:34 — forked from emeeks/graph.json
D3v4 Constraint-Based Layout
{"nodes": [{"id":"1","module":0,"i":0},{"id":"3","module":0,"i":1},{"id":"8","module":2,"i":2},{"id":"9","module":4,"i":3},{"id":"12","module":2,"i":4},{"id":"15","module":2,"i":5},{"id":"23","module":3,"i":6},{"id":"26","module":3,"i":7},{"id":"37","module":10,"i":8},{"id":"46","module":2,"i":9},{"id":"2","module":1,"i":10},{"id":"4","module":2,"i":11},{"id":"5","module":3,"i":12},{"id":"6","module":3,"i":13},{"id":"7","module":1,"i":14},{"id":"10","module":4,"i":15},{"id":"11","module":1,"i":16},{"id":"13","module":1,"i":17},{"id":"14","module":1,"i":18},{"id":"16","module":5,"i":19},{"id":"18","module":1,"i":20},{"id":"19","module":3,"i":21},{"id":"20","module":1,"i":22},{"id":"21","module":6,"i":23},{"id":"22","module":2,"i":24},{"id":"25","module":3,"i":25},{"id":"27","module":1,"i":26},{"id":"28","module":3,"i":27},{"id":"29","module":1,"i":28},{"id":"31","module":2,"i":29},{"id":"33","module":2,"i":30},{"id":"34","module":9,"i":31},{"id":"35","module":1,"i":32},{"id":"38","module":2,"i":33},{"id":"41",
@mayblue9
mayblue9 / README.md
Created July 18, 2016 06:17 — forked from sathomas/README.md
Understanding D3.js Force Layout - 3: Seeing a Layout in Action

This is part of a series of examples that describe the basic operation of the D3.js force layout. Eventually they may end up in a blog post that wraps everything together. If you missed the beginning of the series, here's a link to first example.

Before digging into the properties and options of the force layout, it's helpful to understand how the layout works more generally. And although there's some serious mathematics going on under the hood, the principle is pretty simple: The layout moves the graph nodes around a little bit

@mayblue9
mayblue9 / graphite.md
Created July 18, 2016 00:52 — forked from caged/graphite.md
Installing Graphite on OS X Lion

This is a general overview (from memory) of the steps I used to install graphite (http://graphite.wikidot.com) on OS X Lion. I think the steps are in order but YMMV. Please fork and fix if you find an error.

Install Python 2.7.2

brew install python

Check your env

$ python --version
@mayblue9
mayblue9 / d3-server.js
Created July 18, 2016 00:50 — forked from caged/d3-server.js
Directly render and serve d3 visualizations from a nodejs server.
// Start `node d3-server.js`
// Then visit http://localhost:1337/
//
var d3 = require('d3'),
http = require('http')
http.createServer(function (req, res) {
// Chrome automatically sends a requests for favicons
// Looks like https://code.google.com/p/chromium/issues/detail?id=39402 isn't
// fixed or this is a regression.
@mayblue9
mayblue9 / index.html
Created July 17, 2016 10:20 — forked from epmoyer/.block
Arc Diagram
<!DOCTYPE html>
<!-- Port Arc Diagram visualization from http://homes.cs.washington.edu/~jheer/files/zoo/ex/networks/arc.html to D3.js -->
<meta charset="utf-8">
<style>
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
width: 960px;
height: 500px;
position: relative;
}
@mayblue9
mayblue9 / .block
Created July 17, 2016 09:36 — forked from wboykinm/.block
d3js compass rose
license: cc-by-4.0
border: no
height: 600
@mayblue9
mayblue9 / .block
Created July 17, 2016 04:23 — forked from anonymous/.block
d3js compass rose
license: cc-by-4.0
border: no
height: 600
@mayblue9
mayblue9 / gist:7fa88bc3ea1108593e00127591cb21d1
Created July 15, 2016 08:28 — forked from millionsmile/gist:3676569
Karate club community detection by Girvan-Newman algorithm
# -*- coding: utf-8 -*-
# Girvan Newman algorithmを使って空手クラブネットワークのコミュニティが分割していく様子を出力
# Zachary's karate club(空手クラブのネットワーク)のデータ取得元URL
# http://www-personal.umich.edu/~mejn/netdata/
import networkx as NX
import networkx.readwrite.gml as NRG
import networkx.algorithms.centrality as NC
import pylab as P
@mayblue9
mayblue9 / README.md
Created July 13, 2016 04:20 — forked from sangheestyle/README.md
Developers' relationship, take 2

A simple example to show developers' relationship by analyzing commits in AOSP frameworks/base repository. Only commits submitted within past 2 months were used for generating this relationship. You might want to click 'open in a new window' link (right) to see this on larger window.

This graph was built by the following.

  • making edges by developer to his or her modified file (bipartite graph)
  • making projection by developer nodes

You might want to know what the graph represents

  • Each circle shows each developer.