"Use RestAPI to read power consumption info for cluster nodes and generate usage reports. this is based on the [pandas time series tutorial by Jennifer Walker](https://www.dataquest.io/blog/tutorial-time-series-analysis-with-pandas/)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import requests\n",
"import pprint\n",
"import datetime\n",
"import os\n",
"import numpy as np\n",
"import pandas as pd\n",
"import seaborn as sns\n",
"import matplotlib.pyplot as plt\n",
"import matplotlib.dates as mdates"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Set up credentials to query RestAPI. Bright controls access based on the user identity. The user's cert.pem and cert.key are automatically generated but the cacert.pem needs to be constructed from the certs returned by the master."
"ax.plot(kW_7d, color='black', linewidth=4, label='7-day Rolling Average')\n",
"label='Trend (7 day Rolling Mean)'\n",
"ax.legend()\n",
"ax.set_ylabel('Power (kW)')\n",
"ax.set_title('Cheaha Trends in Electricity Consumption');"
]
}
],
"metadata": {
"language_info": {
"name": "python",
"pygments_lexer": "ipython3"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
%% Cell type:markdown id: tags:
# Power Stats
Use RestAPI to read power consumption info for cluster nodes and generate usage reports. this is based on the [pandas time series tutorial by Jennifer Walker](https://www.dataquest.io/blog/tutorial-time-series-analysis-with-pandas/)
%% Cell type:code id: tags:
```
import requests
import pprint
import datetime
import os
import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
import matplotlib.dates as mdates
```
%% Cell type:markdown id: tags:
Set up credentials to query RestAPI. Bright controls access based on the user identity. The user's cert.pem and cert.key are automatically generated but the cacert.pem needs to be constructed from the certs returned by the master.