Skip to content
This repository has been archived by the owner on Feb 5, 2019. It is now read-only.

DS-Sprint-02-Work #28

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

axrd
Copy link

@axrd axrd commented Nov 13, 2018

No description provided.

Copy link

@brennerhaverlock brennerhaverlock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work Alejandro -- You have a good understanding of graphing new plots in seaborn and I hope you were able to explore more as it's a great library.

Copy link

@brennerhaverlock brennerhaverlock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sprint Challenge Code Review

Week 2 - Storytelling with Data


Part 0 — Run this starter code


Part 1 — What's the breakdown of guests’ occupations per year?

Code review

What went well:

  • I like your use of the describe method before using crosstab:
<df.Occupation.describe()>
  • Great use of head method to take a look at data before continuing! :
<df.head()>
  • Great use of indexing your head method statement after use of crosstab
<year_occ.head(17)>

What could be better:

  • Instead of indexing the crosstab by 17 you could of just printed your table name instead
<year_occ = pd.crosstab(df.Year, df.Occupation, normalize = 'index')
year_occ>


Part 2 — Recreate this explanatory visualization:

Code review

What went well:

  • Great job on using matplotlib to plot and keeping it simple!
<year_occ.plot()>

What could be better:

  • Before plottting you should of dropped the "Other" column:
<three_occupations = year_occ.drop(columns=['Other'])>
  • Great job on labeling X and Y axes. Try to cluster your years together more.
<plt.text(x=1998, y=1.0, s='Occupation of guests, by year');>


Part 3 — Who were the top 10 guests on The Daily Show?

Code review

What went well:

  • Great job graphing and labeling the X and Y axes!
<top_ten.plot.bar(x = 'Guest', y = 'Appearances');
plt.title('Top 10 Guest Appearances');
plt.ylabel('Number of Apperances (1999-2015)')
plt.ylim(5,20);>

What could be better:

  • In Hindsight you could of done this in one line (two lines including labeling axes)
<df.Guest.value_counts().head(10).plot.bar();>


Additional notes

Code review

If you want to take this further you could:

  • Try graphing part 2 using Seaborn

"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants