# Path: utility/datafilepath.py
# class DataFilePath:
#     def __init__(self):
#     def getOrderDir_Train(self):  
#     def getOrderDir_Test1(self):  
#     def getTest1Dir(self):
#     def getTest2Dir(self):
#     def getTrainDir(self):
#     def getGapCsv_Train(self):
#     def getGapCsv_Test1(self):
#     def getTestset1Readme(self):
#     def getTestset2Readme(self):
#     def getGapFilename(self):
#     def getGapPredictionFileName(self):
#     def getPrevGapFileName(self):
#     def get_dir_name(self, data_dir):


from order import ExploreOrder
from utility.datafilepath import g_singletonDataFilePath
from visualization import visualizeData
import matplotlib.pyplot as plt
import seaborn as sns
import numpy as np
import math
            ax2.plot([i,i], [0, gaps_mean[i]], 'k-')
            
            
        plt.show()
        return
    def disp_gap_series(self, storeid):
        return
    def disp_gap_by_dateandslot(self, df):
        plt.figure()
        by_date = df.groupby('time_date')
        size = len(by_date)
        col_len = row_len = math.ceil(math.sqrt(size))
        count = 1
        for name, group in by_date:
            ax = plt.subplot(row_len, col_len, count)
            gap_mean = group.groupby('time_id')['gap'].mean()
            ax.scatter(gap_mean.index, gap_mean.values)
            ax.set_title(name)
            count = count + 1
             
#         plt.show()
        return
    def run(self):
#         self.disp_gap_by_dateandslot(self.gap_traindf)
#         self.disp_gap_by_dateandslot(self.gap_testdf)
        
#         self.disp_gap_series(51)
#         self.disp_timeid()
#         self.disp_bydate()
        self.disp_bydistrictid()

# Path: utility/datafilepath.py
# class DataFilePath:
#     def __init__(self):
#     def getOrderDir_Train(self):  
#     def getOrderDir_Test1(self):  
#     def getTest1Dir(self):
#     def getTest2Dir(self):
#     def getTrainDir(self):
#     def getGapCsv_Train(self):
#     def getGapCsv_Test1(self):
#     def getTestset1Readme(self):
#     def getTestset2Readme(self):
#     def getGapFilename(self):
#     def getGapPredictionFileName(self):
#     def getPrevGapFileName(self):
#     def get_dir_name(self, data_dir):


# Path: exploredata/visualize_both.py
from order import ExploreOrder
from utility.datafilepath import g_singletonDataFilePath
from visualization import visualizeData
import matplotlib.pyplot as plt
import seaborn as sns
import numpy as np
import math

            ax2.plot([i,i], [0, gaps_mean[i]], 'k-')
            
            
        plt.show()
        return
    def disp_gap_series(self, storeid):
        return
    def disp_gap_by_dateandslot(self, df):
        plt.figure()
        by_date = df.groupby('time_date')
        size = len(by_date)
        col_len = row_len = math.ceil(math.sqrt(size))
        count = 1
        for name, group in by_date:
            ax = plt.subplot(row_len, col_len, count)
            gap_mean = group.groupby('time_id')['gap'].mean()
            ax.scatter(gap_mean.index, gap_mean.values)
            ax.set_title(name)
            count = count + 1
             
#         plt.show()
        return
    def run(self):
#         self.disp_gap_by_dateandslot(self.gap_traindf)
#         self.disp_gap_by_dateandslot(self.gap_testdf)
        
#         self.disp_gap_series(51)
#         self.disp_timeid()
#         self.disp_bydate()
        self.disp_bydistrictid()

        plt.show()