File Exchange

image thumbnail

Coronavirus Tracker - Country Modeling

version 2.6.7 (348 KB) by Joshua McGee
Coronavirus tracker created to visually analyze the spread of COVID-19. The code receives and plots data from JHU CCSE.

6 Downloads

Updated 17 Apr 2020

GitHub view license on GitHub

The code receives data from the Humanitarian Data Exchange and can be used to plot data regarding the coronavirus spread for a specific country. Current metrics include: death rate, amount infected, and amount dead from the virus. The data can be plotted and used to determine predictions regarding the spread of the virus. Data is updated daily and can be used to interactively model the spread of the virus.

Data could be used to compare the spread of multiple countries. Currently, the code is set up to visualize the spread in the United States however this can be changed to any country through a simple change of a single line of code.

Cite As

Joshua McGee (2020). Coronavirus Tracker - Country Modeling (https://github.com/joshmcgee24/coronavirustracker/releases/tag/2.6.7), GitHub. Retrieved .

Comments and Ratings (20)

Bhoomika Malhotra

This is with reference to the previous comment.
Countrydeathrate = max(Countrytotaldead)/max(Countrytotalinfected)*100;
The above line is proving to be problematic

Bhoomika Malhotra

Hello, Mr. McGee!
I hope you are doing well.
I am trying to run this code for India but it displays an error in line 113 stating 'Error using /
Matrix dimensions must agree.'
Could you please help me out with this?
Thank you so much!

Martin Erdelen

Excellent tool, thanks!
Minor issue (R2018b): coronavirustracker.m, lines 182 and 204 throw errors "...is not a valid variable name",
because there are spaces e.g. in T.Properties.VariableNames = {sprintf('Date'),(sprintf('New %s Cases',country))}
Simple solution: replace spaces by underscores.

Mohand Oukaci

This is what I got. Could not run the program. Any suggestion?
Error using webread (line 122)
Could not access server. Host not found: proxy.prv.
Error in coronavirustracker (line 19)
result=webread('https://data.humdata.org/hxlproxy/api/data-preview.csv?url=https%3A%2F%2Fraw.githubusercontent.com%2FCSSEGISandData%2FCOVID-19%2Fmaster%2Fcsse_covid_19_data%2Fcsse_covid_19_time_series%2Ftime_series_covid19_confirmed_global.csv&filename=time_series_covid19_confirmed_global.csv','options','table');

Joshua McGee

The curve fitting toolbox is required. I will add this to the description. To run without the curve fitting toolbox, set prediction_enabled to 0.
Josh

Mohand Oukaci

Hi Joshua
I am not able to run the prorgram as Matlab indicates that I dont have the curve fitting toolbox. Is there any way around this
Thanks

Guojin Feng

Thanks, the codes work on my computer which rusn R2019b.

Joshua McGee

Hi Illan, this version is fully compatible with R2019b and up.

Ilan Hurwitz

Hi Josh! Thanks for all the hard work :)
I"m still getting a formatting error at line 51:

Error using coronavirustracker (line 51)
Table variable names must be character vectors.

Joshua McGee

Please try the new version.

Joshua McGee

With that being said, I will fix this issue now.

Joshua McGee

Hi George, the prediction algorithm in this code isn’t very robust. See my other code called “COVID-19 Modeling” for more accurate predictions.

George Ellis

I get a flat projection for the US for the Epidemic simulation. It is constant at 14248 cases. Is this happening to anyone else?

Joshua McGee

This will not be compatible with Octave. You need the statistics and machine learning MATLAB package.

Bryan Bemley

Hello, can this also be run in Octave? I'm in the process of getting a MATLAB trial, but I thought I would ask.

Ilan Hurwitz

Thanks!
You're awesome!
If you need me to test anything I'm happy to help. Running 2018A currently.

Joshua McGee

Hi Ilan, I’m working on a fix for this. It has to do with matlab version. Josh

Ilan Hurwitz

Thanks for the great work!
There seems to be a problem with the formatting of the variable names at the top of each column in the table.
Looking forward to an updated fix :)

Umar farooq Mohammad

Jacob Briones

Updates

2.6.7

See release notes for this release on GitHub: https://github.com/joshmcgee24/coronavirustracker/releases/tag/2.6.7

2.6.6

updated 4/16

2.6.5

updated 4/14

2.6.4

updated, increased accuracy (4/13)

2.6.3

updated 4/13

2.6.2

-compatibility fixes, updated 4/11

2.6.1

updated 4/10

2.6

-updated 4/9

2.5

updated 4/8

2.4.9

-updated 4/6

2.4.8

-updated pie chart

2.4.7

-examples and image

2.4.6

-added examples

2.4.5

-added case per day to plot

2.4.4

-bug fix

2.4.3

-fixed predictions and small bugs

2.4.2

-bug fix

2.4.1

-compatibility notes

2.4

-bug fixes and compatibility

2.3

-compatibility

2.2

-bug fixes and compatibility

2.1

-compatibility

2.0.9

-resolved all compatibility issues

2.0.8

-bug fixes

2.0.7

-new image

2.0.6

-acknowledgements

2.0.5

-updated predictions
-added statistics
-option to disable "world" plots and statistics

2.0.4

-updated database

2.0.3

-added pie chart to display the percentage of cases

2.0.2

-sorted table in descending order

2.0.1

-added ability to plot top 5 countries

2.0.0

-fixed projection and data retrieval

1.1.3

-fixed problem associated with data updating

1.1.2

-implemented a new logistic fit algorithm

1.1.0

updated description to reflect changes to code

1.0.9

-name chnage

1.0.8

-github

1.0.7

image

1.0.6

-N/A

1.0.5

-updated image

1.0.3

-added labels to graphs

1.0.2

-introduced 3-parameter logistic model

1.0.1

-fixed a small error

MATLAB Release Compatibility
Created with R2019b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Acknowledgements

Inspired by: fitVirus, COVID-19 Modeling