Commit d9f48542 authored by Gbodjo Yawogan Jean Eudes's avatar Gbodjo Yawogan Jean Eudes
Browse files

minor changes in interpolation process

parent 6ffa2c96
......@@ -7,7 +7,7 @@ import seaborn as sns
import matplotlib.pyplot as plt
sns.set()
def smooth_plot (csv,lstBands):
def interpolate_ts (csv,lstBands):
ptrn = os.path.basename(csv)
year = ptrn.split('_')[1]
......@@ -41,6 +41,7 @@ def smooth_plot (csv,lstBands):
dic.setdefault('feat_index',[]).append(index)
if band == lstBands[0] :
dic.setdefault('ID',[]).append(row['ID'])
dic.setdefault('Projet',[]).append(row['Projet'])
dic.setdefault('Biom_f',[]).append(row['Biom_f'])
dic.setdefault('Biom_s',[]).append(row['Biom_s'])
dic.setdefault('Rdt_f',[]).append(row['Rdt_f'])
......@@ -51,6 +52,7 @@ def smooth_plot (csv,lstBands):
ggplot_dic.setdefault('Date',[]).append(idx.strftime("%Y-%m-%d"))
ggplot_dic.setdefault('Band',[]).append(band)
ggplot_dic.setdefault('Plot',[]).append(row['ID'])
ggplot_dic.setdefault('Projet',[]).append(row['Projet'])
# ggplot_dic.setdefault('Crop',[]).append(row['Crop'])
ggplot_dic.setdefault('Sowing',[]).append(row['Sowing'])
ggplot_dic.setdefault('Harvest',[]).append(row['Harvest'])
......@@ -74,19 +76,31 @@ def smooth_plot (csv,lstBands):
if __name__=='__main__':
csv = "./stats/niakhar_2017_opt_gapf_notree.csv"
smooth_plot(csv,["B2","B3","B4","B8","B5","B6","B7","B8A","B11","B12","NDVI","NDWI","EVI","MSAVI2","GDVI","CIGreen","CIRedEdge"])
interpolate_ts(csv,["B2","B3","B4","B8","B5","B6","B7","B8A","B11","B12","NDVI","NDWI","EVI","MSAVI2","GDVI","CIGreen","CIRedEdge"])
csv = "./stats/niakhar_2017_radar_notree.csv"
smooth_plot(csv,["VH","VV"])
interpolate_ts(csv,["VH","VV"])
csv = "./stats/niakhar_2018_opt_gapf_notree.csv"
smooth_plot(csv,["B2","B3","B4","B8","B5","B6","B7","B8A","B11","B12","NDVI","NDWI","EVI","MSAVI2","GDVI","CIGreen","CIRedEdge"])
interpolate_ts(csv,["B2","B3","B4","B8","B5","B6","B7","B8A","B11","B12","NDVI","NDWI","EVI","MSAVI2","GDVI","CIGreen","CIRedEdge"])
csv = "./stats/niakhar_2018_radar_notree.csv"
smooth_plot(csv,["VH","VV"])
interpolate_ts(csv,["VH","VV"])
csv = "./stats/niakhar-serena_2018_opt_gapf_notree.csv"
interpolate_ts(csv,["B2","B3","B4","B8","B5","B6","B7","B8A","B11","B12","NDVI","NDWI","EVI","MSAVI2","GDVI","CIGreen","CIRedEdge"])
csv = "./stats/niakhar-serena_2018_radar_notree.csv"
interpolate_ts(csv,["VH","VV"])
csv = "./stats/niakhar-simco_2018_opt_gapf_notree.csv"
interpolate_ts(csv,["B2","B3","B4","B8","B5","B6","B7","B8A","B11","B12","NDVI","NDWI","EVI","MSAVI2","GDVI","CIGreen","CIRedEdge"])
csv = "./stats/niakhar-simco_2018_radar_notree.csv"
interpolate_ts(csv,["VH","VV"])
csv = "./stats/nioro_2018_opt_gapf_notree.csv"
smooth_plot(csv,["B2","B3","B4","B8","B5","B6","B7","B8A","B11","B12","NDVI","NDWI","EVI","MSAVI2","GDVI","CIGreen","CIRedEdge"])
interpolate_ts(csv,["B2","B3","B4","B8","B5","B6","B7","B8A","B11","B12","NDVI","NDWI","EVI","MSAVI2","GDVI","CIGreen","CIRedEdge"])
csv = "./stats/nioro_2018_radar_notree.csv"
smooth_plot(csv,["VH","VV"])
\ No newline at end of file
interpolate_ts(csv,["VH","VV"])
\ No newline at end of file
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