IOI2017

Size
4,672 Kb
Views
20,240

How do I make an ioi2017?

What is a ioi2017? How do you make a ioi2017? This script and codes were developed by Melanie Fournier on 09 September 2022, Friday.

IOI2017 Previews

IOI2017 - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>IOI2017</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel='stylesheet prefetch' href='http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/smoothness/jquery-ui.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <script src="https://code.jquery.com/jquery-1.10.2.min.js">
</script>
<script src="https://d3js.org/d3.v3.min.js"></script>
<script type='text/javascript' src='/javascripts/jquery.tipsy.js'></script>
<script src="http://labratrevenge.com/d3-tip/javascripts/d3.tip.v0.6.3.js"></script>
<link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'>
<body> <div id="headerRight" style="position:absolute; right:20px; top:15px;"> IOI 2017 Participants <div class="hint" style="font-style:italic;">Mouseover to see the links between participants and betweens particpants and their interests.</div> </div> </body> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

IOI2017 - Script Codes CSS Codes

body { overflow: auto; margin: 50px 0px 0px 100px; font-size: 10px; text-align:center; font-weight: 200; font-family:"Roboto";
}
headerRight { font-family: "Roboto"; text-align: right; position:absolute; top:10px; font-size:23px; right:0px; margin-right:20px;
}
.node { font: 5 10px"Roboto"; fill: #BDBDBD;
}
.node:hover { fill: #000000;
}
.link { stroke: purple; stroke-opacity: 0.4; fill: none; pointer-events: none;
}
.node:hover, .node--source, .node--target, .node--both { font-weight: 500;
}
.node--source { fill: blue;
}
.node--target { fill: green;
}
.node--both { fill: #BF00FF;
}
.link--source, .link--target, .link--both { stroke-opacity: 1; stroke-width: 2px;
}
.link--source { stroke: green;
}
.link--target { stroke: blue;
}
.link--both { stroke: #BF00FF;
}
.d3-tip { line-height: 1; padding: 5px 15px; width: 200px; background: #FFFFFF; border-radius: 5px; box-shadow: 0px 0px 5px rgba(50, 50, 50, 20);
}

IOI2017 - Script Codes JS Codes

//based on https://mbostock.github.io/d3/talk/20111116/bundle.html
//http://stackoverflow.com/questions/26164800/d3-dynamic-hierarchical-edge-bundling-2-way-import
//data Dalhousie University - Melanie Fournier & Leah Beveridge - 2014-2015
var flaredata = [{ "name": "flare.country.Barbados", "citation": "", "size": 3812, "imports": ["flare.job.Coast Guard"],
}, { "name": "flare.country.China", "citation": "", "size": 3812, "imports": ["flare.job.Marine Survey and Technology Centre","flare.job.China Ocean Mineral Resources RD Association","flare.job.National Marine Environmental Monitoring Centre", "flare.job.National Marine Data and Information Service","flare.job.Ocean Standards and Meteorology"],
}, { "name": "flare.country.Gambia", "citation": "", "size": 3812, "imports": ["flare.job.Fisheries Department"], }, { "name": "flare.country.Grenada", "citation": "", "size": 3812, "imports": ["flare.job.Sustainable Grenadines Inc"],
}, {
"name": "flare.country.Guyana", "citation": "", "size": 3812, "imports": ["flare.job.Fisheries Department"],
}, {
"name": "flare.country.Haiti", "citation": "", "size": 3812, "imports": ["flare.job.Fisheries and Aquaculture Division"],
}, { "name": "flare.country.Kenya", "citation": "", "size": 3812, "imports": ["flare.job.Kenya Wildlife Service", "flare.job.Kenya Meteorological Department"],
}, {
"name": "flare.country.Madagascar", "citation": "", "size": 3812, "imports": ["flare.job.Reef Doctor"],
}, {
"name": "flare.country.Malaysia", "size": 3812, "citation": "", "imports": ["flare.job.Centre for Maritime Security and Diplomacy"],
}, {
"name": "flare.country.Papua New Guinea", "citation": "", "size": 3812, "imports": ["flare.job.Dpt of Foreign Affairs", "flare.job.Dpt of Justice and Attorney General"],
}, {
"name": "flare.country.Tanzania", "citation": "", "size": 3812, "imports": ["flare.job.Mbeya University of Science & Technology"], }, {
"name": "flare.job.Mbeya University of Science & Technology", "size": 5914, "citation": "", "imports": [],
}, {
"name": "flare.job.Dpt of Justice and Attorney General", "size": 5914, "citation": "", "imports": [],
}, {
"name": "flare.job.Dpt of Foreign Affairs", "size": 5914, "citation": "", "imports": [],
}, {
"name": "flare.job.Centre for Maritime Security and Diplomacy", "size": 5914, "citation": "", "imports": [],
}, {
"name": "flare.job.Reef Doctor", "size": 5914, "citation": "", "imports": [],
}, { "name": "flare.job.Kenya Wildlife Service", "size": 5914, "citation": "", "imports": [],
}, { "name": "flare.job.Kenya Meteorological Department", "size": 5914, "citation": "", "imports": [],
}, { "name": "flare.job.Fisheries and Aquaculture Division", "size": 5914, "citation": "", "imports": [],
}, { "name": "flare.job.Sustainable Grenadines Inc", "size": 5914, "citation": "", "imports": [], }, { "name": "flare.job.Marine Survey and Technology Centre", "size": 5914, "citation": "", "imports": [], }, { "name": "flare.job.Ocean Standards and Meteorology", "size": 5914, "citation": "", "imports": [],
}, { "name": "flare.job.China Ocean Mineral Resources RD Association", "size": 5914, "citation": "", "imports": [],
}, { "name": "flare.job.National Marine Environmental Monitoring Centre", "size": 5914, "citation": "", "imports": [] ,
}, { "name": "flare.job.National Marine Data and Information Service", "size": 5914, "citation": "", "imports": [] ,
}, { "name": "flare.job.Coast Guard", "size": 5914, "citation": "", "imports": [],
}, {
"name": "flare.job.Fisheries Department", "size": 5914, "citation": "", "imports": [],
}];
var diameter = 600, radius = diameter / 2, innerRadius = radius - 180, m0, pi = Math.PI;
var cluster = d3.layout.cluster() .size([360, innerRadius]) .sort(null) .value(function (d) { return d.size;
});
var bundle = d3.layout.bundle();
var tip = d3.tip() .attr('class', 'd3-tip') .offset([-10, 0]) .style("z-index", "10") .html(function (d) { return "<span style='color:grey'>" + d.citation + "</span>";
});
var line = d3.svg.line.radial() .interpolate("bundle") .tension(.85) .radius(function (d) { return d.y;
}) .angle(function (d) { return d.x / 180 * Math.PI;
});
var svg = d3.select("body").append("svg") .attr("width", diameter) .attr("height", diameter) .append("g") .attr("transform", "translate(" + radius + "," + radius + ")") .call(tip);
var link = svg.append("g").selectAll(".link"), node = svg.append("g").selectAll(".node");
//d3.json(flaredata, function(error, classes) {
var nodes = cluster.nodes(packageHierarchy(flaredata)), links = packageImports(nodes);
var unique_links = links.reduce(function (p, c) { var index = p.map(function (d, i) { if (d.source === c.target && d.target === c.source) return i; }).filter(function (e, i, a) { return e != undefined; }).shift(); if (!isNaN(index)) p[index].both = true; else p.push(c); return p;
}, []);
link = link.data(bundle(unique_links)) .enter().append("path") .each(function (d) { d.source = d[0], d.target = d[d.length - 1], d.both = unique_links.filter(function (v) { if (v.source === d.source && v.target === d.target) return v.both; }).shift();
}) .attr("class", "link") .attr("d", line);
node = node.data(nodes.filter(function (n) { return !n.children;
})) .enter().append("text") .attr("class", "node") .attr("dy", ".31em") .attr("transform", function (d) { return "rotate(" + (d.x - 90) + ")translate(" + (d.y + 8) + ",0)" + (d.x < 180 ? "" : "rotate(180)");
}) .style("text-anchor", function (d) { return d.x < 180 ? "start" : "end";
}) .text(function (d) { return d.key;
}) .on("mousedown", tip.show) .on("mouseup", tip.hide) .on("mouseover", mouseovered) .on("mouseout", mouseouted);
//});
function tipshow(d) { d3.select(this).append("text") .attr("class", "mousedown") .attr('transform', function (d) { return 'translate(5, -10)'; }) .text(d.citation);
}
function mouseovered(d) { node.each(function (n) { n.target = n.source = false; }); link.classed("link--both", function (l) { if ((l.target === d || l.source === d) && l.both) return l.source.source = l.source.target = l.target.source = l.target.target = true; }) .classed("link--target", function (l) { if (l.target === d && !l.both) return l.source.source = true; }) .classed("link--source", function (l) { if (l.source === d && !l.both) return l.target.target = true; }) .filter(function (l) { return l.target === d || l.source === d; }) .each(function () { this.parentNode.appendChild(this); }); node.classed("node--both", function (n) { return n.source && n.target; }) .classed("node--target", function (n) { return n.target; }) .classed("node--source", function (n) { return n.source; });
}
function mouseouted(d) { link.classed("link--both", false) .classed("link--target", false) .classed("link--source", false); node.classed("node--both", false) .classed("node--target", false) .classed("node--source", false);
}
d3.select(self.frameElement).style("height", diameter + "px");
// Lazily construct the package hierarchy from class names.
function packageHierarchy(classes) { var map = {}; function find(name, data) { var node = map[name], i; if (!node) { node = map[name] = data || { name: name, children: [] }; if (name.length) { node.parent = find(name.substring(0, i = name.lastIndexOf("."))); node.parent.children.push(node); node.key = name.substring(i + 1); } } return node; } classes.forEach(function (d) { find(d.name, d); }); return map[""];
}
// Return a list of imports for the given array of nodes.
function packageImports(nodes) { var map = {}, imports = []; // Compute a map from name to node. nodes.forEach(function (d) { map[d.name] = d; }); // For each import, construct a link from the source to target node. nodes.forEach(function (d) { if (d.imports) d.imports.forEach(function (i) { imports.push({ source: map[d.name], target: map[i] }); }); }); return imports;
}
IOI2017 - Script Codes
IOI2017 - Script Codes
Home Page Home
Developer Melanie Fournier
Username mscfourn
Uploaded September 09, 2022
Rating 3
Size 4,672 Kb
Views 20,240
Do you need developer help for IOI2017?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Melanie Fournier (mscfourn) Script Codes
Name
A Pen by Melanie Fournier
Wrap_Test
Create amazing video scripts with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!