Skip to content

A python library for generating VR-friendly visualization files from pandas dataframes.

License

Notifications You must be signed in to change notification settings

KCollins/harkness

Repository files navigation

PyPI version DOI

harkness

A python library for generating VR-friendly visualization files from pandas dataframes.

Try it in Binder: Binder

Minimum Working Example:

# Install harkness if needed:
pip install harkness

# Import libraries
import pandas as pd
from harkness.create_ply import create_ply

# Generate sample data
data = {'X': [1, 2, 3],
        'Y': [4, 5, 6],
        'Z': [7, 8, 9],
        'C': [10, 20, 30]}

df = pd.DataFrame(data)

# Create PLY file
filename = 'example.ply'
create_ply(df, filename, C='C', is_verbose=True)

How to Use:

  • Identify an appropriate dataframe. You'll want to make sure that your data makes sense in 3D, and select or add a column that makes sense as a colormap. The colormap column can be categorical or numeric.

  • Generate .ply file. Run create_ply() on your dataframe, identifying the columns X, Y, Z, and C (for color).

  • Visualize on desktop. You can use a program like Autodesk MeshMixer or Cloud Compare.

  • Visualize in VR. You can open the resulting file in a VR viewer like VRifier. Any headset that works with SteamVR should work. I use a Valve Index.

Notes and Acknowledgments

Named for Ruth Harkness, who with Quentin Young and Gerald Russell brought the first live giant panda cub to the United States. (For more on this, read her memoir, The Lady and the Panda.) Name chosen because (1) "harkness" did not appear for related topics on a search of pypi, and (2) it's a library for displaying pandas. Some assistance by Google Bard.

If you use this project in your work, please cite it using the Zenodo DOI.

About

A python library for generating VR-friendly visualization files from pandas dataframes.

Resources

License

Stars

Watchers

Forks

Packages

No packages published