A D3 V5 implementation of a shaded globe mimic the 3d effect. Drag to rotate and middle wheel to zoom. The flyer arcs are interpolated from 2 control points.
You can modify the dataset (Topojson format) to change landmarks.
try: | |
import simplejson as json | |
except ImportError: | |
try: | |
import json | |
except ImportError: | |
raise ImportError | |
import datetime | |
from bson.objectid import ObjectId | |
from werkzeug import Response |
A D3 V5 implementation of a shaded globe mimic the 3d effect. Drag to rotate and middle wheel to zoom. The flyer arcs are interpolated from 2 control points.
You can modify the dataset (Topojson format) to change landmarks.
""" | |
Original Author Ernesto P. Adorio, Ph.D | |
Original Source: http://my-other-life-as-programmer.blogspot.com/2012/02/python-finding-nearest-matching-color.html | |
Modifed By: JDiscar | |
This class maps an RGB value to the nearest color name it can find. Code is modified to include | |
ImageMagick names and WebColor names. | |
1. Modify the minimization criterion to use least sum of squares of the differences. | |
2. Provide error checking for input R, G, B values to be within the interval [0, 255]. |
<!DOCTYPE html> | |
<head> | |
<meta charset="utf-8"> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.17/d3.min.js"></script> | |
<style> | |
body { | |
background: black; | |
} | |
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<title>SANKEY Experiment</title> | |
<style> | |
.node rect { | |
cursor: move; | |
fill-opacity: .9; | |
shape-rendering: crispEdges; | |
} |
const PIE = 3.14; | |
function f() { | |
console.log('function f inside module a'); | |
} | |
function f123() { | |
//not accessible | |
} |
# -*- coding: utf-8 -*- | |
# | |
# Author: Vegard Nossum <vegard.nossum@gmail.com> | |
import math | |
import os | |
import sys | |
import cairo |
'''Provides utility functions for encoding and decoding linestrings using the | |
Google encoded polyline algorithm. | |
''' | |
def encode_coords(coords): | |
'''Encodes a polyline using Google's polyline algorithm | |
See http://code.google.com/apis/maps/documentation/polylinealgorithm.html | |
for more information. | |
license: gpl-3.0 | |
redirect: https://observablehq.com/@d3/margin-convention |
license: gpl-3.0 |