Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
emmahodcroft committed Mar 17, 2021
1 parent 40addcd commit 56ce15e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def non_zero_counts(cluster_data, total_data, country, smoothing=None):
for x in cluster_and_total[data_range].index ]
#plt.plot(weeks.index[with_data_inrange], weeks.loc[with_data_inrange].iloc[:,0]/(total[with_data_inrange]), 'o', color=palette[i], label=coun, linestyle=sty)
if len(week_as_date) <= len(smoothing) and smooth:
chop = -(len(week_as_date) - len(smoothing))//2
chop = -(len(week_as_date) - len(smoothing) - 1)//2
smoothing = smoothing[chop:-chop]
mode = 'same' #RICHARD
cluster_count = np.convolve(cluster_and_total[data_range].iloc[:,0], smoothing, mode=mode)#'same')
Expand Down

0 comments on commit 56ce15e

Please sign in to comment.