|
|
@ -6,12 +6,13 @@ from pandas import DataFrame |
|
|
|
from pandas import Grouper |
|
|
|
from matplotlib import pyplot |
|
|
|
|
|
|
|
jobs = sys.argv[1:] |
|
|
|
jobs = [sys.argv[1]] |
|
|
|
prefix = sys.argv[2] |
|
|
|
|
|
|
|
print("Analyzing the jobs: " + str(jobs)) |
|
|
|
print("Plotting the job: " + str(jobs)) |
|
|
|
|
|
|
|
# Plot the timeseries |
|
|
|
def plot(header, row): |
|
|
|
def plot(prefix, header, row): |
|
|
|
x = { h : d for (h, d) in zip(header, row)} |
|
|
|
jobid = x["jobid"] |
|
|
|
del x["jobid"] |
|
|
@ -40,7 +41,7 @@ def plot(header, row): |
|
|
|
ax[i].set_ylabel(l) |
|
|
|
|
|
|
|
pyplot.xlabel("Segment number") |
|
|
|
pyplot.savefig("timeseries" + jobid + ".png") |
|
|
|
pyplot.savefig(prefix + "timeseries" + jobid + ".png") |
|
|
|
|
|
|
|
# Plot first 30 minutes |
|
|
|
|
|
|
@ -49,8 +50,9 @@ def plot(header, row): |
|
|
|
ax[i].set_ylabel(l) |
|
|
|
|
|
|
|
pyplot.xlabel("Segment number") |
|
|
|
pyplot.savefig("timeseries" + jobid + "-30.png") |
|
|
|
pyplot.savefig(prefix + "timeseries" + jobid + "-30.png") |
|
|
|
|
|
|
|
### end plotting function |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -66,4 +68,4 @@ with open('job-io-datasets/datasets/job_codings.csv') as csv_file: |
|
|
|
if not row[0].strip() in jobs: |
|
|
|
continue |
|
|
|
else: |
|
|
|
plot(header, row) |
|
|
|
plot(prefix, header, row) |
|
|
|