Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
update README
  • Loading branch information
alvinthai committed Mar 4, 2018
1 parent 186c02b commit 1320f71
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 8 deletions.
33 changes: 31 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,31 @@
# histoviewer
Dynamic histograms for pandas DataFrames
## Introduction
Histoviewer is an interactive bokeh application for dynamically viewing histograms and bar charts for a pandas DataFrame input.

Try out the application here (it may take up to a minute to start the heroku app):
https://histoviewer.herokuapp.com/sample_app

Play around with the sliders, text inputs, dropdowns, and button widgets to update the data dynamically!

## Features
Histoviewer uses bokeh widgets to interact with the displayed plots. The column selection dropdown changes the data source to **df[column]**.

- Continuous variables
- dynamically rebin histogram from 10-100 bins
- dynamically rescale minimum/maximum bounds of histogram
- Categorical variables
- resort by y-axis (descending) or x-axis (alphabetical)
- reindex x-axis to filter categories

## Getting Started
To use Histoviewer, simply install the required dependencies:
```
pip install -r requirements.txt
```

Then run the following code (in Jupyter notebook) to interact with a pandas DataFrame:
```
from histoviewer import histoviewer
histoviewer(df)
```

For an example of how to run histoviewer from a python 2.7 script, see [sample_app.py](https://github.com/alvinthai/histoviewer/blob/master/sample_app.py).
8 changes: 4 additions & 4 deletions histoviewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ def histoviewer(df, default_col=None, serve='notebook'):
pandas DataFrame input.
Histograms (continuous variables) have interactive inputs for:
- rebinning from 10-100 Bins
- rescaling minimum and maximum bounds of axis
- rebinning histogram from 10-100 bins
- rescaling minimum/maximum bounds of histogram
Bar Charts (categorical variables) have interactive inputs for:
- sorting by y-axis (descending) or x-axis (ascending)
- reindexing x-axis for hiding categories
- resorting by y-axis (descending) or x-axis (alphabetical)
- reindexing x-axis to filter categories
Default serve mode assumes jupyter notebook. Histoviewer application could
also be served from a python script via:
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
bokeh==0.12.14
numpy==1.14.1
pandas==0.22.0
numpy>=1.14.1
pandas>=0.22.0

0 comments on commit 1320f71

Please sign in to comment.