Created
June 13, 2019 21:13
-
-
Save dhinojosa/f93e7adb2a711b87d42fea8dc7ccdebc to your computer and use it in GitHub Desktop.
BarChart.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
raw = merged.sort_values('Count', ascending=False)[:10] | |
xticks = np.arange(10) | |
fig, (ax1, ax2) = plt.subplots(nrows=1, ncols=2, sharex=False, sharey=False) | |
ax1.bar(xticks, raw['Count']) | |
ax1.set_title('Complaints by States\n(raw)') | |
ax1.set_xticks(xticks) | |
ax1.set_xticklabels(raw['State']) | |
ax2.bar(xticks, normalized['population_normalized']) | |
ax2.set_title('Complaints by States\n(normalized for population)') | |
ax2.set_xticks(xticks) | |
ax2.set_xticklabels(normalized['State']) | |
plt.show(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment