To protect your data, the CISO officer has suggested users to enable 2FA as soon as possible.
Currently 2.7% of users enabled 2FA.

Commit 5ef3628d authored by Liam Hayes's avatar Liam Hayes
Browse files

minor edits

parent 718f473e
......@@ -171,7 +171,7 @@ On local machine:
```
mkdir datadumps/
./manage.py dumpdata --natural-primary --natural-foreign > datadumps/db_4Dec20.json
scp datadumps/db_4Dec20.json windatlas:~/datadumps/db_4Dec20.json
scp datadumps/db_4Dec20.json windatlas:~/data/db_4Dec20.json
```
On remote machine:
......@@ -188,4 +188,4 @@ don't yet exist.
Now move the media files (on local machine):
- `rsync -rvv --delete media/ windatlas:/home/ubuntu/windatlas.xyz/media/` (~330MB).
- `r` for recursive, `vv` for very verbose, `delete` for delete files on remote that aren't on local
- For big transfers it'd be faster to make `media.zip` file, and copy that across instead.
\ No newline at end of file
- For big transfers it'd be faster to make `media.zip` file, and copy that across instead.
......@@ -73,8 +73,10 @@ def read_pcurve(file):
return pcurve
def plot_trace(data):
#fig, ax1 = plt.subplots(1, 1, figsize=(15, 5))
plt.rcParams.update({'font.size': 18})
fig, ax1 = plt.subplots(1, 1, figsize=(30, 10))
fig, ax1 = plt.subplots(1, 1, figsize=(15, 5))
ax1.plot(data.index, data.power, linewidth=0.2, alpha=0.5)
ax1.plot(data.index, data.power / data.cf_trace)
ax1.set_xlabel('Time')
......@@ -91,18 +93,22 @@ def plot_prediction(data, col_name, rmse_hourly, rmse_daily, rmse_dcurve):
data_daily = data.groupby(pd.Grouper(freq='D')).mean()
fig, (ax1, ax2, ax3) = plt.subplots(1, 3, figsize=(15,5))
#fig, (ax1, ax2, ax3) = plt.subplots(1, 3, figsize=(15,5))
plt.rcParams.update({'font.size': 18})
fig, (ax1, ax2, ax3) = plt.subplots(1, 3, figsize=(18,3.5))
#fig, (ax1, ax2, ax3) = plt.subplots(1, 3, figsize=(30,10))
ax1.plot([0,1], [0,1], color='black')
ax1.scatter(data.cf_trace, data[col_name], alpha=0.3, s=0.3)
ax1.set_xlabel('Actual')
ax1.set_ylabel('Predicted')
ax1.plot([0,1], [0,1], color='black', linewidth=0.5)
ax1.scatter(data[col_name], data.cf_trace, alpha=0.5, s=0.2)
ax1.set_xlabel('Predicted')
ax1.set_ylabel('Actual')
ax1.set_title(f'Hourly capacity factors\nRMSE={rmse_hourly:.3f}')
ax2.plot([0,1], [0,1], color='black')
ax2.scatter(data_daily.cf_trace, data_daily[col_name], alpha=0.8, s=0.8)
ax2.set_xlabel('Actual')
ax2.set_ylabel('Predicted')
ax2.plot([0,1], [0,1], color='black', linewidth=1)
ax2.scatter(data_daily.cf_trace, data_daily[col_name], alpha=0.8, s=2.0)
#ax2.set_xlabel('Actual')
#ax2.set_ylabel('Predicted')
ax2.set_title(f'Daily capacity factors\nRMSE={rmse_daily:.3f}')
cf_trace = np.array(data.cf_trace)
......@@ -110,8 +116,8 @@ def plot_prediction(data, col_name, rmse_hourly, rmse_daily, rmse_dcurve):
cf_predicted = np.array(data[col_name])
cf_predicted[::-1].sort()
duration = np.linspace(0, 100, len(cf_trace))
ax3.plot(duration, cf_trace, color='red')
ax3.plot(duration, cf_predicted, color='orange')
ax3.plot(duration, cf_trace, color='red', linewidth=3)
ax3.plot(duration, cf_predicted, color='orange', linewidth=3)
ax3.legend(['Actual','Predicted'])
ax3.set_xlabel('Duration exceeded (%)')
ax3.set_ylabel('Capacity factor')
......
......@@ -22,6 +22,9 @@ class TestParams(Experiment):
for trace in progressbar.progressbar(traces):
if not (trace.name.startswith('Race Bank')):
continue
data_trace = read_timeseries_csv(trace.data.file)
data_era5 = read_timeseries_csv(trace.farm.era5_wind.data.file)
......
......@@ -184,7 +184,7 @@ def insert():
# TODO: and that the lat/lon/power_curve/height matches the farm_obj
fname = ninja_dir + farm_obj.name + '.csv'
# TODO: first row not being read, wind_speed bad bad
# TODO: first row not being read
data_ninja = pd.read_csv(fname, parse_dates=True, index_col=0)
data_ninja.index.name = 'datetime'
data_ninja = data_ninja[['wind_speed']].rename(columns={'wind_speed': 'wind'})
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment