In [14]:
%matplotlib inline

import glob
import json
import matplotlib.pyplot as plt
from matplotlib import gridspec
import numpy as np
import pandas as pd
import seaborn as sns
import pylab


pylab.rcParams['figure.figsize'] = (12.0, 10.0)
pylab.rcParams.update({'font.size': 18})

In [2]:
files = glob.glob('JRC/*.csv')

In [3]:
path = 'JRC/water_area_000000000000015.csv'

In [26]:
df = pd.read_csv(path)

df.plot('time', 'water_area', style='b.-')


Out[26]:
<matplotlib.axes._subplots.AxesSubplot at 0x18cdfa263c8>

In [ ]:
for f in files:
    s = file(f).read()
    j = json.loads(s)

    threshold = float(j['threshold_original'])

    if threshold <= -0.4:
        continue

    #print(j)

    if not 'histogram' in j:
        continue

    thresholds.append(threshold)

    y = j['histogram']
    x = j['bucketMeans']

    plt.step(x, y, color='b', alpha=0.01, lw=10)
    # plt.step(x, y)

# plt.axvline(x=float(th), color='r', alpha=0.2)

plt.axvline(x=0, color='k')

plt.xlim(-1, 1)
plt.ylim(0, 500)