Shows multiple overlaid Voronoi diagrams, given multiple point sets.
A demonstration of how to calculate the areas of Voronoi regions clipped by geographic features using D3.
[D3’s implementation](Sutherland–Hodgman algorithm) of the Sutherland–Hodgman algorithm only works for convex clip polygons, but we exploit the fact that Voronoi regions are guaranteed to be convex, and use each Voronoi region as a clip polygon, with the projected geographic boundary as a subject polygon.
In response to a question by Gonzalo Bellver.
A demonstration of how to calculate the areas of Voronoi regions clipped by geographic features using D3.
[D3’s implementation](Sutherland–Hodgman algorithm) of the Sutherland–Hodgman algorithm only works for convex clip polygons, but we exploit the fact that Voronoi regions are guaranteed to be convex, and use each Voronoi region as a clip polygon, with the projected geographic boundary as a subject polygon.
In response to a question by Gonzalo Bellver.
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://d3js.org/d3.v3.min.js"></script> | |
<meta charset=utf-8 /> | |
<title>puntos</title> | |
</head> | |
<body> | |
<button id="up" type="button">Up</button> | |
<button id="down" type="button">Down</button> |
nombre_familia | nombre_comun | cant | |
---|---|---|---|
Aceráceas | Arce negundo | 6651 | |
Aceráceas | Arce tridente | 690 | |
Aceráceas | Arce | 144 | |
Aceráceas | Arce campestre (Arce común o Arce menor) | 116 | |
Aceráceas | Arce real | 29 | |
Aceráceas | Arce blanco | 17 | |
Adoxaceae | Sauco austral | 3 | |
Agavaceae | Yuca | 9 | |
Anacardiáceas | Aguaribay | 98 |
Forked from the work of Nikhil Sonnad, called Object constancy with multiple sets of time-series
Add support for JSON and data binding with Knockout.js (it needs improvement).
Original README.md
This chart compares the BRIC countries (Brazil, Russia, India and China) with a new group of upstarts, MIST (Mexico, Indonesia, South Korea, Turkey). The data are from the World Bank. It was my attempt to achieve object constancy for multiple sets of time series data. I used d3.nest() to sort one big CSV file based on each economic indicator, then used d3.key() on the header row (the countries) to make ensure constancy. Check the boxes at the top to highlight the country groups. An interpretation of this visual can be found on my website.
{ | |
"name": "flare", | |
"children": [ | |
{ | |
"name": "analytics", | |
"children": [ | |
{ | |
"name": "cluster", | |
"children": [ | |
{"name": "AgglomerativeCluster", "size": 3938}, |
I'm trying to build a map that can be zoomed using the mouse wheel and panned with drag.
For that I'm using d3.behavior.zoom()
and it works fine for the map.
However, I also need to mark some points in the map (which are included in the same topojson used to draw the map). They get rendered just fine, but I'm having trouble handling the zoom behaviour with these points. If you try to zoom or pan, the points get translated abruptly and even seem to change their path!
Any ideas?
This diagram shows the distribution of age groups in the United States over the last 150 years. Use the arrow keys to observe the changing population. Data from the Minnesota Population Center. Use the arrow keys to change the displayed year. The blue bars are the male population for each five-year age bracket, while the pink bars are the female population; the bars are partially transparent so that you can see how they overlap, unlike the traditional side-by-side display which makes it difficult to compare the relative distribution of the sexes.