Skip to content

Instantly share code, notes, and snippets.

@mayblue9
mayblue9 / index.html
Created February 22, 2016 00:37 — forked from biovisualize/index.html
D3.js Reusable Bar Chart with Angularjs
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
body {
font: 14px sans-serif;
}
.axis path, .axis line {
fill: none;
@mayblue9
mayblue9 / README.md
Created February 17, 2016 08:01 — forked from chrisrzhou/README.md
D3 Radar Chart

D3 Radar Chart

bl.ocks.org link

A radar chart visualizes multivariate data in a 2D chart of three or more quantitative variables represented on axes.

The project is created using AngularJS and D3.js.


Description

@mayblue9
mayblue9 / README.md
Created January 21, 2016 04:06 — forked from nitaku/README.md
Concentric circles

A simple example which uses d3.js to create a set of concentric circles according to a given array of radii.

@mayblue9
mayblue9 / gist:93a3233c817ac065115a
Created January 18, 2016 08:05 — forked from millionsmile/gist:3682029
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 December 23, 2015 09:44 — forked from tungnk1993/README.md
[Parallel] Directed / Weighted
  • Click on empty space to add node
  • Drag from node to node to add edge
  • Click/Select + Delete to delete node/edge
  • Click/Select Edge + Enter to change edge's weight
  • Press Ctrl to Drag node around
@mayblue9
mayblue9 / README.md
Created December 23, 2015 08:23 — forked from mapsam/README.md
Leaflet layer toggling

Showing the functionality of toggling layers in Leaflet while preserving their reference for later usage (i.e. turning the layer back on). This is useful when working with many layers in leaflet and turning opacity to 0 won't cut it because it can have negative effects when hover and click events require properly layered DOM elements.

Important takeaways:

  • It's important to scope your data to access it globally, or at least within your appropriate scope.
  • Turn off a layer by referencing its variable using the removeLayer() method.
  • Turn on a layer by referencing its variable using the addLayer() method.
@mayblue9
mayblue9 / README.md
Created December 22, 2015 08:48 — forked from sxywu/README.md
Enter-Update-Exit in Force Layout

The force graph has been the subject of my fascination in the recent couple weeks. One of the fun things about the force layout is that the positioning of each node and link is calculated at every tick, which means the normal update-transition paradigm doesn't work too well.

This was my approach to the enter-update-exit pattern in a force graph, and other then a couple bounces of the nodes, seem to work pretty decently.

@mayblue9
mayblue9 / README.md
Created December 22, 2015 07:08 — forked from mbostock/.block
Modifying a Force Layout

This example demonstrates how to add and remove nodes and links from a force layout. The graph initially appears with three nodes A, B and C connected in a loop. Three seconds later, node B is removed, along with the links B-A and B-C. At six seconds, node B is reintroduced, restoring the original links B-A and B-C. This example uses the general update pattern for data joins.

@mayblue9
mayblue9 / index.html
Created December 21, 2015 08:48 — forked from d3noob/.block
Map using leaflet.js and d3,js combined
<!DOCTYPE html>
<html>
<head>
<title>Leaflet and D3 Map</title>
<meta charset="utf-8" />
<link
rel="stylesheet"
href="http://cdn.leafletjs.com/leaflet-0.7/leaflet.css"
/>
@mayblue9
mayblue9 / index.html
Created December 21, 2015 08:27 — forked from clhenrick/index.html
Leaflet AnimatedMarker plug-in test
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.2/leaflet.css" />
<script src="http://cdn.leafletjs.com/leaflet-0.7.2/leaflet.js"></script>
<script src="http://rawgithub.com/clhenrick/Major-Studio-Two/gh-pages/map-story/html/js/pct-trail-partial.js"></script>
<script src="http://rawgithub.com/openplans/Leaflet.AnimatedMarker/master/src/AnimatedMarker.js"></script>