# AMRDC Data Visualizer Embed

Continued development of the [`amrdcdata-visualizer`][original-repo] web
app by Matthew Noojin.

Demonstration: https://amrc.ssec.wisc.edu/ograham/visualizer-embed/

[original-repo]: https://github.com/mnooj/amrdcdata-visualizer



## Setup


### As CGI on Apache

#### Clone

Clone this repository to a directory outside of the Apache document
root.

> On `amrc`, it's cloned to `~ograham/visualizer-embed/`.

#### Install virtual environment

Run `virtualenv venv` in the project directory to create the virtual
environment `venv`.

> `virtualenv` can be installed with `pip3 install virtualenv`.

Activate `venv` and run `pip install -r requirements.txt`.

> To activate `venv` with bash or zsh, run `. ./venv/bin/activate`.

#### Link

Create a symbolic link, with the desired path under the document root,
to the `htdocs` directory in this repository.
The Apache configuration will have to allow such links outside of the
document root, as well as all rules in `htdocs/.htaccess`.

> On `amrc`, the web path is `/ograham/visualizer-embed/` and the
> document root is `/data/web/amrc/htdocs`, so the linking command is
> `ln -sT ~ograham/visualizer-embed/htdocs /data/web/amrc/htdocs/ograham/visualizer-embed`.


### As a Heroku app

This repository is also ready to go as a Heroku Python app.