<jupyter_start><jupyter_text>Plotting correlation between columnsuse this file to plot correlation between columns, taking the original imdb dataset as data since this one has the most movies in it.<jupyter_code># import neccessary stuff 
#run this from the datascience-films folder
import matplotlib.pyplot as plt
import pandas as pd 
import numpy as np
from pathlib import Path
import seaborn as sns 

# ignore some warnings, not pressing to fix these issues, more annoying to show these
from pandas.core.common import SettingWithCopyWarning
import warnings
warnings.simplefilter(action="ignore", category=SettingWithCopyWarning)

RESOURCE_PATH = Path('../cleaned_data')
# import the data
df= pd.read_csv(RESOURCE_PATH / 'final_data_movies.csv',sep=',')
df = df[df['years_after_event'].notna()]
df = df[df['numVotes'].notna()]
df = df[df['numVotes'] < 10000]
#extract historical_event, and target data, in this case the movie release year/years_after_event and the average rating
df['years_after_event'] = df.years_after_event.dropna()
#lastly pop our target we want
df['target'] = list(zip(df.years_after_event, df.averageRating))
target = df[['years_after_event','averageRating']]
target.averageRating =  target.averageRating.fillna(1)
numeric_feature_names = ['numVotes','averageRating']
numeric_features = df[numeric_feature_names]
numeric_features['numVotes'] = numeric_features['numVotes'].fillna(0)
numeric_features['numVotes'] = numeric_features['numVotes'].astype(np.int64)
numeric_features = numeric_features.dropna()<jupyter_output><empty_output><jupyter_text>Visualizing corrolation between the movie release year/ years after event  and the average rating/ number of votesUses a pairplot to plot the correlation between de features<jupyter_code>sns.pairplot(df[['movie_release_year', 'years_after_event', 'averageRating', 'numVotes']], diag_kind='kde')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10173958882445967, 'fraction_numerical': 0.004744333157617291, 'mean_word_length': 7.787037037037037, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 9, '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': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '628384', 'license': 'MIT', 'n_tokens_mistral': 604, 'n_tokens_neox': 571, 'n_words': 163, 'path': 'models/plots.ipynb', 'repo_name': 'HermanHeringa/datascience-films', 'size': '1897'}