Map of Switzerland with TopoJSON and map data from Swiss Maps. Cantons and municipalities are combined in a single TopoJSON file.
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{HTTPS} off | |
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} | |
</IfModule> |
# D3.js's nest operator in Ruby | |
class Nest | |
def initialize | |
# var nest = {}, keys = [], sortKeys = [], sortValues, rollup; | |
@nest = {} | |
@keys = [] | |
@sort_keys = [] | |
end |
Example of a streamgraph that can be divided into multiple area charts.
require("http://d3js.org/d3.v3.js"); | |
var data = [{"id":"ARE","pop":7890924,"country_name":"United Arab Emirates"}, | |
{"id":"ARG","pop":40764561,"country_name":"Argentina"}, | |
{"id":"AUS","pop":22620600,"country_name":"Australia"}]; | |
// How many items are in the data? | |
var dataCount = data.length; |
A minimalistic zipdecode for Switzerland.
Also see Mike Bostock's version with cross-fading canvas elements.
Data from GeoNames.
A D3 ZIPScribbleMap of Switzerland (with a hint of zipdecode).
Inspired by Ralph Straumann's map.
Data from GeoNames.
When creating a polylinear time scale, the tricky part is to know to which value in the range the intermediate dates should map.
Let's say we want to "zoom in" on 4 particular days and make them appear with the size of 10 days each. Because these days now take up more space (36 or (factor - 1) * n
), we need to create a linear time scale where the domain ends at 36 days later than we want to show. This scale is then used to determine the intermediary range values of the polylinear scale.
Indented tree layout demo.
Grid layout demo.