def json_temp(df_temp):
    """
    Function to return the Json for the temperature related
    charts in the main dashboard

    """
    return (
        df_temp.groupby(["zone"], as_index=True)
        .apply(lambda x: x[["bin", "cnt"]].to_dict("r"))
        .reset_index()
        .rename(columns={0: "Values"})
        .to_json(orient="records")
    )