A JavaScript library for displaying Rt estimates.
Live implementations: https://hamishgibbs.github.io/rt_vis/ and https://epiforecasts.io/covid/posts/global/.
Use from R
with RtD3
To report an problem or suggest changes, please open an issue.
This project is written in Typescript and uses Grunt as a task runner.
To develop this project locally:
Check for an installation of npm
:
npm -v
If you do not have nmp
installed, follow these installation instructions.
Check for an installation of Grunt
:
grunt --version
If you do not have Grunt
installed, follow these installation instructions.
When you have npm
and Grunt
installed, clone this repository into a directory of your choice:
git clone https://github.com/hamishgibbs/rt_vis.git
Enter the new directory and install dependencies with npm
:
cd rt_vis
npm install --save-dev
Run Grunt
tasks (compile Typescript, concatenate and minify files) with:
grunt
See Gruntfile.js
for more details on the specifics of each task.
Note: New files must be registered in Gruntfile.js
in the appropriate task(s) in order to be included in the final build.
To have Grunt
watch for changes to files during development:
grunt watch
Open index.html
in your browser and reload to observe changes to the library. Make note of the configuration variables and setup in index.html
.
If you are begninning to learn JavaScript, Typescript, and D3:
Typescript
.Note: This project uses D3.js v5. D3 has gone through major changes over the course of its development and some online material may refer to previous versions of D3.