Metadata-Version: 2.1
Name: lux-api
Version: 0.2.0
Summary: A Python API for Intelligent Data Discovery
Home-page: https://github.com/lux-org/lux
Author: Doris Jung-Lin Lee
Author-email: dorisjunglinlee@gmail.com
License: Apache-2.0 License
Description: <p align="center"><a href="#"><img width=77% alt="" src="https://github.com/lux-org/lux-resources/blob/master/readme_img/logo.png?raw=true"></a></p>
        <h2 align="center">A Python API for Intelligent Visual Discovery</h2>
        
        <p align="center">
            <a href="https://travis-ci.com/lux-org/lux">
                <img alt="Build Status" src="https://travis-ci.com/lux-org/lux.svg?branch=master" align="center">
            </a>
            <!--     <a href="https://badge.fury.io/py/lux-api">
                <img src="https://badge.fury.io/py/lux-api.svg" alt="PyPI version" height="18" align="center">
            </a> -->
            <a href='https://lux-api.readthedocs.io/en/latest/?badge=latest'>
                <img src='https://readthedocs.org/projects/lux-api/badge/?version=latest' alt='Documentation Status'  align="center"/>
            </a>
            <a href='http://lux-project.slack.com/'>
                <img src='https://img.shields.io/static/v1?label=chat&logo=slack&message=Slack&color=brightgreen' alt='Slack'  align="center"/>
            </a>
            <a href='https://mybinder.org/v2/gh/lux-org/lux-binder/master'>
                <img src='https://img.shields.io/badge/launch-binder-579ACA.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFkAAABZCAMAAABi1XidAAAB8lBMVEX///9XmsrmZYH1olJXmsr1olJXmsrmZYH1olJXmsr1olJXmsrmZYH1olL1olJXmsr1olJXmsrmZYH1olL1olJXmsrmZYH1olJXmsr1olL1olJXmsrmZYH1olL1olJXmsrmZYH1olL1olL0nFf1olJXmsrmZYH1olJXmsq8dZb1olJXmsrmZYH1olJXmspXmspXmsr1olL1olJXmsrmZYH1olJXmsr1olL1olJXmsrmZYH1olL1olLeaIVXmsrmZYH1olL1olL1olJXmsrmZYH1olLna31Xmsr1olJXmsr1olJXmsrmZYH1olLqoVr1olJXmsr1olJXmsrmZYH1olL1olKkfaPobXvviGabgadXmsqThKuofKHmZ4Dobnr1olJXmsr1ol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w8zRUcKxwp73xkaLiqQb+kGduJTNHG72zcW9LoJgqQxpP3/Tj//c3yB0tqzaml05/+orHLksVO+95kX7/7qgJvnjlrfr2Ggsyx0eoy9uPzN5SPd86aXggOsEKW2Prz7du3VID3/tzs/sSRs2w7ovVHKtjrX2pd7ZMlTxAYfBAL9jiDwfLkq55Tm7ifhMlTGPyCAs7RFRhn47JnlcB9RM5T97ASuZXIcVNuUDIndpDbdsfrqsOppeXl5Y+XVKdjFCTh+zGaVuj0d9zy05PPK3QzBamxdwtTCrzyg/2Rvf2EstUjordGwa/kx9mSJLr8mLLtCW8HHGJc2R5hS219IiF6PnTusOqcMl57gm0Z8kanKMAQg0qSyuZfn7zItsbGyO9QlnxY0eCuD1XL2ys/MsrQhltE7Ug0uFOzufJFE2PxBo/YAx8XPPdDwWN0MrDRYIZF0mSMKCNHgaIVFoBbNoLJ7tEQDKxGF0kcLQimojCZopv0OkNOyWCCg9XMVAi7ARJzQdM2QUh0gmBozjc3Skg6dSBRqDGYSUOu66Zg+I2fNZs/M3/f/Grl/XnyF1Gw3VKCez0PN5IUfFLqvgUN4C0qNqYs5YhPL+aVZYDE4IpUk57oSFnJm4FyCqqOE0jhY2SMyLFoo56zyo6becOS5UVDdj7Vih0zp+tcMhwRpBeLyqtIjlJKAIZSbI8SGSF3k0pA3mR5tHuwPFoa7N7reoq2bqCsAk1HqCu5uvI1n6JuRXI+S1Mco54YmYTwcn6Aeic+kssXi8XpXC4V3t7/ADuTNKaQJdScAAAAAElFTkSuQmCC' alt='Binder'  align="center"/>
            </a>
            <a href="https://codecov.io/gh/lux-org/lux">
                <img src="https://codecov.io/gh/lux-org/lux/branch/master/graph/badge.svg" align="center" alt='CodeCov'/>
            </a>
        </p>
        
        Lux is a Python library that makes data science easier by automating aspects of the data exploration process. Lux facilitate faster experimentation with data, even when the user does not have a clear idea of what they are looking for. Visualizations are displayed via [an interactive Jupyter widget](https://github.com/lux-org/lux-widget) to allow users to quickly browse through large collections of data directly within their Jupyter notebooks.
        
        Here are some [slides](http://dorisjunglinlee.com/files/Zillow_07_2020_Slide.pdf) from a recent talk on Lux.
        
        Try out Lux on your own in a live Jupyter Notebook [here](https://mybinder.org/v2/gh/lux-org/lux-binder/master?urlpath=tree/examples/demo)! 
        
        # Getting Started
        
        To start using Lux, simply add an extra import statement along with your Pandas import.
        
        ```python    
        import lux
        import pandas as pd
        ```
        
        Then, Lux can be used as-is, without modifying any of your existing Pandas code. Here, we use Pandas's [read_csv](https://pandas.pydata.org/pandas-docs/stable/generated/pandas.read_csv.html) command to load in a [dataset of colleges](https://collegescorecard.ed.gov/data/documentation/) and their properties.
        
        ```python    
            df = pd.read_csv("college.csv")
            df
        ```
        
        <img src="https://github.com/lux-org/lux-resources/blob/master/readme_img/basicDemo.gif?raw=true"
             alt="Basic recommendations in Lux"
             style="width:900px" />
        
        Voila! Here's a set of visualizations that you can now use to explore your dataset further!
        
        <!-- # Features
        Lux provides a suite of capabilities that enables users to effortlessly discover visual insights from their data. -->
        
        <!-- Lux guides users to potential next-steps in their exploration. -->
        ### Next-step recommendations based on user intent: 
        
        In addition to dataframe visualizations at every step in the exploration, you can specify in Lux the attributes and values you're interested in. Based on this intent, Lux guides users towards potential next-steps in their exploration.
        
        For example, we might be interested in the attributes `AverageCost` and `SATAverage`.
        
        ```python
            df.intent = ["AverageCost","SATAverage"]
            df
        ```
        <img src="https://github.com/lux-org/lux-resources/blob/master/readme_img/contextRec.gif?raw=true"
             alt="Next-step Recommendations Based on User Context"
             style="width:600px" />
         
         The left-hand side of the widget shows the current visualization, i.e., the current visualization generated based on what the user is interested in. On the right, Lux generates three sets of recommendations, organized as separate tabs on the widget:
        
         - `Enhance` adds an additional attribute to the current selection, essentially highlighting how additional variables affect the relationship of `AverageCost` and `SATAverage`. We see that if we breakdown the relationship by `FundingModel`, there is a clear separation between public colleges (shown in red) and private colleges (in blue), with public colleges being cheaper to attend and with SAT average of lower than 1400.
            <img src="https://github.com/lux-org/lux-resources/blob/master/readme_img/enhance.png?raw=true"
             alt="Enhance Recommendations"
             style="width:600px" />
         - `Filter` adds a filter to the current selection, while keeping attributes (on the X and Y axes) fixed. These visualizations show how the relationship of  `AverageCost` and `SATAverage` changes for different subsets of data. For instance, we see that colleges that offer Bachelor's degree as its highest degree show a roughly linear trend between the two variables.
            <img src="https://github.com/lux-org/lux-resources/blob/master/readme_img/filter.png?raw=true"
             alt="Filter Recommendations"
             style="width:600px" />
         - `Generalize` removes an attribute to display a more general trend, showing the distributions of `AverageCost` and `SATAverage` on its own. From the `AverageCost` histogram, we see that many colleges with average cost of around $20000 per year, corresponding to the bulge we see in the scatterplot view.
            <img src="https://github.com/lux-org/lux-resources/blob/master/readme_img/generalize.png?raw=true"
             alt="Generalize Recommendations"
             style="width:600px" />
        
         See [this page](https://lux-api.readthedocs.io/en/latest/source/guide/intent.html) for more information on additional ways for specifying the intent.
        
        ### Easy programmatic access of exported visualization objects: 
        
        Now that we have found some interesting visualizations through Lux, we might be interested in digging into these visualizations a bit more. We can click on one or more visualizations to be exported, so we can programmatically access these visualizations further in Jupyter. Visualizations are represented as `Vis` objects in Lux. These `Vis` objects can be translated into Altair or VegaLite code, so that we can further edit these visualizations.
        
        <img src="https://github.com/lux-org/lux-resources/blob/master/readme_img/export.gif?raw=true"
             alt="Easily exportable visualization object"
             style="width:600px" />
        
        ### Quick, on-demand visualizations with the help of automatic encoding: 
        We've seen how `Vis`s are automatically generated as part of the recommendations. Users can also create their own Vis via the same syntax as specifying the intent. Lux is built on the philosophy that users should always be able to visualize anything they want, without having to think about *how* the visualization should look like. Lux automatically determines the mark and channel mappings based on a set of [best practices](http://hosteddocs.ittoolbox.com/fourshowmeautomaticpresentations.pdf) from [Tableau](https://www.tableau.com). The visualizations are rendered via [Altair](https://github.com/altair-viz/altair/tree/master/altair) into [Vega-Lite](https://github.com/vega/vega-lite) specifications.
        
        ```python    
            from lux.vis.Vis import Vis
            newEnglandCost = Vis(["Region=New England","MedianEarnings"],df)
            newEnglandCost
        ```    
        
        <img src="https://github.com/lux-org/lux-resources/blob/master/readme_img/view.png?raw=true"
             alt="Specified Visualization"
             width="200px" />
        
        ### Powerful language for working with collections of visualizations:
        
        Lux provides a powerful abstraction for working with collections of visualizations based on a partially specified queries. Users can provide a list or a wildcard to iterate over combinations of filter or attribute values and quickly browse through large numbers of visualizations. The partial specification is inspired by existing work on intent languages for visualization languages, including [ZQL](https://github.com/vega/compassql) and [CompassQL](https://github.com/vega/compassql).
        
        For example, we might be interested in looking at how the `AverageCost` distribution differs across different `Region`s.
        
        ```python    
            from lux.vis.VisList import VisList
            differentRegions = VisList(["Region=?","AverageCost"],df)
            differentRegions
        ```    
        
        <img src="https://github.com/lux-org/lux-resources/blob/master/readme_img/visList.gif?raw=true"
             alt="Example Vis List"
             style="width:600px" />
        
        
        To find out more about other features in Lux, see the complete documentation on [ReadTheDocs](https://lux-api.readthedocs.io/).
        
        # Quick Installation 
        
        To get started, Lux can be installed through [PyPI](https://pypi.org/project/lux-api/). This installs both the lux-api (this repo) and [lux-widget](https://pypi.org/project/lux-widget/) (the Lux Jupyter widget frontend).
        
        ```bash
            pip install lux-api
        ```
        
        To install and activate the Jupyter notebook extension: 
        
        ```bash
            jupyter nbextension install --py luxwidget
            jupyter nbextension enable --py luxwidget
        ```
        
        # Dev Installation 
        
        To set up Lux manually for development purposes, you should clone the two Github repos for Lux: 1) the core Python [Lux API](https://github.com/lux-org/lux)  and 2) the [Jupyter widget frontend](https://github.com/lux-org/lux-widget). 
        
        To install the Python Lux API: 
        
        ```bash
            git clone https://github.com/lux-org/lux.git
            cd lux/
            python setup.py install
        ```
        
        To install the [Lux Jupyter Widget](https://github.com/lux-org/lux-widget): 
        
        ```bash
            pip install git+https://github.com/lux-org/lux-widget
            jupyter nbextension install --sys-prefix --symlink --overwrite --py luxwidget
            jupyter nbextension enable --sys-prefix --py luxwidget
        ```
        
        # Support and Resources
        
        Lux is undergoing active development. If you are interested in using Lux, we would love to hear from you. Any feedback, suggestions, and contributions for improving Lux are welcome.
        
        Other additional resources:
        
        - Visit [ReadTheDoc](https://lux-api.readthedocs.io/en/latest/) for more detailed documentation.
        - Check out this [notebook tutorial series](https://github.com/lux-org/lux/tree/master/examples/tutorial) on how to use Lux.
        - Join the [Lux Slack channel](http://lux-project.slack.com/) for support and discussion.
        - Report any bugs, issues, or requests through [Github Issues](https://github.com/lux-org/lux/issues). 
        
Keywords: Visualization,Analytics,Data Science,Data Analysis
Platform: UNKNOWN
Classifier: Development Status :: 1 - Planning
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Other Audience
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: Topic :: Scientific/Engineering :: Visualization
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.5
Description-Content-Type: text/markdown
Provides-Extra: test
