<jupyter_start><jupyter_text>_Lambda School Data Science_ Choose appropriate visualizationsRecreate this [example by FiveThirtyEight:](https://fivethirtyeight.com/features/al-gores-new-movie-exposes-the-big-flaw-in-online-movie-ratings/)![](https://fivethirtyeight.com/wp-content/uploads/2017/09/mehtahickey-inconvenient-0830-1.png?w=575)Using this data:https://github.com/fivethirtyeight/data/tree/master/inconvenient-sequel Stretch goalsRecreate more examples from [FiveThityEight's shared data repository](https://data.fivethirtyeight.com/).For example:- [thanksgiving-2015](https://fivethirtyeight.com/features/heres-what-your-part-of-america-eats-on-thanksgiving/) ([`altair`](https://altair-viz.github.io/gallery/index.htmlmaps))- [candy-power-ranking](https://fivethirtyeight.com/features/the-ultimate-halloween-candy-power-ranking/) ([`statsmodels`](https://www.statsmodels.org/stable/index.html))<jupyter_code>%matplotlib inline

import pandas as pd
import matplotlib.pyplot as plt
import numpy as np

df = pd.read_csv('https://raw.githubusercontent.com/fivethirtyeight/data/master/inconvenient-sequel/ratings.csv')
df.head()

df.tail(1).T
df.timestamp.describe()
df.timestamp = pd.to_datetime(df.timestamp)
df.timestamp.describe()
df.set_index('timestamp',inplace=True)
df.head()
df.category.value_counts()
df.link.value_counts()
df[df.category =='IMDb users']
lastday = df['2017-08-29']
lastday[lastday.category=='IMDb users'].respondents.plot();
final_entry = df.tail(1)
columns = ['1_pct','2_pct','3_pct','4_pct','5_pct','6_pct','7_pct','8_pct','9_pct','10_pct']
final_entry[columns]
final_entry[columns].T
data = final_entry[columns].T
data.plot.bar()
plt.style.use('fivethirtyeight')

ax = data.plot.bar(color='#EC713B',width= 0.9)


plt.style.use('fivethirtyeight')

ax = data.plot.bar(color='#EC713B',width= 0.9, legend=False)

ax.set(xlabel= 'Rating',
      ylabel= 'Percent of Total Votes',
      yticks= range(0,50,10));
ax.text(x=-2,y=48, s="'An Inconvenient Sequel: Truth to Power' is divisive",
       fontsize=16, fontweight='bold')
ax.text(x=-2,y=45, s='IMDb Ratings for the film as of Aug. 29')
ax.tick_params(labelrotation=0)
data.index = range(1,11)
plt.style.available
plt.style.use(['fivethirtyeight','seaborn-white'])

ax = data.plot.bar(color='#EC713B',width= 0.9, legend=False)

ax.set(xlabel= 'Rating',
      ylabel= 'Percent of total votes',
      yticks= range(0,50,10),
      facecolor= 'w');
ax.text(x=-2,y=48, s="'An Inconvenient Sequel: Truth to Power' is divisive",
       fontsize=16, fontweight='bold')
ax.text(x=-2,y=45, s='IMDb Ratings for the film as of Aug. 29')
plt.grid(color='grey', linestyle='-', linewidth=0.5)
ax.spines['bottom'].set_color('w')
ax.spines['top'].set_color('w') 
ax.spines['right'].set_color('w')
ax.spines['left'].set_color('w')

ax.tick_params(labelrotation=0)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.18181818181818182, 'fraction_numerical': 0.031818181818181815, 'mean_word_length': 6.224747474747475, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 9, 'lorem ipsum': 0, 'www.': 1, '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': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '235013', 'license': 'MIT', 'n_tokens_mistral': 1157, 'n_tokens_neox': 1081, 'n_words': 156, 'path': 'module3-make-explanatory-visualizations/LS_DS_123_Make_explanatory_visualizations.ipynb', 'repo_name': 'chrisseiler96/DS-Sprint-02-Storytelling-With-Data', 'size': '2860'}