<jupyter_start><jupyter_text>Research Questions: **1. RQ 1:** Total number of unique name enteries, determined by league?**2. RQ 2:** Who are the top 10 players that topped their respective leagues on average, determined by rank percentage?**3. RQ 3:** What is the distribution of Male and Female Basketball Players determined by their Average Rank Percentage?**4. RQ 4:** What does the distribution of the top 200 player average rank and rank percentage look like for each league ?<jupyter_code>df = project_functions.load_and_process('/Users/Osaze/301/course-project-solo_106/data/raw/data.csv')
df
df.to_csv('/Users/Osaze/301/course-project-solo_106/data/processed/data_processed.csv')
# Analysis

df1 = project_functions.top_ten('/Users/Osaze/301/course-project-solo_106/data/raw/data.csv')
df1
#Analysis

df2 = project_functions.load_and_process_mlb('/Users/Osaze/301/course-project-solo_106/data/raw/data.csv')
df2.head(10)
# Analysis

df3 = project_functions.load_and_process_basketball('/Users/Osaze/301/course-project-solo_106/data/raw/data.csv')
df3
# RQ 1: Number of Player that Topped their respective Fields by league.

plot = sns.countplot(y = 'league', data = df)
plt.title('Number of Unique Name Enteries per League')
plot.set(xlabel = 'Unique Player Count', ylabel = 'League')<jupyter_output><empty_output><jupyter_text>Observations:**Observation 1:** The MLB has the most players that appear on the list of One Hit Wonders. The number exceeded 200.**Observation 2:** The NBA and WMBA had similar number of players on the list. Th number is less than 150**Observation 3:** The NHL has the more than 150 players but less than 200.<jupyter_code># RQ 4: First 200 Average Rank Percentage Distribution for each League.
C = df.head(200)

plot = sns.boxplot(x = 'rank_percentage', y = 'league', data = C).set_title('Average Rank Percentage by League')
plot = sns.stripplot(x = 'rank_percentage', y = 'league', data = C, color = '.3')
plot<jupyter_output><empty_output><jupyter_text>Observation:**Observation 1:** All leagues have similar avearge rank percetages for the first 200 players.**Observation 2:****Observation 3:**<jupyter_code># RQ 4: First 200 Average Rank Distribution for each League.
A = df.head(200)

plot = sns.boxplot(x = 'rank', y = 'league', data = A).set_title('Average Rank by League')
plot = sns.stripplot(x = 'rank', y = 'league', data = A, color = '.3')
plot<jupyter_output><empty_output><jupyter_text>Observation:**Observation 1:** The WNBA players that appear in the first 200 players have the smallest average rank percentages. Betwwen 0 and 25.**Observation 2:** The NBA players that appear in the first 200 players have the second mallest average rank percentages. Between 0 and 75.**Observation 3:** The average rank percentages fof MLB and NHL players appearing in the first 200 player are between 0 and 175, and 0 and 125 respecively<jupyter_code># RQ 3: Distribution of Male and Female Basketball Players by Average Rank Percentage.

M = df3[df3['league'] == 'nba']
F = df3[df3['league'] == 'wnba']

A = M['rank_percentage']
B = F['rank_percentage']

plot1 = sns.kdeplot(A, shade = True, label = 'nba', color = 'pink', alpha = 0.4)
plot2 = sns.kdeplot(B, shade = True, label = 'wnba',color = 'royalblue', alpha = 0.4)<jupyter_output><empty_output><jupyter_text>Observation:**Observation 1:** The male basketball players have an average rank percentage between 0 and 40. More dense batweem 15 and 20.**Observation 2:** The female basketball player have an average rank percentage between 0 and 80. More dense between 15 and 40.**Observation 3:**<jupyter_code># RQ 3: Top 10 One Hit Wonders

plot = sns.barplot(x = 'rank_percentage', y = 'name', data = df1, hue = 'sport_name').set_title('Top 10 One Hit Wonders')
plot<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11659192825112108, 'fraction_numerical': 0.039303613822210495, 'mean_word_length': 5.504288164665523, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, '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': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '442455', 'license': 'MIT', 'n_tokens_mistral': 1324, 'n_tokens_neox': 1163, 'n_words': 424, 'path': 'analysis/milestone2.ipynb', 'repo_name': 'data301-2020-winter1/course-project-solo_106', 'size': '3791'}