This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function SIRmodel!(du,u,p,t) | |
S, I, R = u | |
β, γ = p | |
du[1] = -β*S*I | |
du[2] = β*S*I - γ*I | |
du[3] = γ*I | |
end | |
#timespan of between 0 and 100 days. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(pdftools) | |
library(stringr) | |
library(rvest) | |
ExamplePDFLink = "https://www.nicd.ac.za/wp-content/uploads/2020/12/NICD-COVID-19-Daily-Sentinel-Hospital-Surveillance-report-National-20201228.pdf" | |
#Take url pdf file and extract table 2 (stats by province) and the report date | |
convertPDFToDataFrame<-function(PDFLink){ | |
HospitalData = pdf_text(PDFLink) | |
JAM =HospitalData[2] #take second table |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": 3, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"using Interact, Plots" | |
] |