<jupyter_start><jupyter_text>Seaborn provides a easy framework to edit matplotlib charts. Pandas pulls in the data. sns.set allows a one set default for the program.<jupyter_code>import seaborn as sns
import matplotlib.pyplot as plt
import pandas as pd

sns.set(style="ticks", context='talk', font_scale=1.1)
%matplotlib inline<jupyter_output><empty_output><jupyter_text>Read the csv file into a panda<jupyter_code>df = pd.read_csv('top10mountain-lions.csv')<jupyter_output><empty_output><jupyter_text>Chart 1 features a whitegrid style to help assign a number to each bar. Despine removes Tufte's chart junk.<jupyter_code>sns.set_style("whitegrid")
sns.barplot(x="count", y="COUNTY", data=df, color="#2ecc71")
sns.despine(bottom=True, left=True)<jupyter_output><empty_output><jupyter_text>Chart 2 features a white chart style. Y label is removed because county label is redudant. Also, X label is more useful. Despine removes Tufte's chart junk.I think this chart is the most effective although I would decrease the scale to every 10. Another weakness is probably a locational aspect to the sightings and that relationship isn't shown in the bar chart.<jupyter_code>sns.set_style("white")
sns.barplot(x="count", y="COUNTY", data=df, color="#f6a14e")
plt.ylabel('')
plt.xlabel('Mountain Lion Sightings')
sns.despine(bottom=True, left=True)<jupyter_output><empty_output><jupyter_text>Chart 3 features a dark grid style. Although the grid helps assign values to the bars, the color is distracting and tends to chart junk<jupyter_code>sns.set_style("darkgrid")
sns.barplot(x="count", y="COUNTY", data=df, color="#7fe5ba")
plt.ylabel('')
plt.xlabel('Mountain Lion Sightings')
sns.despine(bottom=True, left=True)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10765687967760507, 'fraction_numerical': 0.00978698906160046, 'mean_word_length': 7.315789473684211, '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': '9991', 'license': 'MIT', 'n_tokens_mistral': 609, 'n_tokens_neox': 579, 'n_words': 175, 'path': 'ChartHomework/ChartsHomework.ipynb', 'repo_name': 'lexieheinle/jour407homework', 'size': '1737'}