hamishgibbs / rt_vis

Interactive RT visualisation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rt_vis

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.

Developer Guide

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:

  • Observable has useful interactive examples of D3.
  • D3.js has a limited but valuable API reference.
  • D3js.org has a basic introduction to the DOM manipulation model used in D3 (selections and attribute assignments).
  • Typescript Documentation has valuable information on the errors that can arise from using 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.

About

Interactive RT visualisation


Languages

Language:TypeScript 82.4%Language:HTML 10.5%Language:CSS 4.4%Language:JavaScript 2.0%Language:Makefile 0.4%Language:R 0.2%