Download SVG country flags and css, then convert the codes from the iso 3166 two character codes to three character codes.
./get_flags.sh
Then copy the flag-icon.css
file into public/css
and the flags
directory to public/
.
-include .env | |
PROJECTNAME := $(shell basename "$(PWD)") | |
GO ?= go | |
GOBUILD := $(GO) build | |
GOARCH := amd64 | |
BIN_DIR := ./bin | |
GOFILES := $(shell find . -name "*.go") |
This stacked bar chart is constructed from a CSV file storing the populations of different states by age group. The chart employs conventional margins and a number of D3 features:
This script will download web pages and spit out the title, url, and text in a separate file.
Usage:
articles
with newline separated list of URLs to downloadpython extract.py
Prerequisite: newspaper is used for text extraction. Install: pip install newspaper
/* globals require, console, process, setInterval */ | |
'use strict'; | |
var async = require('async') | |
, redis = require('redis') | |
, client = redis.createClient(); | |
client.on('error', function(err) { | |
console.error(err); | |
}); |
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<style> | |
.circle { | |
fill: steelblue; | |
stroke: '#fff'; | |
} | |
.label { | |
fill: #777; | |
} |
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<style> | |
.circle { | |
fill: steelblue; | |
stroke: '#fff'; | |
} | |
.label { | |
fill: #777; | |
} |
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<style> | |
.circle { | |
fill: steelblue; | |
stroke: '#fff'; | |
} | |
</style> | |
<body> | |
<script src="http://d3js.org/d3.v3.min.js"></script> |
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<body> | |
<script src="http://d3js.org/d3.v3.min.js"></script> | |
<script> | |
// 1. select all p elements (there are none) | |
// 2. then bind some data to the elements - data always expects an [array], | |
// d3's selectAll returns a placeholder since there are no p elements yet | |
// 3. do something with incoming data via the enter() method. since there are |
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<body> | |
<script src="http://d3js.org/d3.v3.min.js"></script> | |
<script> | |
console.log('append the svg to the body of the page'); | |
var svg = d3.select("body") | |
.append("svg") |