-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjupyter-template
More file actions
91 lines (91 loc) · 2.29 KB
/
jupyter-template
File metadata and controls
91 lines (91 loc) · 2.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Welcome To Jupyter \n",
"## To begin click Cells->Run All in the menu above\n",
" This page will allow you to do analysis on data retrieved from the extractor. Each cell is a small python script that you can run by clicking the arrow on the left side. The first cell below will retrieve your data from the extractor and store it in a pandas DataFrame called df. You can see all the ways you can analyze data in a DataFrame with [this tutorial](https://www.tutorialspoint.com/python_pandas/python_pandas_dataframe.htm). \n",
" \n",
" Other cells in this notebook provide some statistics and a plot of the data. \n",
" \n",
" [Return to the extractor](/)",
" [Return to the job home](/job/data.html?jobid={{ jobid }})"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import pandas as pd\n",
"df = pd.read_csv(\"http://ops2.mmto.arizona.edu:8000/data/{{ jobid }}/processed.csv\")\n",
"df.index = pd.to_datetime(df.timestamp)\n",
"del df['timestamp']\n",
"%matplotlib notebook\n",
"\n",
"# The MPL epoch and pandas epoch have diverged\n",
"# This puts them in line but will likely break one day soon.\n",
"import matplotlib.dates\n",
"matplotlib.dates.set_epoch('0000-12-31')"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"df"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"df.describe()\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"df.plot(grid=True)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.3"
}
},
"nbformat": 4,
"nbformat_minor": 4
}