<jupyter_start><jupyter_text>数据<jupyter_code>def get_origin_data():
    """
    origin data
    """
    # raw data
    eturb_m1_data = pd.read_csv("e:/dev/data-analysis/hp_steam_data/data/eturb_m1_1min_metrics-0817.csv", header = 0, index_col = None)
    eturb_m2_data = pd.read_csv("e:/dev/data-analysis/hp_steam_data/data/eturb_m2_1min_metrics-0817.csv", header = 0, index_col = None)
    boiler_m1_data = pd.read_csv("e:/dev/data-analysis/hp_steam_data/data/boiler_m1_1min_outlet_steam_flow.csv", header = 0, index_col = None)
    boiler_m3_data = pd.read_csv("e:/dev/data-analysis/hp_steam_data/data/boiler_m3_1min_outlet_steam_flow.csv", header = 0, index_col = None)
    steampipeline_p1_data = pd.read_csv("e:/dev/data-analysis/hp_steam_data/data/steampipeline_p1_1min_hp_steam_pressure.csv", header = 0, index_col = None)
    # data aggregate
    df = pd.DataFrame()
    # eturb_m1
    df["ts"] = pd.to_datetime(eturb_m1_data["ts"])
    df["eturb_m1_steam_flow_in"] = eturb_m1_data["ExtCondensTurbineOP.steam_flow_in"]
    df["eturb_m2_steam_flow_in"] = eturb_m2_data["ExtCondensTurbineOP.steam_flow_in"]
    df["boiler_m1_outlet_steam_flow"] = boiler_m1_data["CFBoilerOP.outlet_steam_flow"]
    df["boiler_m3_outlet_steam_flow"] = boiler_m3_data["CFBoilerOP.outlet_steam_flow"]
    df["steampipeline_p1_hp_steam_pressure"] = steampipeline_p1_data["SteamPipelineOP.hp_steam_pressure"]
    df["boiler_steam_flow"] = df["boiler_m1_outlet_steam_flow"] + df["boiler_m3_outlet_steam_flow"]
    df["turbine_steam_flow"] = df["eturb_m1_steam_flow_in"] + df["eturb_m2_steam_flow_in"]
    df["steam_delta_boiler_turbine"] = df["turbine_steam_flow"] - df["boiler_steam_flow"]
    df = df.reset_index(drop = True)
    df.sort_values("ts", inplace = True)
    
    return df

df = get_origin_data()
df.head()<jupyter_output><empty_output><jupyter_text>散点图 API<jupyter_code>def scatter_plot(df, xlabel, *ylabels, imgpath = None):
    fig, axs = plt.subplots(figsize = (10, 7), sharey = True, tight_layout = True)
    for ylabel in ylabels:
        plt.scatter(df[xlabel], df[ylabel], label = ylabel)
    plt.title("%s VS %s" % (xlabel, ylabel))
    plt.xlabel("%s" % xlabel)
#     plt.ylabel("%s" % ylabel)
    plt.legend()
    if imgpath:
        plt.savefig(imgpath)
    plt.show()<jupyter_output><empty_output><jupyter_text>1.高压蒸汽压力与高压蒸汽量差值散点图<jupyter_code>scatter_plot(df, "steampipeline_p1_hp_steam_pressure", "steam_delta_boiler_turbine", imgpath = None)
# temp_df = df.loc[df["steampipeline_p1_hp_steam_pressure"] <= 3.1]
# scatter_plot(temp_df, "steampipeline_p1_hp_steam_pressure", "steam_delta_boiler_turbine", imgpath = None)
# temp_df = df.loc[df["steampipeline_p1_hp_steam_pressure"] >= 3.0]
# scatter_plot(temp_df, "steampipeline_p1_hp_steam_pressure", "steam_delta_boiler_turbine", imgpath = None)<jupyter_output><empty_output><jupyter_text>2.高压蒸汽压力与锅炉、汽机蒸汽流量散点图<jupyter_code>scatter_plot(df, "steampipeline_p1_hp_steam_pressure", "boiler_steam_flow", "turbine_steam_flow", imgpath = None)
temp_df = df.loc[df["steampipeline_p1_hp_steam_pressure"] <= 3.1]
scatter_plot(temp_df, "steampipeline_p1_hp_steam_pressure", "boiler_steam_flow", "turbine_steam_flow", imgpath = None)
temp_df = df.loc[df["steampipeline_p1_hp_steam_pressure"] >= 3.0]
scatter_plot(temp_df, "steampipeline_p1_hp_steam_pressure", "boiler_steam_flow", "turbine_steam_flow", imgpath = None)
scatter_plot(df, "steampipeline_p1_hp_steam_pressure", "turbine_steam_flow", imgpath = None)
scatter_plot(df, "steampipeline_p1_hp_steam_pressure", "boiler_steam_flow", imgpath = None)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13169642857142858, 'fraction_numerical': 0.019252232142857144, 'mean_word_length': 6.9490022172949, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '112378', 'license': 'MIT', 'n_tokens_mistral': 1598, 'n_tokens_neox': 1560, 'n_words': 163, 'path': 'hp_steam_data/src/hp_steam_data.ipynb', 'repo_name': 'wangzhefeng/data-analysis', 'size': '3584'}