[ Launch: color scales ] 223a4bfc0a6f7ee88812 by john-guerra
See Previous Inlet [ Gist ]
Map of Colombia as a Force Network
Drawing Colombian Departamentos as a force directed network. This can be useful to represent national statistics that aren't biased by the size of the Departamentos. In this example the color of each departamento represents the length of it's name.
Colombia dibujada como una red. Esta visualización puede ser últil para representar estadísticas nacionales donde se le de igual importancia a cada Departamento, independiente de su tamaño.
Geo Json map of Colombia
Based on the Map of Thailand by Master Krist Wongsuphasawat, a simple map of Colombia using GeoJSON and D3.js
As in Krist example:
- Each province is color-coded by the length of its name in English.
- Hover each province to see text effects.
- New font is chosen randomly every time you change the province.
forceInABox
Force in a box is A d3.js force extension that implements the Group-in-a-box layout algorithm to distribute nodes in a network according to their clusters. The algorithm uses a treemap to compute focis that are later used to distribute each cluster into it's own box.
To use it you need to include the library, and use the forceInABox instead of the normal d3.layout.force
<script type="text/javascript" src="forceInABox.js"> </script>netClustering allows you to detect clusters in networks using the Clauset, Newman and Moore community detection algorithm directly from the browser, as simple as:
netClustering.cluster(nodes, edges);and the clusters will be stored in the .cluster attribute of the nodes.
This demo shows how to use the library applying to the standard D3 Force directed layout demo. Click on the cluster button to detect the communities on the sample dataset.
| #!/usr/bin/env python | |
| # | |
| # Copyright 2010 Facebook | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); you may | |
| # not use this file except in compliance with the License. You may obtain | |
| # a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # |