in osci/postprocess/osci_change_report/process.py [0:0]
def generate_growth_speed_report(date: datetime):
"""Generate growth speed report"""
previous_date = get_prev_day(date)
ranking = OSCIChangeRanking(date=date)
ranking_df = ranking.read().reset_index()
old_ranking = OSCIChangeRanking(date=previous_date)
old_ranking_df = old_ranking.read()
report = OSCIGrowthSpeed(date=date)
change_report = get_osci_ranking_change_report(old_report=old_ranking_df,
new_report=ranking_df,
company_field=ranking.schema.company,
active_contributors_field=ranking.schema.active_change,
active_contributors_change_field=report.schema.active_growth,
total_community_field=ranking.schema.total_change,
total_community_change_field=report.schema.total_growth,
rank_field=ranking.schema.position_change,
rank_change_field=report.schema.position_growth)
report.save(df=change_report)