You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@shansen5 One thing I just noticed in the Cross-Program notebook. An error I probably made!
For the charts, we currently do this:
d = program_data.groupby(pd.to_datetime(program_data[program.date_field], format=program.date_format))[[program.date_field]].count() #counting inspections, enforcements, etc. that happened on each date.
d = d.resample("Y").count() # and then we should SUM the count for the entire year. Otherwise we are counting the number of days on which inspections, enforcements, etc. happened.
d.index = d.index.strftime('%Y')
ax = d.plot(kind='bar', title = chart_title, figsize=(20, 10), legend=False, fontsize=16)
ax
But I think d = d.resample("Y").count() should be d = d.resample("Y").sum() We want to sum the number of inspections, enforcements, violations that occurred within the year.
@shansen5 One thing I just noticed in the Cross-Program notebook. An error I probably made!
For the charts, we currently do this:
But I think
d = d.resample("Y").count()
should bed = d.resample("Y").sum()
We want to sum the number of inspections, enforcements, violations that occurred within the year.Originally posted by @ericnost in #25 (comment)
The text was updated successfully, but these errors were encountered: