<jupyter_start><jupyter_text>Takes the urls from cleaned data files to grab ratings from Mountain Project<jupyter_code>import pandas as pd
from functions.data import get_ratings_from_mp
save=True<jupyter_output><empty_output><jupyter_text>Set Params<jupyter_code>data_dir = "data"

files = ["buttermilks.csv",
         "druid_stones.csv",
         "happy_boulders.csv",
         "sad_boulders.csv",
         "joshua_tree.csv",]<jupyter_output><empty_output><jupyter_text>Get Data<jupyter_code>for file in files:
    filename = file.split(".")[0]
    df = pd.read_csv(f"{data_dir}/{filename}.csv")
    df = get_ratings_from_mp(df)
    if save:
        df[["url_id", "star_ratings", "suggested_ratings", "on_to_do_lists", "ticks"]].to_csv(
            f"{data_dir}/{filename}-ratings.csv", index=None
        )<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13365155131264916, 'fraction_numerical': 0.0011933174224343676, 'mean_word_length': 4.593333333333334, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '419135', 'license': 'MIT', 'n_tokens_mistral': 321, 'n_tokens_neox': 316, 'n_words': 49, 'path': 'get-ratings-from-mp.ipynb', 'repo_name': 'harrisonized/predicting-popularity-of-rock-climbs-regression', 'size': '838'}