Skip to content

Instantly share code, notes, and snippets.

Avatar

Matthew Sundquist msund

View GitHub Profile
@msund
msund / petition_card_embed
Created Apr 25, 2016
Petition card HTML for embeddable widgets
View petition_card_embed
<div class="box box-basic mvn pan embedded-card">
<div class="arrange arrange-middle mvs phm">
<div class="arrange-fit">
<div style="width:34px;">
<div class="flex-embed box box-basic pan mvn">
<div class="flex-embed-ratio"></div>
<div class="flex-embed-content">
<img src="./embedded-petition_files/jZrzAduviWUWJUK-128x128-noPad.jpg">
</div>
</div>
View gist:d99db018dedafff4dd44
{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"collapsed": false
},
"source": [
"# IPython Notebook Tutorial"
]
@msund
msund / IPython NB
Last active Sep 22, 2015
NB tutorial
View IPython NB
{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"collapsed": false
},
"source": [
"# IPython Notebook Tutorial"
]
View gist:f9dbc8e1deb13f2f3de6
If you track events that change--temperature, stock prices, or sales--you need the most recent data. Typical options are: refreshing data with jobs, queries, and code; pay a steep price for clunky desktop software; manually move data and update your graph. <a href="https://plot.ly/">Plotly's<a/> new <a href="http://chriddyp.github.io/external-source-plotter/">Proxy Plotter</a> solves these problems. Easily make, embed, and edit web-based graphs and dashboards that fetch your data. It's free, online, and collaborative. This feature works along with our <a href="https://plot.ly/api">APIs for R, Python, and MATLAB</a>, free <a href="https://plot.ly/online-graphing/">web platform</a>, and <a href="https://plot.ly/product/enterprise/">Enterprise product</a>.
<br>
<br>
<br>
<img src="http://i.imgur.com/cMaJ3qG.png" /></a>
<br>
<br>
<br>
The graph below is an example of an updating plot that fetches data from <a href="https://www.quandl.com/">Quandl</a>. Ploty fetches the most up to date information when you load th
View gist:0f4011b59f12a7e99d04
[{
"xsrc": "Year",
"ysrc": "Biotechnology",
"name": "Biotechnology"
},
{
"xsrc": "Year",
"ysrc": "Business Products and Services",
"visible": "legendonly",
"name": "Business Products and Services"
View gist:e77538a6c6116573ad00
Domino's new <a href="http://blog.dominodatalab.com/r-notebooks/">R Notebook</a> and <a href="https://plot.ly/ggplot2">Plotly's R API</a> let you code, make interactive R and ggplot2 graphs, and collaborate entirely online. Here is the Notebook in action:
<br>
<br>
<br>
<a href="http://nbviewer.ipython.org/gist/msund/d3e00e5e27dff31a7b6d">Published R Notebook</a>
<br>
<br>
<br>
To execute this Notebook or build your own head to <a href="https://app.dominodatalab.com/nick/plotly">Domino's Plotly Project</a>. The GIF below shows how to get started: choose an R session, press "Open Notebook", and choose the "R Notebook" file. For sensitive data, see <a href="http://www.dominodatalab.com/on_premise">Domino On-Premise</a> and <a href="https://plot.ly/product/enterprise/">Plotly Enterprise</a>.
<br>
@msund
msund / gist:5481bd48a21e9532a36f
Last active Aug 29, 2015
Next Version for CartoDB
View gist:5481bd48a21e9532a36f
{
"metadata": {
"name": "",
"signature": "sha256:125dfe0d83824b70aef36b1d777d19fa4bf5ba3bde0874041ba6bd5b9a4e4aa8"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
View gist:31c00b30f20879995722
{
"metadata": {
"name": "",
"signature": "sha256:48ea41fd994af6da00a65cf7aa56252c9de1a3a2470ffbed1c6c6fe7c7ce6a21"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
View gist:4d188b1e736e0e0fe78b
Imagine exploring graphs like you would explore terrain on Google Maps. You would want to zoom, toggle, see data when you hover your mouse, and filter. For viewers, this is more engaging, informative, and fun. For exploration, it's more precise and efficient. Unfortunately, creating interactive plots can be difficult, time-consuming, and a technical burden.
<br>
<br>
<br>
<a href="https://plot.ly/">Plotly</a> converts ggplot2 plots into interactive, online plots rendered with D3.js, a JavaScript visualizaiton library. Letting you publish interactive ggplot2 plots with one line of code is the goal behind our project. Plotly is free and online, or can be hosted (or <a href="https://plot.ly/product/enterprise/">host Plotly</a> on your servers).
<br>
<br>
<br>
Let's make a histogram, bar chart, and boxplot. You can copy and paste this code into your R terminal to make an <a href="http://stackoverflow.com/questions/6957549/overlaying-histograms-with-ggplot2-in-r">overlad histogram</a>. <a href="https://plot.ly/gg
View gist:faf8f09c67bcd3d6ccca
{
"metadata": {
"name": "",
"signature": "sha256:57e3953da6a8dc30a7f1354c37962b066401ca7fca37594140131e09720176cc"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [