GithubHelp home page GithubHelp logo

rvalla / covid-19 Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 23.76 MB

Some code to analyze international data from COVID-19 Data Repository by Johns Hopkins CSSE and Argentina outbreak status.

Home Page: https://rvalla.github.io/eng/covid19_eng/

License: GNU General Public License v3.0

Python 100.00%
covid-19 python3 plotting data-visualization argentina-data johns-hopkins-csse argentina

covid-19's Introduction

Analysis and plotting of COVID-19 data

This is a very little piece of code in Python to analyze through plots the data in the 2019 Novel Coronavirus COVID-19 (2019-nCoV) Data Repository by Johns Hopkins CSSE by regions. Or the data from National Reports published in Argentina.

Data of the outbreak evolution in Argentina is taken from National Reports and then loaded on a spreadsheet (exported afterwards to a .csv). The structure of the data is similar to that in argcovidapi repository, I updated the data within the week until September 21st adding data about official testing and dropped cases. Note the above-mentioned reports have confirmed and deaths cases separated by province but that is not the case with recovered cases and laboratory tests. So, the UNKNOWN category was added.

If you want to plot worldwide data you need to download the Johns Hopkins repository...

Then you need Python 3 and this packages to use it:

  • matplotlib
  • pandas
  • numpy

With COVID-19_Analysis.py...

You can visualize the data from 2019 Novel Coronavirus COVID-19 (2019-nCoV) Data Repository by Johns Hopkins CSSE. Is possible to:

  • Plot cases' data (confirmed cases, deaths, recovered patients) by date or since n case appearance.
  • Use linear or logarithmic scales.
  • Group data by country or study states/province data.
  • Plot death rate evolution too.

With COVID-19_Ar_ProcessingData.py...

You can load data on Argentina.csv and save information to a group of csv files then used by COVID-19_Ar_Analysis.py to visualize it. The files are stored in Argentina_Data/Processed_data. That files are updated every time I push new data to the repository.

With COVID-19_Ar_Analysis.py...

You can visualize the data from National Reports published in Argentina. Is possible to:

  • Plot cases' data (confirmed cases, deaths, recovered patients).
  • Plot death rate evolution.
  • See outbreak evolution in Argentina in a synthetic chart (that shows confirmed and active cases, deaths, daily trends, laboratory tests and positive tests ratio among others).
  • Plot duplication time evolution (how many days would be need for total cases being duplicated).
  • Plot the confirmed cases distribution by day of the week.

With COVID-19_DataGobAr_TestsAnalysis.py...

You can visualize the laboratory tests data published in datos.gob.ar. Is possible to:

  • Plot daily and cumulative tests by province.
  • Plot daily and cumulative positive tests by province.
  • Plot daily and cumulative positive test ratio (positive/total).

Definitions

In the charts that the code generates you will see a lot of categories. Pay attention to these descriptions to know exactly what each one represents.

  • Case: simply the word to indicate the event related to a potentially infected person
  • Confirmed case: a case confirmed by the authorities
  • Confirmed cases: number of cases confirmed so far
  • Recovered case: a person who is no longer infected
  • Recovered cases: number of recovered cases so far
  • Active cases: confirmed cases - recovered cases
  • Death case: a case which ended with death of the patient
  • New cases: number of new cases registered on a day
  • New cases trend: new cases for a day but taking 3 days average. Suppose there were 10 cases on Monday, 15 on Tuesday and 25 on Wednesday... Then you have a new cases trend of 33.33 for Tuesday ((10+15+25)/3)
  • Death rate: the ratio between deaths and confirmed cases (note that confirmed cases are less than actual cases but we don't know them)
  • Duplication speed: days needed to duplicate a cumulative cases until the day before if new cases per day remain constant
  • Duplication speed tren: duplication speed taking 3 days average

Actual charts

If you don't want to run the code but are curious about the outbreak status in Argentina you can download the charts in Argentina_Data/actual_charts folder.

Feel free to contact me by mail or reach me in telegram or mastodon.

covid-19's People

Contributors

rvalla avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

kant

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.