<commit_before># pretty-data

This module allows the generation of [D3](https://d3js.org) visualizations on the server.

Visualizations can be exported in HTML, SVG or PNG (via [PhantomJS](http://phantomjs.org/)).

## Examples

### US TopoJSON

Source: [https://bl.ocks.org/mbostock/4136647](https://bl.ocks.org/mbostock/4136647).

![](./examples/out/map-us.png)

### Voronoi

Adapted from: [http://mbostock.github.io/d3/talk/20111116/airports-all.html](http://mbostock.github.io/d3/talk/20111116/airports-all.html).

![](./examples/out/voronoi.png)
<commit_msg>Adds installation section in README<commit_after># Pretty Data

This module allows the generation of [D3](https://d3js.org) visualizations on the server.

Visualizations can be exported in HTML, SVG or PNG (via [PhantomJS](http://phantomjs.org/)).

## Installation

As simple as:

`npm install prettydata`

If you are more the [Yarn](https://yarnpkg.com) kind of guy then go for:

`yarn add prettydata`

## Examples

### US TopoJSON

Source: [https://bl.ocks.org/mbostock/4136647](https://bl.ocks.org/mbostock/4136647).

![](./examples/out/map-us.png)

### Voronoi

Adapted from: [http://mbostock.github.io/d3/talk/20111116/airports-all.html](http://mbostock.github.io/d3/talk/20111116/airports-all.html).

![](./examples/out/voronoi.png)

{'fraction_non_alphanumeric': 0.17140661029976942, 'fraction_numerical': 0.05226748654880861, 'mean_word_length': 4.425, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 7, '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': '1478777', 'n_tokens_mistral': 537, 'n_tokens_neox': 479, 'n_words': 97}