-
-
Save tonyfast/24c3ba82a1863ffe127b74f6b3b75dbe to your computer and use it in GitHub Desktop.
Revisions
-
michaelaye created this gist
May 13, 2020 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,24 @@ def plot_loglog(self, country, freq="2d"): newdf = self.get_country(country) return ( newdf.resample(freq) .mean() .hvplot.scatter( x="Infections", y="Rate", logy=True, logx=True, ylim=(1, None), xlim=(1, None), label=country, ) ) def plot_loglog_countries(self, countries): if len(countries) == 1: return self.plot_loglog(countries[0]) else: return self.plot_loglog(countries[0]) * self.plot_loglog_countries( countries[1:] )