Skip to content

Instantly share code, notes, and snippets.

View msund's full-sized avatar
🪴

Matthew Sundquist msund

🪴
View GitHub Profile
@msund
msund / First draft
Last active August 29, 2015 14:01
R Notebook
{
"metadata": {
"name": "",
"signature": "sha256:4abc3bda22c03a05e4c028a06c0fdb0efbd5a6220ac512d85f9529fe8f08d9b7"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
@msund
msund / gist:21be3e818625c309e3c8
Last active August 29, 2015 14:01
LaTeX Graphs
{
"metadata": {
"name": "Untitled0"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
{
"metadata": {
"name": "Reproducible figures"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
{
"metadata": {
"name": "",
"signature": "sha256:0066d7751e4802e747a189c766f68718da3fe272e314ebd5e4c27d43535c1cf9"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
@msund
msund / gist:2ca48d4b1824ba58ae7e
Last active August 29, 2015 14:02
LaTeX draft
This file has been truncated, but you can view the full file.
{
"metadata": {
"name": "Untitled0"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
@msund
msund / Polars
Created June 27, 2014 08:32
NB for polar charts
{
"metadata": {
"name": "Untitled0"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
install.packages("devtools") # windows users install Rtools. Also: for mac and linux.
library("devtools")
install_github("ropensci/plotly") # Plotly is part of the super cool rOpenSci.
library(plotly) # install libraries we’ll be using
library(ggplot2)
library(reshape)
py <- plotly("ggplot2examples", "3gazttckd7") # sign up (https://plot.ly/ssi/) and get a key or use our public key to initiate a graph object
@msund
msund / ggplot2 and Plotly: beautiful, interactive, & shareable plots
Last active August 29, 2015 14:03
ggplot2 and Plotly: beautiful, interactive, & shareable plots
</p><a href="https://plot.ly">Plotly</a> lets you collaboratively analyze data and make beautiful, web-based plots. Add <code>py$ggplotly()</code> to the end of your ggplot2 script, and you get an interactive, embeddable, shareable graph like the one below (credit: from <a href="http://nbviewer.ipython.org/gist/mkcor/0ee7c73d9ba4c68ddc1a/">a Notebook</a> presented at useR by <a href="https://marianne-corvellec.appspot.com/">Marianne Corvellec</a>). It's that easy.</p>
<br>
<br>
<br>
<iframe width="800" height="550" frameborder="0" seamless="seamless" scrolling="no" src="https://plot.ly/~ggplot2examples/208/.embed?width=800&height=550"></iframe>
<br>
<br>
<p>The overview:
<UL>
<li type=disc> You can use <a href="https://plot.ly/ggplot2/">ggplot2 and Plotly</a> to make bar, line, and scatter charts, plus histograms and facets.
@msund
msund / Charts from Economist
Created August 1, 2014 19:14
Economist Charts Post
<p>You can embed interactive Plotly graphs in your webpage or blog with this HTML snippet. Add the desired URL and re-size as needed.</p>
<br>
<pre style="background:#f1f1f1;color:#000">&lt;iframe src=<span style="color:#c03030">"https://plot.ly/~cimar/114/650/650"</span> width=<span style="color:#c03030">"650"</span> height=<span style="color:#c03030">"650"</span> frameBorder=<span style="color:#c03030">"0"</span> seamless=<span style="color:#c03030">"seamless"</span> scrolling=<span style="color:#c03030">"no"</span>&gt;&lt;/iframe>
</span></pre>
<div width="100%" align="center"><p>***</p></div>
<br>
<br>
<img src="https://31.media.tumblr.com/8b02b31fc6bdf3b17b24fee080dec36e/tumblr_inline_n9eb6jUByn1suclhk.png">
<br>
<br>
@msund
msund / The overview
Last active August 29, 2015 14:04
Post for Rosie
How do people use Plotly? Google Chrome ships a Plotly <a href="https://chrome.google.com/webstore/detail/plotly/hfjjbcodmdgnpngccdnefheadifbmmei">Chrome App</a> for high schoolers and businesses. NASA scientists and engineers track satellites with Plotly. Journalists at the Washington Post and Wired explain current events with Plotly. How can you use Plotly? Read on to learn more about our free online product or see a <a href="https://plot.ly/product/enterprise/">product page</a> to learn about how to run Plotly on your own servers.
<br>
<br>
Let's jump in. A Plotly version of a <a href="https://www.facebook.com/notes/facebook-data-science/mothers-day-2014/10152235539518859">Facebook Data Science team</a> graph shows the age of children on the x axis and the distance between children and mothers on the y axis.
<br>
<br>
<iframe width="650" height="650" frameborder="0" seamless="seamless" scrolling="no" src="https://plot.ly/~cimar/38/.embed?width=650&height=650"></iframe>
<br>
<br>
Move your mouse over the g