def METHOD_NAME(
    results_df: pd.DataFrame, groups_df: pd.DataFrame
) -> pd.DataFrame:
    """
    for each project we retrospectively generate the following attributes for a given
    date utilizing the results.
    number_of_results:
        - number of results that have been contributed per day
        - not used in firebase
    cum_number_of_results:
        - sum of daily number of results up to that day
    progress:
        - relative progress per day
        (e.g. overall progress increased by 0.15 on that day)
        - not used in firebase
    cum_progress:
        - absolute progress up to that day
        - refers to the project progress attribute in firebase
    """
    groups_df["required_results"] = (
        groups_df["number_of_tasks"] * groups_df["number_of_users_required"]
    )
    required_results = groups_df["required_results"].sum()
    logger.info(f"calcuated required results: {required_results}")
    results_with_groups_df = results_df.merge(
        groups_df, left_on="group_id", right_on="group_id"
    )
    results_by_group_id_df = results_with_groups_df.groupby(
        ["project_id_x", "group_id", "day"]
    ).agg(
        number_of_tasks=pd.NamedAgg(column="number_of_tasks", aggfunc="min"),
        number_of_users_required=pd.NamedAgg(
            column="number_of_users_required", aggfunc="min"
        ),
        number_of_users=pd.NamedAgg(column="user_id", aggfunc=pd.Series.nunique),
    )
    results_by_group_id_df["number_of_results"] = (
        results_by_group_id_df["number_of_users"]
        * results_by_group_id_df["number_of_tasks"]
    )
    results_by_group_id_df["cum_number_of_users"] = (
        results_by_group_id_df["number_of_users"]
        .groupby(["project_id_x", "group_id"])
        .cumsum()
    )
    results_by_group_id_df["number_of_results_progress"] = results_by_group_id_df.apply(
        lambda row: calc_results_progress(
            row["number_of_users"],
            row["number_of_users_required"],
            row["cum_number_of_users"],
            row["number_of_tasks"],
            row["number_of_results"],
        ),
        axis=1,
    )
    progress_by_date_df = (
        results_by_group_id_df.reset_index()
        .groupby(["day"])
        .agg(
            number_of_results=pd.NamedAgg(column="number_of_results", aggfunc="sum"),
            number_of_results_progress=pd.NamedAgg(
                column="number_of_results_progress", aggfunc="sum"
            ),
        )
    )
    progress_by_date_df["cum_number_of_results"] = progress_by_date_df[
        "number_of_results"
    ].cumsum()
    progress_by_date_df["cum_number_of_results_progress"] = progress_by_date_df[
        "number_of_results_progress"
    ].cumsum()
    progress_by_date_df["progress"] = (
        progress_by_date_df["number_of_results_progress"] / required_results
    )
    progress_by_date_df["cum_progress"] = (
        progress_by_date_df["cum_number_of_results_progress"] / required_results
    )
    logger.info("calculated progress by date")
    return progress_by_date_df