Created
October 13, 2019 20:07
-
-
Save brockmanmatt/c4b7adff99faca390777154e48b2ddce to your computer and use it in GitHub Desktop.
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
myCountries = ["dprk", "ukraine", "russia", "iran", "china"] | |
fig, axs = plt.subplots(1,5, sharey=True, gridspec_kw={'wspace': 0}) | |
fig.set_facecolor("white") | |
fig.set_size_inches(24,6) | |
idx = 0 | |
for country in myCountries: | |
tmp = time_series[[x for x in time_series.columns if (x.find(country) > -1) ]] | |
tmp.rename(columns={country:(country+" search")}).plot(style=[":" if not x.startswith(country) else "-" for x in tmp], title="{}".format(country), ylim=(0, 100), ax=axs[idx]) | |
idx+=1 | |
axs[0].set_ylabel("Articles/Day or % Greatest Search in Selection/Day") | |
fig.suptitle("Google Search and News Coverage on Countries\n(Search as percent of greatest amount of search for any country)", y=1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment