Package: see19
see19An aggregation dataset and interface for visualizing
and analyzing Coronavirus Disease 2019 aka COVID19
aka C19Dataset Last Updated June 12, 2020May 31, 2020 UpdateUpgrade to version 0.3 is complete. Please exercisecautionif switching to this version as there have been a number of significant changes / additions that might impact your prior work.SUMMARY OF UPDATES1. Testset GraduationTest countsandApple mobilitydata have been moved into the main dataset.Reporting on testing continues to be inconsistent around the world. Many countries have only just begun reporting and many report on an infrequent basis (weekly or worse). Where there are gaps in daily figures, non-linear interpolation is used to smooth figures. Several key regions including Brazil and France have very minimal data at all.2. Added filter functionalityWhen instanting aCaseStudyinstance:You can now pass any ofregion_id,region_code, orregion_nametoregions/exclude_regionsin a single iterable.region_codecolumn has been added, and is either simply a replica ofcountry_codeor the accepted abbreviation of the province or state. i.e.Alberta'sregion_codeisAB.country_codeandcountry_idnow also acceptable incountries/exclude_countriespandas Series and numpy arrays are now acceptable iterables for these filters as well.3. MiscellaneousTo access the testset viaget_baseframe, settest=TrueAdded progress bar forget_baseframe()(a couple hours I won't ever get back)Additional styling attributes to most chart make() functionsAdded exception to catch when acountry_w_subis provided as region whencountry_level=FalsewhenUSAis filter viacountries, see19 now automatically excludes the country of Georgia. This was a major personal irritant of mine, but if you have the need you can simply include Georgia incountriesas well.Latest AnalysisHow Effective Is Social Distancing?What Factors Are Correlated With COVID19 Fatality Rates?The COVID DragonsThe DatasetThe dataset is incsvformat and can be foundhereYou can find relevant statistics and detailed sourcing in theGuideThe Packagethesee19package is available onpypiand can be installed as follows:pip install see19The package provides a helpfulpandas-based interface for working with the dataset. It also provides several visualization toolsThe GuideTheGuidedetails data sources, structure, functionality, and visualization tools.Purpose"It is better to be vaguely right than exactly wrong."- Carveth Read, Logic, Chapter 22see19is an early stage attempt to aggregate various data sources and analyze their impact (together and in isolation) on the virulence of SARS-CoV2.Ease-of-use is paramount, thus, all data from all sources have been compiled into a single structure, readily consumed and manipulated in the ubiquitouscsvformat.see19aggregates the following data:COVID19 Data Characteristics:Cumulative Case, Fatality, and Testing statistics for each region on each dateState / Provincial-level data available forFactor Data Characteristics available for most regions include:Longitude / Latitude, Population, Demographic Segmentation, DensityClimate Characteristics including temperatue and uvb radiationHistorical Health OutcomesTravel PopularitySocial Distancing ImplementationAnd more and counting ...There is no single all-encompassing data from an undoubted source that will serve the needs of every user for every use case. Thus, the dataset as it stands is an ad-hoc aggregation from multiple sources witheyeball-style approximations used in some instances. But while the dataset's imperfections are numerous, they cannot blunt the power of the insights that can be gleaned from an early exploratory analysis.In addition to the dataset,see19is a python package that provides:Helpfulpandas-based interface for manipulating the dataVisualization tools inbokehandmatplotlibto compare factors across multiple dimensions ..Statistical analysis is also a goal of the project and I expect to add such analysis tools as time progresses. Until then, the data is available for all.Suggestions For Additional DataI am always on the hunt for new additions to the dataset. If you have any suggestions, please contact me. Specifically, if you are aware of any datasets that might integrate nicely withsee19in the following realms:German daily, state-level countsRussian daily, state-level countsIndia daily, sate-level countsState or city level travel dataGlobal Commercial Airline route data (there seems to be plenty available, except only for a whopping price)Quick DemoYou can very quickly use see19 to develop visuals for COVID19 analysis and presentation.Thesee19package can be installed viapip.pip install see19Then simply:# Required to use Bokeh with Jupyter notebooksfrombokeh.ioimportoutput_notebook,showoutput_notebook()Loading BokehJS ...fromsee19importget_baseframe,CaseStudybaseframe=get_baseframe()regions=['Germany','Spain']casestudy=CaseStudy(baseframe,regions=regions,count_categories='deaths_new_dma_per_1M')label_offsets={'Germany':{'x_offset':8,'y_offset':8},'Spain':{'x_offset':5,'y_offset':5}}p=casestudy.comp_chart.make(comp_type='multiline',label_offsets=label_offsets,width=750)show(p)%matplotlibinlineregions=list(baseframe[baseframe['country']=='Brazil']\.sort_values(by='population',ascending=False)\.region_name.unique())[:20]casestudy=CaseStudy(baseframe,count_dma=5,factors=['temp'],regions=regions,start_hurdle=10,start_factor='cases',lognat=True,)kwargs={'color_factor':'temp','fs_xticks':16,'fs_yticks':12,'fs_zticks':12,'fs_xlabel':12,'fs_ylabel':18,'fs_zlabel':18,'title':'Daily Deaths in Brazil as of May 2','x_title':0.499,'y_title':0.738,'fs_title':22,'rot_title':-9.5,'x_colorbar':0.09,'y_colorbar':.225,'h_colorbar':20,'w_colorbar':.01,'a_colorbar':'vertical','cb_labelpad':-57,'tight':True,'abbreviate':'first','comp_size':10,}p=casestudy.comp_chart4d.make(comp_category='deaths_new_dma_per_1M',**kwargs)