Skip to content

Instantly share code, notes, and snippets.

View timproDev's full-sized avatar

timproDev timproDev

  • Safety Harbor, FL
View GitHub Profile
@timproDev
timproDev / index.html
Last active May 8, 2017 22:52
Anscombe's Quartet II
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" type="text/css" href="style.css" >
<style type="text/css">
svg {
outline: 1px solid #f0f;
}
@timproDev
timproDev / barley.tsv
Last active May 9, 2017 20:24
Barley test
yield variety year site
27 Manchuria 1931 University Farm
48.86667 Manchuria 1931 Waseca
27.43334 Manchuria 1931 Morris
39.93333 Manchuria 1931 Crookston
32.96667 Manchuria 1931 Grand Rapids
28.96667 Manchuria 1931 Duluth
43.06666 Glabron 1931 University Farm
55.2 Glabron 1931 Waseca
28.76667 Glabron 1931 Morris
@timproDev
timproDev / app.js
Last active June 19, 2017 18:15
Basic Melody Chart
function melodyChart() {
var settings = {
chartContainerClass: ".g-chart-container-melody-chart"
};
var chartContainer = d3.select(settings.chartContainerClass).html('');
var margin = {
top:40,
left:100,
@timproDev
timproDev / tspan-slope.js
Created June 24, 2017 17:03
Text and tspan Alignment
;(function(){
////////////////////
//// slopegraph ////
////////////////////
function slopeGraph(slopeOpts) {
var settings = {
chartContainerClass: slopeOpts.domLoc,
selectedRegion : slopeOpts.region,
@timproDev
timproDev / scss-structure.md
Last active August 10, 2017 15:28
SCSS Structure Template

SCSS Structure

Template for scss files

//////////////////////
/// BLOCK__ELEMENT ///
//////////////////////

.wrapper {}
@timproDev
timproDev / d3-map.md
Last active September 28, 2017 20:56
World Map Pattern

Map Only

function worldMap() {
	var chartContainer = d3.select(".geo-chart-map").html("");
	var margin = {top:0,left:0,right:0,bottom:0};
	var w = chartContainer.node().clientWidth - margin.left - margin.right,
		h = chartContainer.node().clientHeight;
	
	// height needss to somehow be dynamic
@timproDev
timproDev / block-data.csv
Last active October 24, 2017 14:55
Top Values Horizontal Bar Chart
Country JAZZ ROCKSTEADY TROPICALIA
United Arab Emirates 2 20 16
Albania 16 24 19
Armenia 29 25 15
Argentina 14 28 20
Austria 12 26 14
Australia 2 21 12
Azerbaijan 12 15 7
Bosnia and Herzegovina 12 19 27
Bangladesh 19 24 19
@timproDev
timproDev / d3-style-spanchart.css
Created October 24, 2017 15:25
Spanchart Test
* {
box-sizing: border-box;
padding:0;
margin:0;
/*font-family: 'Raleway', sans-serif; */
font-family: 'Josefin Slab', sans-serif;
}
body {
background-color:#ececec;
padding:0 0 2rem 0;
@timproDev
timproDev / barchart.js
Last active January 25, 2018 16:37
Barchart Null to Data Values
function barChart(dataPath, elem, opts) {
var settings = {
premise: opts.premise,
title: opts.title,
axisCategory: opts.axisCategory,
axisValue: opts.axisValue,
orientationVal: opts.orientationVal,
rangeMax: opts.rangeMax,
sortDescending: opts.sortDescending,
@timproDev
timproDev / d3-config.js
Last active January 25, 2018 17:38
Bar Chart
var d3Config = d3Config || {};
d3Config.init = function(settings) {
console.log("Configing!!");
d3Config.linkStyle(settings);
if (typeof settings.win.d3 === "undefined") {
console.log("lib undefined");
d3Config.loadLib(settings);
}
if (typeof settings.win.d3 !== "undefined") {
console.log("lib defined");