test-23 / README.md
CalebCometML's picture
Duplicate from comet-team/kangas-direct
dbac830
---
title: Kangas Datagrid
emoji: 👁
colorFrom: indigo
colorTo: red
sdk: docker
pinned: false
license: apache-2.0
duplicated_from: comet-team/kangas-direct
---
# Kangas: Explore Multimedia Datasets at Scale :kangaroo:
Kangas is a tool for exploring, analyzing, and visualizing large-scale multimedia data. It provides a straightforward Python API
for logging large tables of data, along with an intuitive visual interface for performing complex queries against your dataset.
The key features of Kangas include:
- **Scalability**. Kangas DataGrid, the fundamental class for representing datasets, can easily store millions of rows of data.
- **Performance**. Group, sort, and filter across millions of data points in seconds with a simple, fast UI.
- **Interoperability**. Any data, any environment. Kangas can run in a notebook or as a standalone app, both locally and remotely.
- **Integrated computer vision support**. Visualize and filter bounding boxes, labels, and metadata without any extra setup.
You can access a live demo of Kangas at <a href="https://kangas.comet.com?datagrid=/data/coco-500.datagrid">kangas.comet.com</a>.
## Getting Started
Kangas is accessible as a Python library via pip
```
pip install kangas
```
Once installed, there are many ways to load or create a DataGrid.
Without writing any code, you can even download a DataGrid and begin exploring the data. At the console:
```
kangas server https://github.com/caleb-kaiser/kangas_examples/raw/master/coco-500.datagrid.zip
```
That's it!
In the next example, we load a publicly available DataGrid file, but the Kangas API also provides methods for ingesting CSVs, Pandas DataFrames, and for manually constructing a new DataGrid:
```python
import kangas as kg
# Load an existing DataGrid
dg = kg.read_datagrid("https://github.com/caleb-kaiser/kangas_examples/raw/master/coco-500.datagrid.zip")
```
After your DataGrid is initialized, you can render it within the Kangas Viewer directly from Python:
```python
dg.show()
```
<img width="1789" alt="image" src="https://user-images.githubusercontent.com/42076840/197875668-5519d504-2209-472f-952e-ed09554ecb7a.png">
From the Kangas Viewer, you can group, sort, and filter data. In addition, Kangas will do its best to parse any metadata attached to your assets. For example, if you're using the COCO-500 DataGrid from the quickstart above, Kangas will automatically parse labels and scores for each image:
<img src="https://github.com/caleb-kaiser/kangas_examples/blob/master/Oct-25-2022%2016-43-56.gif">
And voil&agrave;! Now you're started using Kangas.
### Pandas DataFrames
Kangas can also read Pandas DataFrame objects directly:
```python
import kangas as kg
import pandas as pd
df = pd.DataFrame({"hidden_layer_size": [8, 16, 64], "loss": [0.97, 0.53, 0.12]})
dg = kg.read_dataframe(df)
```
### HuggingFace Datasets
HuggingFace's datasets can also be loaded into DataGrid directly because they use
rows of dictionaries, and images are represented by PIL images. DataGrid will
automatically convert PIL images into a [Kangas Image](https://github.com/comet-ml/kangas/wiki/Image#image):
```python
import kangas as kg
from datasets import load_dataset
dataset = load_dataset("beans", split="train")
dg = kg.DataGrid(dataset)
```
### Parquet files
> **Note**: You will need to have pyarrow installed to read parquet files.
```python
import kangas as kg
dg = kg.read_parquet("https://github.com/Teradata/kylo/raw/master/samples/sample-data/parquet/userdata5.parquet")
```
If you'd like to explore further, take a look at our example notebooks below:
## Documentation
1. <a href="https://github.com/comet-ml/kangas/wiki">Documentation Homepage</a>
2. <a href="https://github.com/comet-ml/kangas/blob/main/notebooks/DataGrid-Getting%20Started.ipynb">Quickstart Notebook</a> <a href="https://colab.research.google.com/github/comet-ml/kangas/blob/main/notebooks/DataGrid-Getting%20Started.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg"></a>
3. <a href="https://github.com/comet-ml/kangas/blob/main/notebooks/Integrations.ipynb">Integrations Notebook</a> <a href="https://colab.research.google.com/github/comet-ml/kangas/blob/main/notebooks/Integrations.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg"></a>
4. <a href="https://github.com/comet-ml/kangas/blob/main/examples/mnist_script.py"> MNIST Classification Example</a>