Closed setaur closed 4 years ago
@setaur: Thanks for reporting; I'm aware of the issue and have a fix. The Mainland China KeyErorr is due to a change in the format of the raw data reported by Johns Hopkins. Fix will be pushed shortly :)
As for the other issue you were having, you're correct that it's a Python version thing.
Fixed in the latest commit. Although there are currently some data quality issues in the data repo.
I'm trying to run your code, so I can later modify countries list and plot more of that great charts. I know only some basics of python. I converted that ipynb file to py:
jupyter-nbconvert --to python COVID-19.ipynb
I got COVID-19.py file, which I run, but got error:File "./COVID-19.py", line 48 plt.gca().get_yaxis().set_major_formatter(matplotlib.ticker.FuncFormatter(lambda x, p: f"{x:,.0f}")) ^ SyntaxError: invalid syntax
I tried changing shebang from #!/usr/bin/env python to #!/usr/bin/env python3, then I got:
I'm out of ideas. Here is full converted script: https://pastebin.com/raw/HrcgUtqZ