Skip to content

Instantly share code, notes, and snippets.

@zgazak
Last active January 6, 2017 04:39
Show Gist options
  • Save zgazak/f2577e3db0f0c57c43b63b76b4e22581 to your computer and use it in GitHub Desktop.
Save zgazak/f2577e3db0f0c57c43b63b76b4e22581 to your computer and use it in GitHub Desktop.
Aus VC map
{"companies": [{"name": "Original Rescue Swag", "type": "company", "verticals": "E-commerce"}, {"name": "Spaceship", "type": "company", "verticals": "Fintech"}, {"name": "PARts", "type": "company", "verticals": "SaaS"}, {"name": "Rokt", "type": "company", "verticals": "E-commerce"}, {"name": "Mad Paws", "type": "company", "verticals": "Mobile"}, {"name": "Moneyball Australia", "type": "company", "verticals": "Mobile"}, {"name": "Zetaris", "type": "company", "verticals": "Big Data"}, {"name": "Qwilr", "type": "company", "verticals": "SaaS"}, {"name": "Pawshake", "type": "company", "verticals": "Mobile"}, {"name": "SocietyOne", "type": "company", "verticals": "Fintech"}, {"name": "Space Connect", "type": "company", "verticals": "IoT"}, {"name": "OccuRx", "type": "company", "verticals": "Biotech"}, {"name": "Airtasker", "type": "company", "verticals": "E-commerce"}, {"name": "Biteable", "type": "company", "verticals": "SaaS"}, {"name": "Sendle", "type": "company", "verticals": "Logistics"}, {"name": "Topme", "type": "company", "verticals": "Mobile"}, {"name": "LawPath Operations", "type": "company", "verticals": "SaaS"}, {"name": "Stackla", "type": "company", "verticals": "AdTech"}, {"name": "Better Caring", "type": "company", "verticals": "HealthTech"}, {"name": "Ruby & Ollie's", "type": "company", "verticals": "EdTech"}, {"name": "EzyCollect", "type": "company", "verticals": "SaaS"}, {"name": "Equitise", "type": "company", "verticals": "Fintech"}, {"name": "Smart Sparrow", "type": "company", "verticals": "EdTech"}, {"name": "Myagi", "type": "company", "verticals": "SaaS"}, {"name": "Vinium", "type": "company", "verticals": "E-commerce"}, {"name": "Canva", "type": "company", "verticals": "SaaS"}, {"name": "Stockspot", "type": "company", "verticals": "Fintech"}, {"name": "Bellabox", "type": "company", "verticals": "E-commerce"}, {"name": "Macrovue", "type": "company", "verticals": "Fintech"}, {"name": "Propeller Arobotics", "type": "company", "verticals": "SaaS"}, {"name": "Rezdy", "type": "company", "verticals": "SaaS"}, {"name": "CurrencySpot", "type": "company", "verticals": "Fintech"}, {"name": "Prospa Advance", "type": "company", "verticals": "Fintech"}, {"name": "TrekTraka", "type": "company", "verticals": "Mobile"}, {"name": "Vinomofo", "type": "company", "verticals": "E-commerce"}, {"name": "Chuffed", "type": "company", "verticals": "Fintech"}, {"name": "MyXplor", "type": "company", "verticals": "EdTech"}, {"name": "Tuned Global", "type": "company", "verticals": "SaaS"}, {"name": "CohortIQ", "type": "company", "verticals": "Big Data"}, {"name": "Expert360", "type": "company", "verticals": "SaaS"}, {"name": "Vaxxas", "type": "company", "verticals": "Biotech"}, {"name": "LoanDolphin", "type": "company", "verticals": "Fintech"}, {"name": "OpenAgent", "type": "company", "verticals": "Real Estate"}, {"name": "SalesPreso", "type": "company", "verticals": "SaaS"}, {"name": "Marvel Internet Group", "type": "company", "verticals": "AdTech"}, {"name": "Spriggy", "type": "company", "verticals": "Fintech"}, {"name": "Airshr", "type": "company", "verticals": "Mobile"}, {"name": "Employment Hero", "type": "company", "verticals": "SaaS"}, {"name": "The Safety Compass", "type": "company", "verticals": "VR/AR"}, {"name": "SuperAlbert", "type": "company", "verticals": "Fintech"}, {"name": "Handkrafted", "type": "company", "verticals": "E-commerce"}, {"name": "Mimetica", "type": "company", "verticals": "Biotech"}, {"name": "Gamurs", "type": "company", "verticals": "Social Network"}, {"name": "Instaclustr", "type": "company", "verticals": "Big Data"}, {"name": "PromisePay", "type": "company", "verticals": "Fintech"}, {"name": "Atomo Diagnostics", "type": "company", "verticals": "Manufacturing"}, {"name": "Brosa Design", "type": "company", "verticals": "E-commerce"}, {"name": "Curo Technologies", "type": "company", "verticals": "Mobile"}, {"name": "Spares Box", "type": "company", "verticals": "E-commerce"}, {"name": "Culture Amp", "type": "company", "verticals": "SaaS"}, {"name": "TokenOne", "type": "company", "verticals": "SaaS"}, {"name": "Jayride Technology", "type": "company", "verticals": "E-commerce"}, {"name": "Breathe Well", "type": "company", "verticals": "HealthTech"}, {"name": "Incoming Media", "type": "company", "verticals": "Mobile"}, {"name": "Neoclinical", "type": "company", "verticals": "Biotech"}, {"name": "DoseMe", "type": "company", "verticals": "HealthTech"}, {"name": "HashChing", "type": "company", "verticals": "Fintech"}, {"name": "GO1", "type": "company", "verticals": "EdTech"}, {"name": "Car Next Door", "type": "company", "verticals": "Logistics"}, {"name": "TRIBE Group", "type": "company", "verticals": "AdTech"}, {"name": "OneAffiniti", "type": "company", "verticals": "AdTech"}, {"name": "Taxi Apps", "type": "company", "verticals": "SaaS"}, {"name": "Deposit Markets", "type": "company", "verticals": "Fintech"}, {"name": "SafteyCulture", "type": "company", "verticals": "SaaS"}, {"name": "Broodl", "type": "company", "verticals": "E-commerce"}, {"name": "HotDoc", "type": "company", "verticals": "HealthTech"}, {"name": "TheRight.Fit", "type": "company", "verticals": "Marketplace"}, {"name": "Millell", "type": "company", "verticals": "E-commerce"}, {"name": "CancerAid", "type": "company", "verticals": "HealthTech"}, {"name": "Those Girls", "type": "company", "verticals": "Fintech"}, {"name": "ParcelPoint", "type": "company", "verticals": "E-commerce"}, {"name": "Bottlepops", "type": "company", "verticals": "Manufacturing"}, {"name": "Tiger Pistol", "type": "company", "verticals": "AdTech"}, {"name": "School Places", "type": "company", "verticals": "EdTech"}, {"name": "Hava", "type": "company", "verticals": "SaaS"}, {"name": "Zookal", "type": "company", "verticals": "E-commerce"}, {"name": "Responsight", "type": "company", "verticals": "Security"}, {"name": "EdStart", "type": "company", "verticals": "Fintech"}, {"name": "Zero Latency", "type": "company", "verticals": "VR/AR"}, {"name": "GoFar", "type": "company", "verticals": "IoT"}, {"name": "Venuemob", "type": "company", "verticals": "SaaS"}, {"name": "TapView", "type": "company", "verticals": "Fintech"}, {"name": "Signonsite", "type": "company", "verticals": "Mobile"}, {"name": "Tidy Me", "type": "company", "verticals": "Marketplace"}, {"name": "VentureCrowd", "type": "company", "verticals": "Fintech"}, {"name": "MacroPod", "type": "company", "verticals": "Security"}, {"name": "Fillr", "type": "company", "verticals": "Mobile"}, {"name": "Tyro Payments", "type": "company", "verticals": "Fintech"}, {"name": "Camplify", "type": "company", "verticals": "Marketplace"}, {"name": "Data Republic", "type": "company", "verticals": "Big Data"}, {"name": "Clinical Genomics", "type": "company", "verticals": "Biotech"}, {"name": "Muzeek", "type": "company", "verticals": "Fintech"}, {"name": "Our Little Foxes", "type": "company", "verticals": "E-commerce"}, {"name": "Valiant Finance", "type": "company", "verticals": "Fintech"}, {"name": "Zova", "type": "company", "verticals": "HealthTech"}, {"name": "Ramp RFID", "type": "company", "verticals": "IoT"}, {"name": "Flare HR", "type": "company", "verticals": "SaaS"}, {"name": "Mon Purse", "type": "company", "verticals": "E-commerce"}, {"name": "Edrolo", "type": "company", "verticals": "EdTech"}, {"name": "Simply Wall Street", "type": "company", "verticals": "Fintech"}, {"name": "Deckee", "type": "company", "verticals": "Marketplace"}, {"name": "Tappr", "type": "company", "verticals": "Fintech"}, {"name": "Pocketbook", "type": "company", "verticals": "Fintech"}, {"name": "Clarity Pharmaceuticals", "type": "company", "verticals": "Biotech"}, {"name": "Zapala Go", "type": "company", "verticals": "SaaS"}, {"name": "Hyper Anna", "type": "company", "verticals": "AI / ML"}, {"name": "Hey You", "type": "company", "verticals": "Mobile"}, {"name": "GiggedIn", "type": "company", "verticals": "Fintech"}, {"name": "Oneflare", "type": "company", "verticals": "E-commerce"}, {"name": "DesignCrowd", "type": "company", "verticals": "Marketplace"}], "funds": [{"companies": ["Sendle", "Gamurs", "CancerAid", "Curo Technologies", "Camplify"], "links": ["Sendle", "Logistics", "Gamurs", "Social Network", "CancerAid", "HealthTech", "Curo Technologies", "Mobile", "Camplify", "Marketplace"], "dealcount": 5, "name": "Slingshot Accelerator", "type": "fund", "verticals": ["Logistics", "Social Network", "HealthTech", "Mobile", "Marketplace"]}, {"companies": ["Equitise", "Stockspot", "LoanDolphin", "HashChing", "Valiant Finance", "Macrovue", "CurrencySpot", "Deposit Markets", "TapView", "SuperAlbert", "Spriggy", "EdStart"], "links": ["Equitise", "Fintech", "Stockspot", "LoanDolphin", "HashChing", "Valiant Finance", "Macrovue", "CurrencySpot", "Deposit Markets", "TapView", "SuperAlbert", "Spriggy", "EdStart"], "dealcount": 12, "name": "H2 Ventures", "type": "fund", "verticals": ["Fintech"]}, {"companies": ["SalesPreso", "HashChing"], "links": ["SalesPreso", "SaaS", "HashChing", "Fintech"], "dealcount": 2, "name": "Sapien Ventures", "type": "fund", "verticals": ["SaaS", "Fintech"]}, {"companies": ["Prospa Advance", "Canva", "DesignCrowd", "MyXplor", "Employment Hero", "Edrolo", "HotDoc", "Brosa Design", "Pawshake", "Marvel Internet Group", "Hyper Anna", "TheRight.Fit", "Tidy Me"], "links": ["Prospa Advance", "Fintech", "Canva", "SaaS", "DesignCrowd", "Marketplace", "MyXplor", "EdTech", "Employment Hero", "Edrolo", "HotDoc", "HealthTech", "Brosa Design", "E-commerce", "Pawshake", "Mobile", "Marvel Internet Group", "AdTech", "Hyper Anna", "AI / ML", "TheRight.Fit", "Tidy Me"], "dealcount": 13, "name": "AirTree Ventures", "type": "fund", "verticals": ["Fintech", "SaaS", "Marketplace", "EdTech", "HealthTech", "E-commerce", "Mobile", "AdTech", "AI / ML"]}, {"companies": ["Canva", "Culture Amp", "Propeller Arobotics", "Edrolo", "Chuffed", "Hava", "Zova", "Myagi"], "links": ["Canva", "SaaS", "Culture Amp", "Propeller Arobotics", "Edrolo", "EdTech", "Chuffed", "Fintech", "Hava", "Zova", "HealthTech", "Myagi"], "dealcount": 8, "name": "Blackbird Ventures", "type": "fund", "verticals": ["SaaS", "EdTech", "Fintech", "HealthTech"]}, {"companies": ["Taxi Apps", "GO1", "Atomo Diagnostics", "Car Next Door", "DoseMe", "TrekTraka", "Original Rescue Swag", "Bottlepops", "Ruby & Ollie's", "Those Girls"], "links": ["Taxi Apps", "SaaS", "GO1", "EdTech", "Atomo Diagnostics", "Manufacturing", "Car Next Door", "Logistics", "DoseMe", "HealthTech", "TrekTraka", "Mobile", "Original Rescue Swag", "E-commerce", "Bottlepops", "Ruby & Ollie's", "Those Girls", "Fintech"], "dealcount": 10, "name": "Transition Level Investments", "type": "fund", "verticals": ["SaaS", "EdTech", "Manufacturing", "Logistics", "HealthTech", "Mobile", "E-commerce", "Fintech"]}, {"companies": ["Vinomofo", "ParcelPoint", "GO1", "Millell"], "links": ["Vinomofo", "E-commerce", "ParcelPoint", "GO1", "EdTech", "Millell"], "dealcount": 4, "name": "Blue Sky", "type": "fund", "verticals": ["E-commerce", "EdTech"]}, {"companies": ["Tyro Payments", "SafteyCulture", "Spaceship"], "links": ["Tyro Payments", "Fintech", "SafteyCulture", "SaaS", "Spaceship"], "dealcount": 3, "name": "Grok Ventures", "type": "fund", "verticals": ["Fintech", "SaaS"]}, {"companies": ["Airtasker", "Zero Latency", "Spares Box", "Responsight", "Ramp RFID", "OneAffiniti", "Neoclinical", "PARts"], "links": ["Airtasker", "E-commerce", "Zero Latency", "VR/AR", "Spares Box", "Responsight", "Security", "Ramp RFID", "IoT", "OneAffiniti", "AdTech", "Neoclinical", "Biotech", "PARts", "SaaS"], "dealcount": 8, "name": "Carthona Capital", "type": "fund", "verticals": ["E-commerce", "VR/AR", "Security", "IoT", "AdTech", "Biotech", "SaaS"]}, {"companies": ["PromisePay", "Sendle", "Tiger Pistol", "Stackla", "School Places"], "links": ["PromisePay", "Fintech", "Sendle", "Logistics", "Tiger Pistol", "AdTech", "Stackla", "School Places", "EdTech"], "dealcount": 5, "name": "Rampersand", "type": "fund", "verticals": ["Fintech", "Logistics", "AdTech", "EdTech"]}, {"companies": ["Vaxxas", "Clinical Genomics", "Smart Sparrow", "Incoming Media", "Employment Hero"], "links": ["Vaxxas", "Biotech", "Clinical Genomics", "Smart Sparrow", "EdTech", "Incoming Media", "Mobile", "Employment Hero", "SaaS"], "dealcount": 5, "name": "OneVentures", "type": "fund", "verticals": ["Biotech", "EdTech", "Mobile", "SaaS"]}, {"companies": ["Canva", "ParcelPoint", "Stackla", "Mon Purse", "Better Caring", "LawPath Operations", "Mad Paws", "Qwilr"], "links": ["Canva", "SaaS", "ParcelPoint", "E-commerce", "Stackla", "AdTech", "Mon Purse", "Better Caring", "HealthTech", "LawPath Operations", "Mad Paws", "Mobile", "Qwilr"], "dealcount": 8, "name": "Macdoch Ventures", "type": "fund", "verticals": ["SaaS", "E-commerce", "AdTech", "HealthTech", "Mobile"]}, {"companies": ["Smart Sparrow", "OccuRx"], "links": ["Smart Sparrow", "EdTech", "OccuRx", "Biotech"], "dealcount": 2, "name": "Uniseed", "type": "fund", "verticals": ["EdTech", "Biotech"]}, {"companies": ["Instaclustr", "Tuned Global", "Clarity Pharmaceuticals", "VentureCrowd", "Hey You", "Breathe Well", "Gamurs", "CancerAid", "EzyCollect", "TokenOne", "Responsight", "Camplify", "Zookal", "Simply Wall Street", "The Safety Compass", "Venuemob", "Jayride Technology", "Signonsite", "GiggedIn", "Space Connect", "Zapala Go", "Muzeek", "Vinium", "Deckee"], "links": ["Instaclustr", "Big Data", "Tuned Global", "SaaS", "Clarity Pharmaceuticals", "Biotech", "VentureCrowd", "Fintech", "Hey You", "Mobile", "Breathe Well", "HealthTech", "Gamurs", "Social Network", "CancerAid", "EzyCollect", "TokenOne", "Responsight", "Security", "Camplify", "Marketplace", "Zookal", "E-commerce", "Simply Wall Street", "The Safety Compass", "VR/AR", "Venuemob", "Jayride Technology", "Signonsite", "GiggedIn", "Space Connect", "IoT", "Zapala Go", "Muzeek", "Vinium", "Deckee"], "dealcount": 24, "name": "Artesian Capital", "type": "fund", "verticals": ["Big Data", "SaaS", "Biotech", "Fintech", "Mobile", "HealthTech", "Social Network", "Security", "Marketplace", "E-commerce", "VR/AR", "IoT"]}, {"companies": ["Expert360", "Taxi Apps", "GO1", "Equitise", "School Places", "MacroPod", "EzyCollect", "Biteable", "Pocketbook"], "links": ["Expert360", "SaaS", "Taxi Apps", "GO1", "EdTech", "Equitise", "Fintech", "School Places", "MacroPod", "Security", "EzyCollect", "Biteable", "Pocketbook"], "dealcount": 9, "name": "Tank Stream Ventures", "type": "fund", "verticals": ["SaaS", "EdTech", "Fintech", "Security"]}, {"companies": ["Oneflare", "DesignCrowd", "Breathe Well", "Qwilr", "Airshr", "GoFar", "CohortIQ", "Our Little Foxes", "Handkrafted"], "links": ["Oneflare", "E-commerce", "DesignCrowd", "Marketplace", "Breathe Well", "HealthTech", "Qwilr", "SaaS", "Airshr", "Mobile", "GoFar", "IoT", "CohortIQ", "Big Data", "Our Little Foxes", "Handkrafted"], "dealcount": 9, "name": "Right Click Capital", "type": "fund", "verticals": ["E-commerce", "Marketplace", "HealthTech", "SaaS", "Mobile", "IoT", "Big Data"]}, {"companies": ["Employment Hero", "Macrovue"], "links": ["Employment Hero", "SaaS", "Macrovue", "Fintech"], "dealcount": 2, "name": "AMP New Ventures", "type": "fund", "verticals": ["SaaS", "Fintech"]}, {"companies": ["PromisePay", "OpenAgent", "Data Republic", "Fillr", "Zetaris", "Hey You", "SocietyOne", "Flare HR", "Hyper Anna", "Valiant Finance"], "links": ["PromisePay", "Fintech", "OpenAgent", "Real Estate", "Data Republic", "Big Data", "Fillr", "Mobile", "Zetaris", "Hey You", "SocietyOne", "Flare HR", "SaaS", "Hyper Anna", "AI / ML", "Valiant Finance"], "dealcount": 10, "name": "Reinventure Group", "type": "fund", "verticals": ["Fintech", "Real Estate", "Big Data", "Mobile", "SaaS", "AI / ML"]}, {"companies": ["Airtasker", "TRIBE Group", "Tuned Global", "Zetaris", "Hey You"], "links": ["Airtasker", "E-commerce", "TRIBE Group", "AdTech", "Tuned Global", "SaaS", "Zetaris", "Big Data", "Hey You", "Mobile"], "dealcount": 5, "name": "Exto Partners", "type": "fund", "verticals": ["E-commerce", "AdTech", "SaaS", "Big Data", "Mobile"]}, {"companies": ["Airtasker", "Tappr", "Sendle", "GO1", "Moneyball Australia", "TokenOne", "Responsight", "The Safety Compass", "GiggedIn", "Space Connect", "Zapala Go", "Topme", "Vinium"], "links": ["Airtasker", "E-commerce", "Tappr", "Fintech", "Sendle", "Logistics", "GO1", "EdTech", "Moneyball Australia", "Mobile", "TokenOne", "SaaS", "Responsight", "Security", "The Safety Compass", "VR/AR", "GiggedIn", "Space Connect", "IoT", "Zapala Go", "Topme", "Vinium"], "dealcount": 13, "name": "Black Sheep Capital", "type": "fund", "verticals": ["E-commerce", "Fintech", "Logistics", "EdTech", "Mobile", "SaaS", "Security", "VR/AR", "IoT"]}, {"companies": ["Instaclustr", "Stackla", "Rezdy"], "links": ["Instaclustr", "Big Data", "Stackla", "AdTech", "Rezdy", "SaaS"], "dealcount": 3, "name": "Bailador", "type": "fund", "verticals": ["Big Data", "AdTech", "SaaS"]}, {"companies": ["Canva", "Rokt", "Bellabox", "Taxi Apps", "Broodl", "School Places"], "links": ["Canva", "SaaS", "Rokt", "E-commerce", "Bellabox", "Taxi Apps", "Broodl", "School Places", "EdTech"], "dealcount": 6, "name": "Square Peg Capital", "type": "fund", "verticals": ["SaaS", "E-commerce", "EdTech"]}, {"companies": ["DesignCrowd", "Mimetica", "MacroPod"], "links": ["DesignCrowd", "Marketplace", "Mimetica", "Biotech", "MacroPod", "Security"], "dealcount": 3, "name": "Starfish Ventures", "type": "fund", "verticals": ["Marketplace", "Biotech", "Security"]}], "verticals": [{"name": "Real Estate", "type": "vertical"}, {"name": "IoT", "type": "vertical"}, {"name": "Social Network", "type": "vertical"}, {"name": "AdTech", "type": "vertical"}, {"name": "HealthTech", "type": "vertical"}, {"name": "Logistics", "type": "vertical"}, {"name": "Big Data", "type": "vertical"}, {"name": "VR/AR", "type": "vertical"}, {"name": "Mobile", "type": "vertical"}, {"name": "EdTech", "type": "vertical"}, {"name": "Biotech", "type": "vertical"}, {"name": "AI / ML", "type": "vertical"}, {"name": "Manufacturing", "type": "vertical"}, {"name": "E-commerce", "type": "vertical"}, {"name": "Security", "type": "vertical"}, {"name": "Fintech", "type": "vertical"}, {"name": "SaaS", "type": "vertical"}, {"name": "Marketplace", "type": "vertical"}]}
<!DOCTYPE html>
<html lang="en">
<head>
<title>Aus VC Roadmap</title>
<script src="https://code.jquery.com/jquery-latest.min.js"></script>
</head>
<body id="page-top" style="padding-top: 75px">
<div id="main">
<div id='graph'></div>
<script src="https://d3js.org/d3.v3.min.js" charset="utf-8"></script>
<script>
$(function() {
// general setup
var width = 1200,
height= 1200,
U = 220,
w = 1000,
F = "elastic",
K = 20, // height of fund boxes
S = 20,
s = 8,
voff = 10, // text vertical offset
R = 110,
hilite = "#0da4d3",
J = 30,
t = 10, // text horizontal offset
N = "#0da4d3";
$("#graph").width(width + "px");
$("#graph").height(height + "px");
// not sure:
var L = {},
k = {};
var i, y;
// data transformation for function(d3)
var T,q,x,A,j,P, H;
var r = d3.layout.tree().size([360, height / 2 - R]).separation(function(Y, X) {
return (Y.parent == X.parent ? 1 : 2) / Y.depth
});
var W = d3.svg.diagonal.radial().projection(function(X) {
return [X.y, X.x / 180 * Math.PI]
});
var linkline = d3.svg.line().x(function(X) {
return X[0]
}).y(function(X) {
return X[1]
}).interpolate("bundle").tension(0.5);
var graph = d3.select("#graph").append("svg").attr("width", width).attr("height", height).append("g").attr("transform", "translate(" + width / 2 + "," + height / 2 + ")");
var rect = graph.append("rect").attr("class", "bg").attr({
x: width / -2,
y: height / -2,
width: width,
height: height,
fill: "transparent"
}).on("click", O);
var funds = graph.append("g").attr("class", "funds");
var links = graph.append("g").attr("class", "links");
var nodes = graph.append("g").attr("class", "nodes");
// var Q = d3.select("#graph-info");
d3.json('deals.json', function(X, Y) {
// I think this is the actual magic:
console.log("X",X);
console.log("Y",Y);
T = d3.map(Y);
console.log("T",T);
q = d3.merge(T.values());
console.log("q",q);
x = {};
A = d3.map();
q.forEach(function(aa) {
aa.key = lowercase(aa.name);
aa.canonicalKey = aa.key;
x[aa.key] = aa;
if (aa.group) {
if (!A.has(aa.group)) {
A.set(aa.group, [])
}
A.get(aa.group).push(aa)
}
});
console.log("A",A);
console.log("q",q);
console.log("x",x);
j = d3.map();
T.get("funds").forEach(function(aa) {
aa.links = aa.links.filter(function(ab) {
return typeof x[lowercase(ab)] !== "undefined" && ab.indexOf("r-") !== 0
});
j.set(aa.key, aa.links.map(function(ab) {
var ac = lowercase(ab);
if (typeof j.get(ac) === "undefined") {
j.set(ac, [])
}
j.get(ac).push(aa);
return x[ac]
}))
});
console.log("j",j);
var Z = window.location.hash.substring(1);
console.log("Z",Z);
if (Z && x[Z]) {
G(x[Z])
} else {
O();
M()
}
window.onhashchange = function() {
var aa = window.location.hash.substring(1);
if (aa && x[aa]) {
G(x[aa], true)
}
}
});
function lowercase(X) {
return X.toLowerCase().replace(/[ .,()]/g, "-")
}
function O() {
if (L.node === null) {
return
}
L = {
node: null,
map: {}
};
console.log("L",L)
i = Math.floor(height / T.get("funds").length);
y = Math.floor(T.get("funds").length * i / 2);
T.get("funds").forEach(function(af, ae) {
af.x = U / -2;
af.y = (ae * i - y) / 2
});
// figure this out
var ad = 180 + J,
Z = 360 - J,
ac = (Z - ad) / (T.get("verticals").length - 1);
T.get("verticals").forEach(function(af, ae) {
af.x = Z - ae * ac;
af.y = height / 2 - R;
af.xOffset = -S;
af.depth = 1
});
ad = J;
Z = 180 - J;
ac = (Z - ad) / (T.get("companies").length - 1);
T.get("companies").forEach(function(af, ae) {
af.x = ae * ac + ad;
af.y = height / 2 - R;
af.xOffset = S;
af.depth = 1
});
H = [];
var ab, Y, aa, X = height / 2 - R;
T.get("funds").forEach(function(ae) {
ae.links.forEach(function(af) {
ab = x[lowercase(af)];
if (!ab || ab.type === "reference") {
return
}
Y = (ab.x - 90) * Math.PI / 180;
aa = ae.key + "-to-" + ab.key;
H.push({
source: ae,
target: ab,
key: aa,
canonicalKey: aa,
x1: ae.x + (ab.type === "vertical" ? 0 : U),
y1: ae.y + K / 2,
x2: Math.cos(Y) * X + ab.xOffset,
y2: Math.sin(Y) * X
})
})
});
P = [];
A.forEach(function(af, ag) {
var ae = (ag[0].x - 90) * Math.PI / 180;
a2 = (ag[1].x - 90) * Math.PI / 180, bulge = 20;
P.push({
x1: Math.cos(ae) * X + ag[0].xOffset,
y1: Math.sin(ae) * X,
xx: Math.cos((ae + a2) / 2) * (X + bulge) + ag[0].xOffset,
yy: Math.sin((ae + a2) / 2) * (X + bulge),
x2: Math.cos(a2) * X + ag[1].xOffset,
y2: Math.sin(a2) * X
})
});
window.location.hash = "";
M()
}
function M() {
console.log("entering M")
V();
links.selectAll("path").attr("d", function(X) {
return linkline([
[X.x1, X.y1],
[X.x1, X.y1],
[X.x1, X.y1]
])
}).attr("fill","none").transition().duration(w).ease(F).attr("d", function(X) {
return linkline([
[X.x1, X.y1],
[X.target.xOffset * s, 0],
[X.x2, X.y2]
])
});
D(T.get("funds"));
b(d3.merge([T.get("verticals"), T.get("companies")]));
display([]);
m(P);
//Q.html('<a href="/the-concept-map/">What\'s this?</a>');
n();
z()
}
function V() {
var X = links.selectAll("path").data(H, keys);
X.enter().append("path").attr("d", function(Z) {
var Y = Z.source ? {
x: Z.source.x,
y: Z.source.y
} : {
x: 0,
y: 0
};
return W({
source: Y,
target: Y
})
}).attr("class", "links");
X.exit().remove()
}
function n() {
console.log("calling n")
k = {
node: null,
map: {}
};
z()
}
function keys(X) {
return X.key
}
function g(X) {
console.log("calling g")
if (k.node === X) {
return
}
k.node = X;
k.map = {};
k.map[X.key] = true;
console.log("g.X",X);
console.log("--X.key",X.key);
console.log("--X.canonicalKey",X.canonicalKey);
// console.log("--X.parent.canonicalKey",X.parent.canonicalKey);
if (X.key !== X.canonicalKey) {
k.map[X.parent.canonicalKey] = true;
k.map[X.parent.canonicalKey + "-to-" + X.canonicalKey] = true;
k.map[X.canonicalKey + "-to-" + X.parent.canonicalKey] = true
} else {
j.get(X.canonicalKey).forEach(function(Y) {
k.map[Y.canonicalKey] = true;
k.map[X.canonicalKey + "-" + Y.canonicalKey] = true
});
H.forEach(function(Y) {
if (k.map[Y.source.canonicalKey] && k.map[Y.target.canonicalKey]) {
k.map[Y.canonicalKey] = true
}
})
}
z()
}
function G(Y, X) {
console.log("entering G")
if (L.node === Y && X !== true) {
if (Y.type === "fund") {
window.location.href = "/" + Y.url;
return
}
L.node.children.forEach(function(aa) {
aa.children = aa._group
});
e();
return
}
if (Y.isGroup) {
L.node.children.forEach(function(aa) {
aa.children = aa._group
});
Y.parent.children = Y.parent._children;
e();
return
}
Y = x[Y.canonicalKey];
q.forEach(function(aa) {
aa.parent = null;
aa.children = [];
aa._children = [];
aa._group = [];
aa.canonicalKey = aa.key;
aa.xOffset = 0
});
L.node = Y;
L.node.children = j.get(Y.canonicalKey);
L.map = {};
var Z = 0;
L.node.children.forEach(function(ac) {
L.map[ac.key] = true;
ac._children = j.get(ac.key).filter(function(ad) {
return ad.canonicalKey !== Y.canonicalKey
});
ac._children = JSON.parse(JSON.stringify(ac._children));
ac._children.forEach(function(ad) {
ad.canonicalKey = ad.key;
ad.key = ac.key + "-" + ad.key;
L.map[ad.key] = true
});
var aa = ac.key + "-group",
ab = ac._children.length;
ac._group = [{
isGroup: true,
key: aa + "-group-key",
canonicalKey: aa,
name: ab,
count: ab,
xOffset: 0
}];
L.map[aa] = true;
Z += ab
});
L.node.children.forEach(function(aa) {
aa.children = Z > 50 ? aa._group : aa._children
});
window.location.hash = L.node.key;
e()
}
function D(Y) {
var Y = funds.selectAll(".fund").data(Y, keys);
console.log("D.Y", Y);
var X = Y.enter().append("g").attr("class", "fund").on("mouseover", g).on("mouseout", n).on("click", G);
console.log("D.X", X);
X.append("rect").attr("x", U / -2).attr("y", K / -2).attr("width", U).attr("height", K).transition().duration(w).ease(F).attr("x", function(Z) {
return Z.x
}).attr("y", function(Z) {
return Z.y
});
X.append("text").attr("x", function(Z) {
return U / -2 + t
}).attr("y", function(Z) {
return K / -2 + voff
}).attr("fill", "#fff").text(function(Z) {
return Z.name
}).transition().duration(w).ease(F).attr("x", function(Z) {
return Z.x + t
}).attr("y", function(Z) {
return Z.y + 10 + 5
});
Y.exit().selectAll("rect").transition().duration(w).ease(F).attr("x", function(Z) {
return U / -2
}).attr("y", function(Z) {
return K / -2
});
Y.exit().selectAll("text").transition().duration(w).ease(F).attr("x", function(Z) {
return U / -2 + t
}).attr("y", function(Z) {
return K / -2 + voff
});
Y.exit().transition().duration(w).remove()
}
function b(X) {
console.log("entering b")
var X = nodes.selectAll(".node").data(X, keys);
var Y = X.enter().append("g").attr("transform", function(aa) {
var Z = aa.parent ? aa.parent : {
xOffset: 0,
x: 0,
y: 0
};
return "translate(" + Z.xOffset + ",0)rotate(" + (Z.x - 90) + ")translate(" + Z.y + ")"
}).attr("class", "node").on("mouseover", g).on("mouseout", n).on("click", G);
Y.append("circle").attr("r", 0);
Y.append("text").attr("stroke", "#fff").attr("stroke-width", 4).attr("class", "label-stroke");
Y.append("text").attr("font-size", 0).attr("class", "label");
X.transition().duration(w).ease(F).attr("transform", function(Z) {
if (Z === L.node) {
return null
}
var aa = Z.isGroup ? Z.y + (7 + Z.count) : Z.y;
return "translate(" + Z.xOffset + ",0)rotate(" + (Z.x - 90) + ")translate(" + aa + ")"
});
X.selectAll("circle").transition().duration(w).ease(F).attr("r", function(Z) {
if (Z == L.node) {
return 70
} else {
if (Z.isGroup) {
return 7 + Z.count
} else {
return 4.5
}
}
});
X.selectAll("text").transition().duration(w).ease(F).attr("dy", ".3em").attr("font-size", function(Z) {
if (Z.depth === 0) {
return 20
} else {
return 15
}
}).text(function(Z) {
return Z.name
}).attr("text-anchor", function(Z) {
if (Z === L.node || Z.isGroup) {
return "middle"
}
return Z.x < 180 ? "start" : "end"
}).attr("transform", function(Z) {
if (Z === L.node) {
return null
} else {
if (Z.isGroup) {
return Z.x > 180 ? "rotate(180)" : null
}
}
return Z.x < 180 ? "translate(" + t + ")" : "rotate(180)translate(-" + t + ")"
});
X.selectAll("text.label-stroke").attr("display", function(Z) {
return Z.depth === 1 ? "block" : "none"
});
X.exit().remove()
}
function e() {
console.log("entering e")
var X = r.nodes(L.node);
X.forEach(function(Z) {
if (Z.depth === 1) {
Z.y -= 20
}
});
H = r.links(X);
H.forEach(function(Z) {
if (Z.source.type === "fund") {
Z.key = Z.source.canonicalKey + "-to-" + Z.target.canonicalKey
} else {
Z.key = Z.target.canonicalKey + "-to-" + Z.source.canonicalKey
}
Z.canonicalKey = Z.key
});
V();
links.selectAll("path").transition().duration(w).ease(F).attr("d", W);
D([]);
b(X);
display([L.node]);
m([]);
var Y = "";
if (L.node.description) {
Y = L.node.description
}
//Q.html(Y);
n();
z()
}
// I think this is visualizing circles
function z() {
console.log("entering z")
funds.selectAll("rect").attr("fill", function(X) {
return l(X, "#000", hilite, "#000")
});
links.selectAll("path").attr("stroke", function(X) {
return l(X, "#aaa", N, "#aaa")
}).attr("stroke-width", function(X) {
return l(X, "1.5px", "2.5px", "1px")
}).attr("opacity", function(X) {
return l(X, 0.4, 0.75, 0.3)
}).attr("fill", "none").sort(function(Y, X) {
if (!k.node) {
return 0
}
var aa = k.map[Y.canonicalKey] ? 1 : 0,
Z = k.map[X.canonicalKey] ? 1 : 0;
return aa - Z
});
nodes.selectAll("circle").attr("fill", function(X) {
if (X === L.node) {
return "#000"
} else {
if (X.type === "vertical") {
return l(X, "#666", N, "#000")
} else {
if (X.type === "company") {
//return l(X, "#666", N, "#000")
return "#fff"
}
}
}
return l(X, "#000", N, "#999")
}).attr("stroke", function(X) {
if (X === L.node) {
return l(X, null, N, null)
} else {
if (X.type === "vertical") {
return "#000"
} else {
if (X.type === "company") {
return l(X, "#000", N, "#000")
}
}
}
return null
}).attr("stroke-width", function(X) {
if (X === L.node) {
return l(X, null, 2.5, null)
} else {
if (X.type === "vertical" || X.type === "company") {
return 1.5
}
}
return null
});
nodes.selectAll("text.label").attr("fill", function(X) {
return (X === L.node || X.isGroup) ? "#fff" : l(X, "#000", N, "#999")
})
}
function l(X, aa, Z, Y) {
console.log("entering l")
if (k.node === null) {
return aa
}
return k.map[X.key] ? Z : aa
}
function display(Z) {
console.log("entering display");
var ac = graph.selectAll(".detail").data(Z, keys);
var Y = ac.enter().append("g").attr("class", "detail");
var ab = Z[0];
console.log("display. ac,Y,ab",ac,Y,ab);
if (ab && ab.type === "fund") {
var aa = Y.append("a").attr("xlink:href", function(ae) {
return "/" + ae.url
});
aa.append("text").attr("fill", N).attr("text-anchor", "middle").attr("y", (voff + t) * -1).text(function(ae) {
return "FUND " + ae.fund
})
} else {
if (ab && ab.type === "vertical") {
Y.append("text").attr("fill", "#aaa").attr("text-anchor", "middle").attr("y", (voff + t) * -1).text("VERTICAL")
} else {
if (ab && ab.type === "company") {
var ad = ac.selectAll(".pair").data(A.get(ab.group).filter(function(ae) {
return ae !== ab
}), u);
ad.enter().append("text").attr("fill", "#aaa").attr("text-anchor", "middle").attr("y", function(af, ae) {
return (voff + t) * 2 + (ae * (voff + t))
}).text(function(ae) {
return "(vs. " + ae.name + ")"
}).attr("class", "pair").on("click", G);
Y.append("text").attr("fill", "#aaa").attr("text-anchor", "middle").attr("y", (voff + t) * -1).text("COMPANY");
ad.exit().remove()
}
}
}
ac.exit().remove();
var X = graph.selectAll(".all-funds").data(Z);
X.enter().append("text").attr("text-anchor", "start").attr("x", width / -2 + t).attr("y", height / 2 - t).text("all funds").attr("class", "all-funds").on("click", O);
X.exit().remove()
console.log("latedisplay")
}
function m(Y) {
var X = funds.selectAll("path").data(Y);
X.enter().append("path").attr("d", function(Z) {
return v([
[Z.x1, Z.y1],
[Z.x1, Z.y1],
[Z.x1, Z.y1]
])
}).attr("stroke", "#000").attr("stroke-width", 1.5).transition().duration(w).ease(F).attr("d", function(Z) {
return v([
[Z.x1, Z.y1],
[Z.xx, Z.yy],
[Z.x2, Z.y2]
])
});
X.exit().remove()
}
})();
</script>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment