-
Notifications
You must be signed in to change notification settings - Fork 1
FR:Home
Bienvenue au wiki CoCoA version française . Il existe aussi la version en anglais
.
Le projet CoCoA (Covid Collaborative Analysis) propose un environnement logiciel Python™ d'accès simplifié et unifié à différentes bases de données concernant le Covid19.
Il s'agit de proposer au plus grand nombre (grand public non spécialiste, élèves du secondaire, étudiantes et étudiants, journalistes scientifiques, mais aussi scientifiques non spécialistes des méthodes informatiques d'accès aux données) un outil simple et pratique d'étude de données : accès aux données brutes, représentation de séries temporelles, de cartes. Il est ensuite aisé d'effectuer des analyses simples mais aussi plus complexes. Les problèmes d'accès aux bases, d'unification des méthodes, de géo-localisation des données sont assurés par CoCoA.
Cet aspect géo-localisation (gestion des noms de pays ou de régions, possibilité de jointures sur des bases avec des description différentes, création de cartes) peut-être utilisé pour d'autres application en dehors des aspects données Covid19.
Le projet CoCoA a vu le jour initialement à partir de la participation en avril 2020 à l'hackathon organisé par UltraHack.org : https://ultrahack.org/covid-19datahack . Retenu en phase final mais non sorti vainqueur, le projet se veut free et opensource . Il continue d'évoluer depuis, son code est public ainsi que les notebook
qui servent d'exemples d'utilisation.
- Tristan Beau - UFR de Physique - Université de Paris - laboratoire LPNHE
- Julien Browaeys - UFR de Physique - Université de Paris - laboratoire MSC
- Olivier Dadoun - CNRS/IN2P3 - laboratoire LPNHE
Le projet CoCoA est sous licence MIT .
Attention, page en cours de rédaction.
Comme nous l'avons vu en introduciton, il s'agit de simplifier l'accès aux bases Covid19 disponibles et obtenir rapidement données, graphiques ou cartes. C'est possible en quelques lignes de code, avec peu voire pas de connaissance de Python™.
Par exemple, après installation de CoCoA :
import cocoa.cocoa as cc
cc.plot(where=['France','Italy'],which='confirmed',what='Cumul')
cc.map(where=['European Union','United kingdom'])
produit d'une part le tracé de la série temporelle du nombre de cas confirmé pour deux pays (France et Italie), ou bien la carte des décès Covid au sein l'UE et du Royaume Uni.
CoCoA est prévu pour fonctionner aussi bien
- localement (installation locale de Python™ via par exemple
Spyder
) - sur des plateformes
Jupyter
fermées ou ouvertes commeGoogle Colab
par exemple - via un
docker
, utilisant par exemplemybinder
.
La documentation complète est disponible au travers du Wiki, en particulier :
Dans Cocoa, si le step0 c'est faire des plots sans réfléchir. Le step2 de faire des trucs avec les dataframes et le step3 aller loin dans le code… le step1 serait de manipuler les arrays. Et là, on ne peut facilement faire de cuts en temps ai-je l'impression. Je me trompe ?
Initial project was submitted to the hackathon https://ultrahack.org/covid-19datahack .
As physicists working at CERN experiments, used to dealing with big data, we wish to share our knowledge in statistics to the greatest number of people for Covid-19 analysis. Data mining and statistics should help people learn about the most important subject of current history. For this purpose we have designed the COvid COlab Analysis project, aka COCOA. COCOA will provide open source online statistical tools with a simple user interface and simple modelization schemes. COCOA is based on the Google Colab infrastructure which supplies a popular Python Notebook framework. This gives the opportunity to have multi-user code editing and huge computing infrastructure (included GPU for future Deep Learning Covid-19 analysis). Moreover an original analysis based on particle physics analysis is under development and should be available soon in COCOA. As physicists working at CERN experiments or data analysts in physics, used to dealing with big data, we wish to share our knowledge in statistics to the greatest number of people for Covid-19 analysis. Data mining and statistics should help people learn about the most important subject of current history. For this purpose we have designed the COvid COlab Analysis projet, aka COCOA.
We provide the backend python package cocoa which is available here at GitHub : https://github.com/tjbtjbtjb/CoCoA
It allows the final user to use as simple methods as we can to get data, analyse and/or plot them. The installation and use of the package can be done directly in a Google Colab notebook as describe bellow
If you're not interested in details, just want an efficient way to get data, that's the section you have to read and test. After one command for the cocoa
installation with the pip
tool, two import
line of python, you just need two other lines of python in your notebook to get your first plot of data.
import cocoa.covid19 as cc
import matplotlib.pyplot as plt
p=cc.Parser()
Plotting is simple.
Data is extracted through p.getStats(...) which takes in several arguments such as Cumul (total amount) or Diff (variation between two consecutive days).
Two example follow, including a semi-logarithmic plot to exhibit exponential growth in the first stages (pre-confinement).
plt.plot(p.getStats(country='France',which='deaths',type='Diff'))
plt.show()
plt.semilogy(p.getStats(country=['France','Italy','Spain'],which='confirmed',type='Cumul'))
plt.show()
The country list is available through a command p.getCountries()
Which dataset are available ?
p.which_data_list
→ ['deaths', 'confirmed', 'recovered']
And finally, the corresponding dates are given by p.getDates()
.
To go further and test the code, have a look on the colab
platform to our demo notebooks (also available in GitHub) :