Package: openclean
Aboutopencleanis a Python library for data profiling and data cleaning. The project is motivated by the fact that data preparation is still a major bottleneck for many data science projects. Data preparation requires profiling to gain an understanding of data quality issues, and data manipulation to transform the data into a form that is fit for the intended purpose.While a large number of different tools and techniques have previously been developed for profiling and cleaning data, one main issue that we see with these tools is the lack of access to them in a single (unified) framework. Existing tools may be implemented in different programming languages and require significant effort to install and interface with. In other cases, promising data cleaning methods have been published in the scientific literature but there is no suitable codebase available for them. We believe that the lack of seamless access to existing work is a major contributor to why data preparation is so time consuming.The goal ofopencleanis to bring together data cleaning tools in a single environment that is easy and intuitive to use for a data scientist.opencleanallows users to compose and execute cleaning pipelines that are built using a variety of different tools. We aim foropencleanto be flexible and extensible to allow easy integration of new functionality. To this end, we define a set of primitives and API’s for the different types of operators (actors) inopencleanpipelines.Featuresopenclean has many features that make the data wrangling experience straightforward. It shines particularly in these areas:Data Profilingopenclean comes with a profiler to provide users actionable metrics about their data’s quality. It allows users to detect possible problems early on by providing various statistical measures of the data from min-max frequencies, to uniqueness and entropy calculations. The interface is easy to implement and can be extended by python savvy users to cater their needs.Data Cleaning & Wranglingopenclean’s operators have been created specifically to handle data janitorial tasks. They help identify and present statistical anomalies, fix functional dependency violations, locate and update spelling mistakes, and handle missing values gracefully. As openclean is growing fast, so is this list of operators!Data Enrichmentopenclean seamlessly integrates withSocrataandReference Data Repositoryto provide it’s users master datasets which can be incorporated in the data cleaning process.Data Provenanceopenclean comes with a mini-version control engine that allows users to maintain versions of their datasets and at any point commit, checkout or rollback changes. Not only this, users can register custom functions inside the openclean engine and apply them effortlessly across different datasets/notebooks.InstallationInstallopencleanfrom PyPI usingpipwith:pipinstallopencleanYou can also install the different openclean extensionsopenclean-geo,openclean-metanome,openclean-notebook, andopenclean-pattern, or install openclean with all the extensions:pipinstallopenclean[full]Note: See theDemosection below for instructions to run theexample notebooksin this repository.UsageWe include several example notebooks in this repository that demonstrate possible use cases foropenclean. We recommend starting with thedocumentationor the New York City Restaurant Inspection Results notebook. In that example our goal is to reproduce a previousstudy from 2014 that looks at the distribution of restaurant inspection grades in New York City. For our study, we use data that was downloaded in Sept. 2019. The example is split into two different Jupyter notebooks:Data ProfilingData CleaningOther examples along with the datasets are located inthe examples’ folderDemoUse the following steps to setup and run theexample notebooksin this repository. We recommend using a virtual environment. Below are two examples for setting up a virtual environment# -- Create a new virtual environmentvirtualenvvenv# -- Activate the virtual environmentsourcevenv/bin/activateIf you are using the Python distribution fromAnaconda, you can setup an environment like this:# -- Create a new virtual environmentcondacreate-nopencleanpip# -- Activate the virtual environmentcondaactivateopencleanAfter activating your virtual environment, follow these steps to setup and run the notebook examples :# Clone the openclean repository into your current working directory.gitclonegit@github.com:VIDA-NYU/openclean.git# Change working directory to the cloned repository.cdopenclean# Install openclean and dependencies required for the demopipinstall.[demo]# Run Jupyter (the navigate to the notebooks in folder `examples/notebooks`)jupyternotebookDemo VideoWant to seeopencleanin action? Check out our video demo:https://youtu.be/HNmNB6YMgHkDocumentationThe official documentation is hosted on readthedocs:http://openclean.readthedocs.io/You can also read more about openclean in this blog post (onGitHubandTowards Data Science).ContributingWe welcome all contributions, bug reports, bug fixes, documentation improvements, enhancements, and ideas.A detailed overview on how to contribute can be foundhere.