Skip to content

Instantly share code, notes, and snippets.

@Deborah-Digges
Deborah-Digges / gist:0ae39b1302cb25a4d7aa1766986207db
Last active February 10, 2020 16:39
Internal API for querying daily stats data

Path

{tenant}/tlogs/stats?from={fromDate}&to={toDate}

Path Params

  • tenant
  • fromDate: Date string in YYYY-mm-dd format
  • toDate: Date string in YYYY-mm-dd format

Response

const express = require('express')
const app = express()
const port = 3000
const bodyParser = require('body-parser');
var options = {
type: 'application/json'
};
app.use(bodyParser.raw(options));
@Deborah-Digges
Deborah-Digges / d3.geo.min.js
Last active July 4, 2016 15:36
Indian Rainfall Chloropleth
(function(){function b(a,b){return function(c){return c&&c.type in a?a[c.type](c):b}}function c(a){return"m0,"+a+"a"+a+","+a+" 0 1,1 0,"+ -2*a+"a"+a+","+a+" 0 1,1 0,"+2*a+"z"}function d(a,b){a.type in e&&e[a.type](a,b)}function f(a,b){d(a.geometry,b)}function g(a,b){for(var c=a.features,e=0,f=c.length;e<f;e++)d(c[e].geometry,b)}function h(a,b){for(var c=a.geometries,e=0,f=c.length;e<f;e++)d(c[e],b)}function i(a,b){for(var c=a.coordinates,d=0,e=c.length;d<e;d++)b.apply(null,c[d])}function j(a,b){for(var c=a.coordinates,d=0,e=c.length;d<e;d++)for(var f=c[d],g=0,h=f.length;g<h;g++)b.apply(null,f[g])}function k(a,b){for(var c=a.coordinates,d=0,e=c.length;d<e;d++)for(var f=c[d][0],g=0,h=f.length;g<h;g++)b.apply(null,f[g])}function l(a,b){b.apply(null,a.coordinates)}function m(a,b){for(var c=a.coordinates[0],d=0,e=c.length;d<e;d++)b.apply(null,c[d])}function n(a){return a.source}function o(a){return a.target}function p(b,c){function r(b){var c=Math.sin(p-(b*=p))/q,d=Math.sin(b)/q,g=c*h*e+d*n*k,j=c*h*f+d*n*l,m=c*i+d
@Deborah-Digges
Deborah-Digges / index.html
Last active April 28, 2017 21:01
Bar Graph using dimple.js to show the Average Divorce Rate in America
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="https://d3js.org/d3.v3.min.js"></script>
<script src="http://dimplejs.org/dist/dimple.v2.0.0.min.js"></script>
<script type="text/javascript">
function draw(data) {
/*