<jupyter_start><jupyter_text>Check Corona Vaccinations * [this Notebook](https://github.com/salgo60/open-data-examples/blob/master/Check%20Corona%20Vaccination.ipynb) * read the data on [github.com/owid/covid-19-data...vaccinations/country_data](https://github.com/owid/covid-19-data/tree/master/public/data/vaccinations/country_data)  * Data is reported cummulated for United Kingdom but also subnational data England, Scotland, Northern Ireland, Wales see [issue 228](https://github.com/owid/covid-19-data/issues/228)     * although subnational data have been published quite irregularly so far ==> we filter them out<jupyter_code>from datetime import datetime
start_time  = datetime.now()
print("Last run: ", start_time)
import pandas as pd
GITHUB_directory = "https://api.github.com/repos/owid/covid-19-data/contents/public/data/vaccinations/country_data"  
countries = pd.read_json(GITHUB_directory)  
listcountries = []
for index,row in countries.iterrows():
    df = pd.read_csv(row["download_url"])
    listcountries.append(df)
    
allCountries = pd.concat(listcountries, axis=0, ignore_index=True)    
# Show 15 latest sorted by dates
allCountries.sort_values(by=['date'],ascending=False)[0:15]
allCountries['date'] = allCountries['date'].astype('datetime64[ns]')   

# Filter away Wales , England, Scotland see above and [issue 228](https://github.com/owid/covid-19-data/issues/228)
list_of_countries_to_delete = ["England","Northern Ireland","Scotland","Wales"]

allCountriesFiltered = allCountries[~allCountries["location"].isin(list_of_countries_to_delete)]
allCountriesFiltered.info()


#Countries
%matplotlib inline    
import matplotlib.pyplot as plt   

#Reported numbers are accumulated --> get latest
plotCountries = allCountriesFiltered.sort_values(by=['date'],ascending=False) \
    [['total_vaccinations','location','vaccine']].groupby('location').apply(lambda x: x.head(1))
plotCountries = plotCountries.set_index('location')
plotCountries["total_vaccinations"].plot( y='location',kind = 'pie') 
plt.title("Vaccination per countries - " + start_time.strftime('%Y %m %d'))
plt.savefig('Corona_VaccinationperCountry.png')  
plt.show() 

plotCountries
plotCountries.sum()
# Vaccine numbers
plotVaccine = plotCountries.groupby('vaccine')['total_vaccinations'].sum()
plotVaccine.plot( kind = 'pie') 
plt.title("Vaccination per Vaccine - " + start_time.strftime('%Y %m %d'))
plt.savefig('Corona_VaccinationperVaccine.png')  
plt.show()
plotVaccine.sort_values(ascending=True)
# Sweden have 10 000 doses....
end = datetime.now()
print("Ended: ", end) 
print('Time elapsed (hh:mm:ss.ms) {}'.format(datetime.now() - start_time))<jupyter_output>Ended:  2020-12-25 09:26:02.877931
Time elapsed (hh:mm:ss.ms) 0:00:01.296399<jupyter_text>Whole datasetsee * [COVID-19 Data Processing Pipelines and datasets](https://github.com/covid19-data/covid19-data)<jupyter_code>ourworldindata = "https://covid.ourworldindata.org/data/owid-covid-data.json"
#df_ourworldindata = pd.read_json(ourworldindata) 
#df_ourworldindata.info()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1437438745508004, 'fraction_numerical': 0.025808559294348252, 'mean_word_length': 6.504901960784314, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 10, 'https://': 7, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '517718', 'license': 'MIT', 'n_tokens_mistral': 1122, 'n_tokens_neox': 1037, 'n_words': 176, 'path': '.ipynb_checkpoints/Check Corona Vaccination-checkpoint.ipynb', 'repo_name': 'salgo60/open-data-examples', 'size': '3061'}