google-trends-daily
google-trends-daily copied to clipboard
Renormalize in forward direction?
Great work! I noticed that you are doing the renormalize in backward direction, say, from most recent date back.
Is that possible to do renormalization in forward direction so that we could extend the trend data in live? Like we could update the trend data day by day and regard "today's" data as the unit?
I did a little experiment but the data exploded. So I wonder if you found a better way to do that?
Could you share your code where the data exploded ?
My first intuition would be to change this part:
y1 = temp.loc[overlap_start:end_d].iloc[:,0].values.max()
y2 = df.loc[overlap_start:end_d].iloc[:,-1].values.max()
coef = y2/y1
temp = temp * coef
into
y1 = temp.loc[overlap_start:end_d].iloc[:,0].values.max()
y2 = df.loc[overlap_start:end_d].iloc[:,-1].values.max()
coef = y1/y2
df = df * coef
But we might need some real examples to test and experiment....