Python Package for DataHerb: create, search, and load datasets.

Overview


Markdownify
The Python Package for DataHerb

A DataHerb Core Service to Create and Load Datasets.

Install

pip install dataherb

Documentation: dataherb.github.io/dataherb-python

The DataHerb Command-Line Tool

Requires Python 3

The DataHerb cli provides tools to create dataset metadata, validate metadata, search dataset in flora, and download dataset.

Search and Download

Search by keyword

dataherb search covid19
# Shows the minimal metadata

Search by dataherb id

dataherb search -i covid19_eu_data
# Shows the full metadata

Download dataset by dataherb id

dataherb download covid19_eu_data
# Downloads this dataset: http://dataherb.io/flora/covid19_eu_data

Create Dataset Using Command Line Tool

We provide a template for dataset creation.

Within a dataset folder where the data files are located, use the following command line tool to create the metadata template.

dataherb create

Upload dataset to remote

Within the dataset folder, run

dataherb upload

UI for all the datasets in a flora

dataherb serve

Use DataHerb in Your Code

Load Data into DataFrame

# Load the package
from dataherb.flora import Flora

# Initialize Flora service
# The Flora service holds all the dataset metadata
use_flora = "path/to/my/flora.json"
dataherb = Flora(flora=use_flora)

# Search datasets with keyword(s)
geo_datasets = dataherb.search("geo")
print(geo_datasets)

# Get a specific file from a dataset and load as DataFrame
tz_df = pd.read_csv(
  dataherb.herb(
      "geonames_timezone"
  ).get_resource(
      "dataset/geonames_timezone.csv"
  )
)
print(tz_df)

The DataHerb Project

What is DataHerb

DataHerb is an open-source data discovery and management tool.

  • A DataHerb or Herb is a dataset. A dataset comes with the data files, and the metadata of the data files.
  • A Herb Resource or Resource is a data file in the DataHerb.
  • A Flora is the combination of all the DataHerbs.

In many data projects, finding the right datasets to enhance your data is one of the most time consuming part. DataHerb adds flavor to your data project. By creating metadata and manage the datasets systematically, locating an dataset is much easier.

Currently, dataherb supports sync dataset between local and S3/git. Each dataset can have its own remote location.

What is DataHerb Flora

We desigined the following workflow to share and index open datasets.

DataHerb Workflow

The repo dataherb-flora is a demo flora that lists some datasets and demonstrated on the website https://dataherb.github.io. At this moment, the whole system is being renovated.

Development

  1. Create a conda environment.
  2. Install requirements: pip install -r requirements.txt

Documentation

The source of the documentation for this package is located at docs.

References and Acknolwedgement

  • dataherb uses datapackage in the core. datapackage is a python library for the data-package standard. The core schema of the dataset is essentially the data-package standard.
Comments
  • would you like to take a look at our api?

    would you like to take a look at our api?

    I come across this repo and found it very similar to our API, though much more mature. https://github.com/Glacier-Ice/data-sci-api

    we have problems in creating a standard of dataset collection and API documentation for end-users

    is there a way we can collaborate?

    opened by Stockard 4
  • Format search results for better ux

    Format search results for better ux

    The current search result shows too much information. It would be good to format the result into a way that is easier to read and get the id if needed.

    enhancement 
    opened by emptymalei 1
  • use rapidfuzz instead of fuzzywuzzy

    use rapidfuzz instead of fuzzywuzzy

    FuzzyWuzzy is GPLv2 licensed which would force you to licence the whole project under GPLv2. I had the same problem on one of my projects and so I wrote rapidfuzz which is implementing the same algorithm but is based on a version of fuzzywuzzy that was MIT Licensed and is therefor MIT Licensed aswell, so it can be used in here without forcing a License change. As a nice bonus it is fully implemented in C++ and comes with a few Algorithmic improvements making it faster than FuzzyWuzzy.

    opened by maxbachmann 1
  • Use One File for Each Herb in Flora

    Use One File for Each Herb in Flora

    Is it better to have one file for each herb in flora?

    Situition

    Currently, the flora is defined in a single json file.

    • It becomes hard to read. This is not fitting into the human-readable principle.
    • It becomes hard to manage. We are currently sorting everything in the big file. When we have a problem, the whole flora will be unusable.

    Solution

    Use separate files for herbs.

    Simply Copy dataherb.json

    • Copy dataherb.json to workdir/{id}/dataherb.json or {id}.json will work.

      • Using folders allows us to put in more files. For example, we can take datapackage content out to make it more managable.
    • Build the flora from all these files.

    • [x] Implement this new structure.

    Ready for a Demo repo of flora

    In this way, we can put up a repo for open datasets easily and allow users to add more easily.

    Possible creating process

    • Create package directly on GitHub by uploading the dataherb.json file.

      • But there should be a validation process to avoid duplicate id.
    • [ ] Setup a demo repo as demo flora.

    enhancement 
    opened by emptymalei 0
  • Overhaul: New Core Management, Local Indexing Webpage, Flexible Flora Database

    Overhaul: New Core Management, Local Indexing Webpage, Flexible Flora Database

    This is a completely new era of Dataherb.

    New Stuff

    • Supporting S3 as source
    • Serve whole flora as webpages with search
    • User config for flora
    • Multiple flora on one machine

    We also redesigned the core.

    opened by emptymalei 0
  • Add dataset using the URL of a remote repo

    Add dataset using the URL of a remote repo

    We don't only upload datasets, we might also want to load datasets from remote.

    Here we propose to add the option to add datasets using the URL.

    • Build a Herb from remote data
    • Option to add metadata only or download everything.
      • Adding metadata only will only add data to the flora
      • Thus we can not find the dataset folder with the corresponding id.
      • This can be used to decide if a dataset is metadata only or fully downloaded.
    opened by emptymalei 0
  • Sync Flora Metafolder

    Sync Flora Metafolder

    Managing flora using command line

    Version control of the flora is not really hard. We just get into the folder and use git.

    But it would be much easier if we can simply run dataherb sync flora


    Approaches:

    enhancement 
    opened by emptymalei 0
Releases(0.1.6)
  • 0.1.6(Feb 10, 2022)

    Fixed

    • Command line tool dataherb configure -l now only opens the folder.
    • Command line too dataherb download will also display where the dataset is downloaded to. This makes it easier for the user to find the downloaded dataset.
    Source code(tar.gz)
    Source code(zip)
  • 0.1.5(Aug 12, 2021)

    Using Dedicated Folders for Herbs

    In the previous versions, we can only use a single file to host all the flora metadata. It will become unmanageable and hard to read as the number of herbs grows. (#14)

    In this version, we introduce a new structure for the flora metadata. Each herb is getting its own folder! This structure makes it easier for us to read and manage by hand. It is also better for version-controling your flora.

    (🌱 Best wishes to your herbs in their own pots. )

    Source code(tar.gz)
    Source code(zip)
  • 0.1.4(Aug 7, 2021)

  • 0.1.3(Aug 7, 2021)

  • 0.0.5(Mar 14, 2020)

  • 0.0.3(Feb 23, 2020)

    dataherb command line tool now automatically finds the data files and generate part of the metadata based on the files. CSV files are automatically parsed.

    Source code(tar.gz)
    Source code(zip)
Owner
DataHerb
Get datasets in a blink of an eye | Experimenting with simple modular small dataset discovery
DataHerb
collect training and calibration data for gaze tracking

Collect Training and Calibration Data for Gaze Tracking This tool allows collecting gaze data necessary for personal calibration or training of eye-tr

Pascal 5 Dec 17, 2022
Used for data processing in machine learning, and help us to construct ML model more easily from scratch

Used for data processing in machine learning, and help us to construct ML model more easily from scratch. Can be used in linear model, logistic regression model, and decision tree.

ShawnWang 0 Jul 05, 2022
Python scripts aim to use a Random Forest machine learning algorithm to predict the water affinity of Metal-Organic Frameworks

The following Python scripts aim to use a Random Forest machine learning algorithm to predict the water affinity of Metal-Organic Frameworks (MOFs). The training set is extracted from the Cambridge S

1 Jan 09, 2022
A CLI tool to reduce the friction between data scientists by reducing git conflicts removing notebook metadata and gracefully resolving git conflicts.

databooks is a package for reducing the friction data scientists while using Jupyter notebooks, by reducing the number of git conflicts between different notebooks and assisting in the resolution of

dataroots 86 Dec 25, 2022
Data collection, enhancement, and metrics calculation.

l3_data_collection Data collection, enhancement, and metrics calculation. Summary Repository containing code for QuantDAO's JDT data collection task.

Ruiwyn 3 Dec 23, 2022
A simplified prototype for an as-built tracking database with API

Asbuilt_Trax A simplified prototype for an as-built tracking database with API The purpose of this project is to: Model a database that tracks constru

Ryan Pemberton 1 Jan 31, 2022
Bamboolib - a GUI for pandas DataFrames

Community repository of bamboolib bamboolib is joining forces with Databricks. For more information, please read our announcement. Please note that th

Tobias Krabel 863 Jan 08, 2023
Streamz helps you build pipelines to manage continuous streams of data

Streamz helps you build pipelines to manage continuous streams of data. It is simple to use in simple cases, but also supports complex pipelines that involve branching, joining, flow control, feedbac

Python Streamz 1.1k Dec 28, 2022
MotorcycleParts DataAnalysis python

We work with the accounting department of a company that sells motorcycle parts. The company operates three warehouses in a large metropolitan area.

NASEEM A P 1 Jan 12, 2022
A collection of learning outcomes data analysis using Python and SQL, from DQLab.

Data Analyst with PYTHON Data Analyst berperan dalam menghasilkan analisa data serta mempresentasikan insight untuk membantu proses pengambilan keputu

6 Oct 11, 2022
:truck: Agile Data Preparation Workflows made easy with dask, cudf, dask_cudf and pyspark

To launch a live notebook server to test optimus using binder or Colab, click on one of the following badges: Optimus is the missing framework to prof

Iron 1.3k Dec 30, 2022
BigDL - Evaluate the performance of BigDL (Distributed Deep Learning on Apache Spark) in big data analysis problems

Evaluate the performance of BigDL (Distributed Deep Learning on Apache Spark) in big data analysis problems.

Vo Cong Thanh 1 Jan 06, 2022
Data exploration done quick.

Pandas Tab Implementation of Stata's tabulate command in Pandas for extremely easy to type one-way and two-way tabulations. Support: Python 3.7 and 3.

W.D. 20 Aug 27, 2022
2019 Data Science Bowl

Kaggle-2019-Data-Science-Bowl-Solution - Here i present my solution to kaggle 2019 data science bowl and how i improved it to win a silver medal in that competition.

Deepak Nandwani 1 Jan 01, 2022
Calculate multilateral price indices in Python (with Pandas and PySpark).

IndexNumCalc Calculate multilateral price indices using the GEKS-T (CCDI), Time Product Dummy (TPD), Time Dummy Hedonic (TDH), Geary-Khamis (GK) metho

Dr. Usman Kayani 3 Apr 27, 2022
Snakemake workflow for converting FASTQ files to self-contained CRAM files with maximum lossless compression.

Snakemake workflow: name A Snakemake workflow for description Usage The usage of this workflow is described in the Snakemake Workflow Catalog. If

Algorithms for reproducible bioinformatics (Koesterlab) 1 Dec 16, 2021
A multi-platform GUI for bit-based analysis, processing, and visualization

A multi-platform GUI for bit-based analysis, processing, and visualization

Mahlet 529 Dec 19, 2022
Pandas-based utility to calculate weighted means, medians, distributions, standard deviations, and more.

weightedcalcs weightedcalcs is a pandas-based Python library for calculating weighted means, medians, standard deviations, and more. Features Plays we

Jeremy Singer-Vine 98 Dec 31, 2022
This repository contains some analysis of possible nerdle answers

Nerdle Analysis https://nerdlegame.com/ This repository contains some analysis of possible nerdle answers. Here's a quick overview: nerdle.py contains

0 Dec 16, 2022
Data Science Environment Setup in single line

datascienv is package that helps your to setup your environment in single line of code with all dependency and it is also include pyforest that provide single line of import all required ml libraries

Ashish Patel 55 Dec 16, 2022