Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
{
"metadata": {
"name": "",
"signature": "sha256:57e3953da6a8dc30a7f1354c37962b066401ca7fca37594140131e09720176cc"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "code",
"collapsed": false,
"input": [
"install.packages(\"devtools\") # so we can install from github\n",
"library(\"devtools\")\n",
"library(reshape)\n",
"install_github(\"ropensci/plotly\") # plotly is part of ropensci\n",
"install_github(\"takluyver/IRdisplay\")\n",
"library(plotly)\n",
" \n",
"py <- plotly(username=\"r_user_guide\", key=\"mw5isa4yqp\") # open plotly connection"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stderr",
"text": [
"Installing package into \u2018/Users/matthewsundquist/Library/R/3.1/library\u2019\n",
"(as \u2018lib\u2019 is unspecified)\n"
]
},
{
"ename": "ERROR",
"evalue": "Error in contrib.url(repos, \"source\"): trying to use CRAN without setting a mirror\n",
"output_type": "pyerr",
"traceback": [
"Error in contrib.url(repos, \"source\"): trying to use CRAN without setting a mirror\n"
]
},
{
"output_type": "stream",
"stream": "stderr",
"text": [
"Downloading github repo ropensci/plotly@master\n"
]
},
{
"output_type": "stream",
"stream": "stderr",
"text": [
"Installing plotly\n"
]
},
{
"output_type": "stream",
"stream": "stderr",
"text": [
"'/Library/Frameworks/R.framework/Resources/bin/R' --vanilla CMD INSTALL \\\n",
" '/private/var/folders/vm/4bcx1bc16rd_566rnf2nwypw0000gn/T/Rtmpg0rkDG/devtools26b640b1d4cb/ropensci-plotly-c747575' \\\n",
" --library='/Users/matthewsundquist/Library/R/3.1/library' --install-tests \n"
]
},
{
"output_type": "stream",
"stream": "stderr",
"text": [
"\n"
]
},
{
"output_type": "stream",
"stream": "stderr",
"text": [
"Downloading github repo takluyver/IRdisplay@master\n"
]
},
{
"output_type": "stream",
"stream": "stderr",
"text": [
"Installing IRdisplay\n"
]
},
{
"output_type": "stream",
"stream": "stderr",
"text": [
"'/Library/Frameworks/R.framework/Resources/bin/R' --vanilla CMD INSTALL \\\n",
" '/private/var/folders/vm/4bcx1bc16rd_566rnf2nwypw0000gn/T/Rtmpg0rkDG/devtools26b65bbee5cf/takluyver-IRdisplay-91cc8d2' \\\n",
" --library='/Users/matthewsundquist/Library/R/3.1/library' --install-tests \n"
]
},
{
"output_type": "stream",
"stream": "stderr",
"text": [
"\n"
]
},
{
"output_type": "stream",
"stream": "stderr",
"text": [
"Loading required package: RCurl\n"
]
},
{
"output_type": "stream",
"stream": "stderr",
"text": [
"Loading required package: bitops\n"
]
},
{
"output_type": "stream",
"stream": "stderr",
"text": [
"Loading required package: RJSONIO\n"
]
},
{
"output_type": "stream",
"stream": "stderr",
"text": [
"Loading required package: ggplot2\n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"dat <- data.frame(xx = c(runif(100,20,50),runif(100,40,80),runif(100,0,30)),yy = rep(letters[1:3],each = 100))\n",
"plot <- ggplot(dat, aes(x=xx, fill=yy)) + geom_histogram(alpha=0.2, position=\"identity\")"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 4
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"plot"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stderr",
"text": [
"stat_bin: binwidth defaulted to range/30. Use 'binwidth = x' to adjust this.\n"
]
},
{
"metadata": {},
"output_type": "pyout",
"prompt_number": 5,
"text": []
},
{
"metadata": {},
"output_type": "display_data",
"png": "iVBORw0KGgoAAAANSUhEUgAAAeAAAAHgCAYAAAB91L6VAAAEJGlDQ1BJQ0MgUHJvZmlsZQAAOBGFVd9v21QUPolvUqQWPyBYR4eKxa9VU1u5GxqtxgZJk6XtShal6dgqJOQ6N4mpGwfb6baqT3uBNwb8AUDZAw9IPCENBmJ72fbAtElThyqqSUh76MQPISbtBVXhu3ZiJ1PEXPX6yznfOec7517bRD1fabWaGVWIlquunc8klZOnFpSeTYrSs9RLA9S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ljd9880257777hpfFiYgCHKfeIlcEEEDAU4ElS5bIwYMHZcGCBTJv3rxAQS8C9OUvf1k++ugjufTSS2Mnwyno2HUZCSOAAAJ+CegVxvQ9YL1wkx716qTXntcPZOlvB+hXXeN4qU2OgP0ax7QWAQQQiJ3AM888I6eddlpw9KunonXSo2E9AtZLbP7kJz8JlsXtfxwBx63HyBcBBBDwTOAb3/jG8E/appve2NgY6Xrl6e1d/JcC7GKvkBMCCCCAwLBAqX7gIv2LVcM7tjxDAbbcAYRHAAEEEMgt0L9lc3DKOfdWudfqz8xWHzcn90aG11KADYMTDgEEEECgcIFSHQUXHrl89+BDWOWzZc8IIIAAAghkFaAAZ6VhBQIIIIAAAuUToACXz5Y9I4AAAgggkFWgqAKsVx0ZPe3atSu4Gsno5dxGAAEEEEAAgSMFCirAXV1don+LFi0K/k3f1i9E33LLLbJq1aojI7AEAQQQQAABBwXa2tqsZlVQAT7//PNl3Lhxsn79+uBfndc//UL0yy+/LGeddZbVxhAcAQQQQACBfALPP/+8fOELXwguazl//nzZtGlTvruUZX1BX0N6+umnpb+/P/jViZUrVw4nlEgkRP+YKlvg/b2pjA3sqxXZObROr82anqrbGtKzuf+ty726nGuTO7ZH2n3f9BmRtovDRlHarI/lwZmz4tAcckSgKAG9fKX+stKsWbPktttuk2effVaOP/74ovY1ljsVVID1KiLJZFL+8Ic/jCUm90UAAQQQQMCaQEtLiyxbtkxqa2tl37598olPfMJKLkUdtr700kvBT0CddNJJcuKJJw7/Pfnkk1YaQVAEEEAAAQSiCtx6663ym9/8Rh5//HE5+eSTgzO7Ue9byu0KOgJOB166dKlcc801smjRouCIOL187ty56Vn+RQABBBBAwEmByy+/XG688UbRI+H29nbZsWOHlTwLLsB6OTD9/cXvf//74tqFra0IEhQBBBBAIFYCWr86OzulpqZmxEGk6UYUfApai+55550nv/vd70R/JJkJAQQQQACBuAnoN3j0M002p4ILsCar35269tprZdKkSTJv3rzhP94DttmVxEYAAQQQiJNAUeX/pz/9qfzgBz84op28B3wECQsQQAABBBDIKFBUAb7jjjvkww8/PGKHv/jFL+Tcc889YjkLEEAAAQQQKFYgcfRUaawq9t6H7lc19Pkl16aiCrAeAaff/9V/9cpYjzzyiCxcuNC19pEPAggggEDMBf6ve4t0d3ePqRV1dXXyqYb5Y9pHqe9cVAH+7Gc/OyKPr371q/K///1PnnnmGbn44otHrOMGAggggAACYxXo6+sb6y6cu39RH8Ia3Qr9atK2bduktbV19CpuI4AAAggggEAGgaKOgPV93p07dwa70+KrP0+o36e69957M4RgEQIIIIAAAgiMFiiqAN99990jzsfr96lOOeUUSaUyX6x/dFBuI4AAAggg4LtAUaeg9cNWZ555pkyfPl0mT54sp512GsXX95FE+xFAAIGYCNx+++3yxhtvWM+2qAL87rvvyumnnx78gsQZZ5wh48ePl/vuu896Y0gAAQQQQACBfAL6c4T6qeqxfrI6X5x864sqwNdff71ccMEFwfvAe/fuldWrV4t+NWnDhg354rEeAQQQQAAB6wJ63YpLL71U9CAy03UtTCRYVAHWQvvjH/84uBRldXW1fP7zn5err75aXnzxRRM5EwMBBBBAAIExCZx99tny2GOPif4y0j333DOmfRV756IKsH7g6s033xwR84UXXgjeDx6xkBsIIIAAAgg4KKAHjjrpZ5q2b99uJcOiCvANN9wQXHJy8eLFcvPNN8sJJ5wQnEu/8MILrTSCoAgggAACCBQisG7dumDzV155JfiFv0LuW6ptiyrAerUrverVZz7zmeDTz/rbii+99FLwXeBSJcZ+EEAAAQQQKJfA008/LUuWLJHXX389+ExTueLk2m9R3wM+cOCAPProo/Lzn/9c9D3gZcuWBd8D1jezmRBAAAEEEHBZ4IEHHgjS098ysHn9iqKOgPVT0HrZyYGBgaARX/nKV4JPk+knopkQQAABBBCIg4DN4qs+RR0B6znzzZs3S1XVod+H0o9y6yejn3jiCVm6dGkc3MkRAQRyCGzseFcq8eL3OZrMKgSMCxR1BNzY2CivvfbaiGSff/55aWpqGrGMGwgggAACCCCQWaCoI+A777xTzjnnHFmwYIHMnDlT1qxZIyeddJLwKejMyC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HpsIA+FtVOp0QiEcynxxyP0cNOLsxxIY6hXtD3mvRTlXpqS98nWbZsWfDAd6GDXMtBPxTz5ptvBp+A1twmT54s+sGrd999V1avXh28h6mfVuXXajL33K5du4IjEh1jOuknfPUTq3qqVd9bP/HEEzPf0dOl7733XvBpXj0FPWHChOAbCvo4/ctf/hKcMdD3h6+55prgCM9ToozN1g/76QsWfWH3yU9+Us466yweoxml7C6kAIf89XSWvnpkKl5AT6PqkyJTdAH9BS49UtE/pswCmR6bmZZlvrefS/WxqEe+o8cVj1F3xgMF2J2+IBMEEEAAAY8EeMntUWfTVAQQQAABdwQowO70BZkggAACCHgkQAH2qLNpKgIIIICAOwIUYHf6gkw8ENCvuemnUvXTvTo98MADoteA1kuhZlquX01iQgCByhTgQ1iV2a+0ymGB733ve8FXQu67777gikV6PW29BGq25Q43hdQQQGAMAhTgMeBxVwSKEdCLIcyfPz/4rvn5558vd999d7CbbMuLicF9EEDAfQFOQbvfR2RYYQJ6uckbbrghuADHd77zneHWZVs+vAEzCCBQUQIcAVdUd9KYOAjolZz0amH6p5ej/P3vfx+knW15HNpEjgggULgAR8CFm3EPBMYkcNttt4n+TqteTvHpp5+W9G8qZ1s+pmDcGQEEnBVIOpsZiSFQgQL6Y/J6nV79Efnm5ubgJ/aWL18u9957b8blep1oflmqAgcCTUJgSIBT0AwDBBBAAAEELAhwCtoCOiERQAABBBCgADMGEEAAAQQQsCBAAbaATkgEEEAAAQQowIwBBBBAAAEELAhQgC2gExIBBBBAAAEKMGMAAQQQQAABCwIUYAvohEQAAQQQQIACzBhAAAEEEEDAggAF2AI6IRFAAAEEEPj/NyswL0xPlWAAAAAASUVORK5CYII="
}
],
"prompt_number": 5
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"py$ggplotly(plot, session=\"notebook\")"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stderr",
"text": [
"stat_bin: binwidth defaulted to range/30. Use 'binwidth = x' to adjust this.\n"
]
},
{
"output_type": "stream",
"stream": "stderr",
"text": [
"stat_bin: binwidth defaulted to range/30. Use 'binwidth = x' to adjust this.\n"
]
},
{
"output_type": "stream",
"stream": "stderr",
"text": [
"stat_bin: binwidth defaulted to range/30. Use 'binwidth = x' to adjust this.\n"
]
},
{
"output_type": "stream",
"stream": "stderr",
"text": [
"stat_bin: binwidth defaulted to range/30. Use 'binwidth = x' to adjust this.\n"
]
},
{
"output_type": "stream",
"stream": "stderr",
"text": [
"stat_bin: binwidth defaulted to range/30. Use 'binwidth = x' to adjust this.\n"
]
},
{
"output_type": "stream",
"stream": "stderr",
"text": [
"stat_bin: binwidth defaulted to range/30. Use 'binwidth = x' to adjust this.\n"
]
},
{
"output_type": "stream",
"stream": "stderr",
"text": [
"stat_bin: binwidth defaulted to range/30. Use 'binwidth = x' to adjust this.\n"
]
},
{
"output_type": "stream",
"stream": "stderr",
"text": [
"stat_bin: binwidth defaulted to range/30. Use 'binwidth = x' to adjust this.\n"
]
},
{
"output_type": "stream",
"stream": "stderr",
"text": [
"stat_bin: binwidth defaulted to range/30. Use 'binwidth = x' to adjust this.\n"
]
},
{
"output_type": "stream",
"stream": "stderr",
"text": [
"stat_bin: binwidth defaulted to range/30. Use 'binwidth = x' to adjust this.\n"
]
},
{
"output_type": "stream",
"stream": "stderr",
"text": [
"stat_bin: binwidth defaulted to range/30. Use 'binwidth = x' to adjust this.\n"
]
},
{
"output_type": "stream",
"stream": "stderr",
"text": [
"Loading required package: IRdisplay\n"
]
},
{
"html": [
"<iframe height=\"525\" id=\"igraph\" scrolling=\"no\" seamless=\"seamless\"\n",
"\t\t\t\tsrc=\"https://plot.ly/~r_user_guide/989\" width=\"100%\" frameBorder=\"0\"></iframe>"
],
"metadata": {},
"output_type": "display_data"
}
],
"prompt_number": 6
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"df <- structure(c(106487, 495681, 1597442,\n",
" 2452577, 2065141, 2271925, 4735484, 3555352,\n",
" 8056040, 4321887, 2463194, 347566, 621147,\n",
" 1325727, 1123492, 800368, 761550, 1359737,\n",
" 1073726, 36, 53, 141, 41538, 64759, 124160,\n",
" 69942, 74862, 323543, 247236, 112059, 16595,\n",
" 37028, 153249, 427642, 1588178, 2738157,\n",
" 2795672, 2265696, 11951, 33424, 62469,\n",
" 74720, 166607, 404044, 426967, 38972, 361888,\n",
" 1143671, 1516716, 160037, 354804, 996944,\n",
" 1716374, 1982735, 3615225, 4486806, 3037122,\n",
" 17, 54, 55, 210, 312, 358, 857, 350, 7368,\n",
" 8443, 6286, 1750, 7367, 14092, 28954, 80779,\n",
" 176893, 354939, 446792, 33333, 69911, 53144,\n",
" 29169, 18005, 11704, 13363, 18028, 46547,\n",
" 14574, 8954, 2483, 14693, 25467, 25215,\n",
" 41254, 46237, 98263, 185986), .Dim = c(19,\n",
" 5), .Dimnames = list(c(\"1820-30\", \"1831-40\",\n",
" \"1841-50\", \"1851-60\", \"1861-70\", \"1871-80\",\n",
" \"1881-90\", \"1891-00\", \"1901-10\", \"1911-20\",\n",
" \"1921-30\", \"1931-40\", \"1941-50\", \"1951-60\",\n",
" \"1961-70\", \"1971-80\", \"1981-90\", \"1991-00\",\n",
" \"2001-06\"), c(\"Europe\", \"Asia\", \"Americas\",\n",
" \"Africa\", \"Oceania\")))"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 18
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"df.m <- melt(df)"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 21
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"df.m <- rename(df.m, c(X1 = \"Period\", X2 = \"Region\"))"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 22
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"a <- ggplot(df.m, aes(x = Period, y = value/1e+06,\n",
" fill = Region)) "
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 24
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"b <- a + geom_bar(stat = \"identity\", position = \"stack\")"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 25
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"py$ggplotly(b, session=\"notebook\")"
],
"language": "python",
"metadata": {},
"outputs": [
{
"html": [
"<iframe height=\"525\" id=\"igraph\" scrolling=\"no\" seamless=\"seamless\"\n",
"\t\t\t\tsrc=\"https://plot.ly/~r_user_guide/991\" width=\"100%\" frameBorder=\"0\"></iframe>"
],
"metadata": {},
"output_type": "display_data"
}
],
"prompt_number": 26
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"set.seed(1234)\n",
"df <- data.frame(cond = factor( rep(c(\"A\",\"B\"), each=200) ), \n",
" rating = c(rnorm(200),rnorm(200, mean=.8)))"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 37
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"box <- ggplot(df, aes(x=cond, y=rating, fill=cond)) + geom_boxplot()"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 38
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"py$ggplotly(box, session=\"notebook\")"
],
"language": "python",
"metadata": {},
"outputs": [
{
"html": [
"<iframe height=\"525\" id=\"igraph\" scrolling=\"no\" seamless=\"seamless\"\n",
"\t\t\t\tsrc=\"https://plot.ly/~r_user_guide/993\" width=\"100%\" frameBorder=\"0\"></iframe>"
],
"metadata": {},
"output_type": "display_data"
}
],
"prompt_number": 39
}
],
"metadata": {}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment