Skip to content

Instantly share code, notes, and snippets.

@eli-s-goldberg
eli-s-goldberg / index.html
Created Mar 24, 2017
Live ENM Data for JoVE journal
View index.html
<!DOCTYPE html>
<meta charset="utf-8">
<title>Goldberg et al,. 2016 - ENM Transport Database</title>
<style>
svg {
font: 10px sans-serif;
font-weight: bold;
}
.foreground path {
@eli-s-goldberg
eli-s-goldberg / gmaps__plot.py
Created Mar 15, 2017
This is a helper file for my update to gmplot to work with the latest version of Google's Java API.
View gmaps__plot.py
# use manual setup.py for gmplot: https://github.com/eli-s-goldberg/gmplot
import gmplot
import pandas as pd
import numpy as np
def geocode_address(row):
"""
combine multiple rows text data for import into GoogleMapPlotter.geocode(address).
:param row: dataframe row
View index.html
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>Smoothed D3.js Radar Chart</title>
<!-- Google fonts -->
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Raleway' rel='stylesheet' type='text/css'>
View enmExperimentalData.csv
BL21RNA-ellipsoid-none-none-0mgNOM/L-stock-CaCl2-10_20nm-10mgNM/L-6.0-25C-0.1_1 1
BL21RNA-ellipsoid-none-none-0mgNOM/L-stock-CaCl2-10_20nm-10mgNM/L-8.0-25C-0.01_0.1 1
BL21RNA-ellipsoid-none-none-0mgNOM/L-stock-CaCl2-1_10nm-10mgNM/L-6.0-25C-0.1_1 3
BL21RNA-ellipsoid-none-none-0mgNOM/L-stock-CaCl2-1_10nm-10mgNM/L-8.0-25C-0.1_1 3
BL21RNA-ellipsoid-none-none-0mgNOM/L-stock-NaCl-1_10nm-10mgNM/L-6.0-25C-0.01_0.1 2
BL21RNA-ellipsoid-none-none-0mgNOM/L-stock-NaCl-1_10nm-10mgNM/L-6.0-25C-0.1_1 2
BL21RNA-ellipsoid-none-none-0mgNOM/L-stock-NaCl-1_10nm-10mgNM/L-8.0-25C-0.01_0.1 3
BL21RNA-ellipsoid-none-none-0mgNOM/L-stock-NaCl-1_10nm-10mgNM/L-8.0-25C-0.1_1 1
BL21RNA-ellipsoid-none-none-0mgNOM/L-stock-NaCl-<1nm-10mgNM/L-6.0-25C-0.1_1 1
BL21RNA-ellipsoid-none-none-0mgNOM/L-stock-NaCl-<1nm-10mgNM/L-8.0-25C-0.1_1 1
@eli-s-goldberg
eli-s-goldberg / enmExperimentalData.csv
Created Nov 13, 2015
qcm-d experimental conditions and results data visualization
View enmExperimentalData.csv
BL21RNA-ellipsoid-none-none-0mgNOM/L-stock-CaCl2-10_20nm-10mgNM/L-8.0-25C-0.01_0.1 1
BL21RNA-ellipsoid-none-none-0mgNOM/L-stock-CaCl2-1_10nm-10mgNM/L-6.0-25C-0.1_1 3
BL21RNA-ellipsoid-none-none-0mgNOM/L-stock-CaCl2-1_10nm-10mgNM/L-8.0-25C-0.1_1 3
BL21RNA-ellipsoid-none-none-0mgNOM/L-stock-NaCl-1_10nm-10mgNM/L-6.0-25C-0.01_0.1 2
BL21RNA-ellipsoid-none-none-0mgNOM/L-stock-NaCl-1_10nm-10mgNM/L-6.0-25C-0.1_1 2
BL21RNA-ellipsoid-none-none-0mgNOM/L-stock-NaCl-1_10nm-10mgNM/L-8.0-25C-0.01_0.1 3
BL21RNA-ellipsoid-none-none-0mgNOM/L-stock-NaCl-1_10nm-10mgNM/L-8.0-25C-0.1_1 1
BL21RNA-ellipsoid-none-none-0mgNOM/L-stock-NaCl-<1nm-10mgNM/L-6.0-25C-0.1_1 1
BL21RNA-ellipsoid-none-none-0mgNOM/L-stock-NaCl-<1nm-10mgNM/L-8.0-25C-0.1_1 1
@eli-s-goldberg
eli-s-goldberg / enmExperimentalData.csv
Created Nov 13, 2015
QCM-D experimental data visualization
View enmExperimentalData.csv
We can make this file beautiful and searchable if this error is corrected: It looks like row 3 should actually have 2 columns, instead of 1. in line 2.
BL21RNA-ellipsoid-none-none-0mgNOM/L-stock-CaCl2-10_20nm-10mgNM/L-6.0-25C-0.1_1,1
BL21RNA-ellipsoid-none-none-0mgNOM/L-stock-CaCl2-10_20nm-10mgNM/L-8.0-25C-0.01_0.1,1
BL21RNA-ellipsoid-none-none-0mgNOM/L-stock-CaCl2-1_10nm-10mgNM/L-6.0-25C-0.1_1-3
BL21RNA-ellipsoid-none-none-0mgNOM/L-stock-CaCl2-1_10nm-10mgNM/L-8.0-25C-0.1_1-3
BL21RNA-ellipsoid-none-none-0mgNOM/L-stock-NaCl-1_10nm-10mgNM/L-6.0-25C-0.01_0.1-2
BL21RNA-ellipsoid-none-none-0mgNOM/L-stock-NaCl-1_10nm-10mgNM/L-6.0-25C-0.1_1-2
BL21RNA-ellipsoid-none-none-0mgNOM/L-stock-NaCl-1_10nm-10mgNM/L-8.0-25C-0.01_0.1-3
BL21RNA-ellipsoid-none-none-0mgNOM/L-stock-NaCl-1_10nm-10mgNM/L-8.0-25C-0.1_1,1
BL21RNA-ellipsoid-none-none-0mgNOM/L-stock-NaCl-<1nm-10mgNM/L-6.0-25C-0.1_1,1
BL21RNA-ellipsoid-none-none-0mgNOM/L-stock-NaCl-<1nm-10mgNM/L-8.0-25C-0.1_1,1
@eli-s-goldberg
eli-s-goldberg / README.md
Created Nov 13, 2015
QCM-D alpha parameter literature
View README.md

This example shows how it is possible to use a D3 sunburst visualization (partition layout) with data that describes sequences of events.

A good use case is to summarize navigation paths through a web site, as in the sample synthetic data file (visit_sequences.csv). The visualization makes it easy to understand visits that start directly on a product page (e.g. after landing there from a search engine), compared to visits where users arrive on the site's home page and navigate from there. Where a funnel lets you understand a single pre-selected path, this allows you to see all possible paths.

Features:

  • works with data that is in a CSV format (you don't need to pre-generate a hierarchical JSON file, unless your data file is very large)
  • interactive breadcrumb trail helps to emphasize the sequence, so that it is easy for a first-time user to understand what they are seeing
  • percentages are shown explicitly, to help overcome the distortion of the data that occurs w
View README.md

This example shows how it is possible to use a D3 sunburst visualization (partition layout) with data that describes sequences of events.

A good use case is to summarize navigation paths through a web site, as in the sample synthetic data file (visit_sequences.csv). The visualization makes it easy to understand visits that start directly on a product page (e.g. after landing there from a search engine), compared to visits where users arrive on the site's home page and navigate from there. Where a funnel lets you understand a single pre-selected path, this allows you to see all possible paths.

Features:

  • works with data that is in a CSV format (you don't need to pre-generate a hierarchical JSON file, unless your data file is very large)
  • interactive breadcrumb trail helps to emphasize the sequence, so that it is easy for a first-time user to understand what they are seeing
  • percentages are shown explicitly, to help overcome the distortion of the data that occurs wh
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Sequences sunburst</title>
<script src="http://d3js.org/d3.v3.min.js"></script>
<link rel="stylesheet" type="text/css"
href="https://fonts.googleapis.com/css?family=Open+Sans:400,600">
<link rel="stylesheet" type="text/css" href="sequences.css"/>
</head>
View index.html
<!doctype HTML>
<meta charset = 'utf-8'>
<html>
<head>
<link rel='stylesheet' href='http://timelyportfolio.github.io/rCharts_d3_sankey//css/sankey.css'>
<script src='http://timelyportfolio.github.io/rCharts_d3_sankey//js/d3.v3.js' type='text/javascript'></script>
<script src='http://timelyportfolio.github.io/rCharts_d3_sankey//js/sankey.js' type='text/javascript'></script>
<style>
.rChart {