<commit_before>CalRecycleLCA - Visualization
=============================

Front end for CalRecycle Used Oil LCA Online Tool.

Interactive web application implemented in HTML, CSS, and JavaScript. 

Visualization is implemented with the help of D3.js and uses SVG. SVG requires a "modern" browser (see [Can I use SVG](http://caniuse.com/svg)). 

### LCA

LCA.js and LCA.css contain shared code.

### How to Publish

Copy Visualization folder to a web server host. 
In IIS, create a web app that points to the Visualization folder.

Edit LCA.js - at the top of the file change baseURI setting to the base URI of the web API.

### Current Status

A new web page, **FragmentFlows**, has been developed. 
It uses a new version of the web API. See description in ../vs/LCIAToolAPI/README
The following pages currently depend on the old version of web API (published at CalRecycle).

#### FragmentFlows
Sankey diagram of fragment flows.
12 fragments have been defined. The web page defaults to fragmentID=6. 

Start with a different fragment by adding a fragmentid URL variable. Example:
`http://publictest.calrecycle.ca.gov/LCIAToolVisualization/FragmentFlows.html?fragmentid=2`

Navigate to another fragment by clicking on a node with fragment type (node type is shown on hover). 


#### LciaComputation

User selects LCIA Method, Impact Category and Process from drop down selection lists. LCIA computation is performed and the total impact score is displayed. A stacked bar chart displays the associated elementary flows, where the size of each flow is proportional to the flow's positive contribution to the total score.

#### IntermediateFlows

User selects Process from drop down selection list. Front end queries IntermediateFlows web API method with selected processid parameter. A sankey diagram is displayed. The center node represents the selected process. Each intermediate flow is represented by a node and a link to/from the process. Input flows are displayed to the left of the process, while output flows are displayed on the right.

An old prototype of waterfall charts displaying **Contribution Analysis** is also included. It reads data from a json file. 
A new version will be developed to display LCIA Computation results when that has been implemented server side. The dependency on bootstrap will also be eliminated.<commit_msg>Vis: Update README to reflect current status<commit_after>CalRecycleLCA - Visualization
=============================

Front end for CalRecycle Used Oil LCA Online Tool.

Interactive web application implemented in HTML, CSS, and JavaScript. 

Visualization is implemented with the help of D3.js and uses SVG. SVG requires a "modern" browser (see [Can I use SVG](http://caniuse.com/svg)). 

### LCA

LCA.js and LCA.css contain shared code.

### How to Publish

Copy Visualization folder to a web server host. 
In IIS, create a web app that points to the Visualization folder.

Edit LCA.js - at the top of the file change baseURI setting to the base URI of the web API.

### Current Status

Two visualizations, listed below, get data from the latest version of the web API (under  [LCIAToolAPI](https://github.com/uo-lca/CalRecycleLCA/tree/master/vs/LCIAToolAPI)). A third visualization, for fragment LCIA, has been prototyped and will be completed after back end computation and caching has been completed.

#### FragmentFlows
Sankey diagram of fragment flows.
12 fragments have been defined. The web page defaults to fragmentID=6. 

Start with a different fragment by adding a fragmentid URL variable. Example:
`http://publictest.calrecycle.ca.gov/LCIAToolVisualization/FragmentFlows.html?fragmentid=2`

Navigate to another fragment by clicking on a node with fragment type (node type is shown on hover). 


#### LciaComputation

User selects LCIA Method, Impact Category and Process from drop down selection lists. LCIA computation is performed and the total impact score is displayed. A stacked bar chart displays the associated elementary flows, where the size of each flow is proportional to the flow's positive contribution to the total score.

#### LciaWaterfall

Prototype waterfall diagram. Fragment LCIA results will be visualized in a waterfall diagram.
{'fraction_non_alphanumeric': 0.0665083135391924, 'fraction_numerical': 0.0023752969121140144, 'mean_word_length': 4.5922974767596285, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4856353', 'n_tokens_mistral': 1079, 'n_tokens_neox': 1035, 'n_words': 584}