<jupyter_start><jupyter_text>Tutorial<jupyter_code>from nCov2019.nCov2019 import Data
import pandas as pd
import matplotlib
%matplotlib notebook
# 解决matplotlib无法正确显示中文字符的问题
import matplotlib
matplotlib.rcParams[u'font.sans-serif'] = ['Heiti TC'] + matplotlib.rcParams[u'font.sans-serif']
data = Data()<jupyter_output><empty_output><jupyter_text>获取全国病例统计<jupyter_code># Get nation-level data of China
data.china<jupyter_output><empty_output><jupyter_text>获取省级病例统计<jupyter_code># Get province-level data
data.province
data.province.loc(axis=0)[:, '累计']
data.province.loc(axis=0)[:, '累计']['确诊'].reset_index(level='累计/新增', drop=True).plot.bar()<jupyter_output><empty_output><jupyter_text>省级以下行政区病例数据<jupyter_code>data.city
data.city.loc(axis=0)[:, :, ['累计']] 
# 全国累计确诊人数最高的30个城市
data_process = data.city.loc(axis=0)[:, :, ['累计']]['确诊'].reset_index(level=['省/直辖市/自治区', '累计/新增'], drop=True)
data_process.sort_values(ascending=False).head(30).plot.bar()
# Slicing data
data.city.loc['湖北', '武汉', :]
# Slicing data
data.city.loc['湖北', :, '累计']
# Slicing data
data.city.loc['湖北', :, '累计']['确诊'].plot.bar()<jupyter_output><empty_output><jupyter_text>获取其他国家或地区病例数据<jupyter_code>data.international
# Slicing data
data.international.loc(axis=0)[:, '累计'].reset_index(level='累计/新增', drop=True)
# Plotting data
data.international.loc(axis=0)[:, '累计']['确诊'].reset_index(level='累计/新增', drop=True).plot.bar()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1918194640338505, 'fraction_numerical': 0.012693935119887164, 'mean_word_length': 9.511111111111111, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '469299', 'license': 'MIT', 'n_tokens_mistral': 664, 'n_tokens_neox': 722, 'n_words': 67, 'path': 'docs/doc/_build/doctrees/nbsphinx/.ipynb_checkpoints/tutorial-checkpoint.ipynb', 'repo_name': 'luxin-tian/nCov2019', 'size': '1418'}