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
NumPy aware dynamic Python compiler using LLVM

Numba A Just-In-Time Compiler for Numerical Functions in Python Numba is an open source, NumPy-aware optimizing compiler for Python sponsored by Anaco

Numba 8.2k Jan 07, 2023
ETL flow framework based on Yaml configs in Python

ETL framework based on Yaml configs in Python A light framework for creating data streams. Setting up streams through configuration in the Yaml file.

Павел Максимов 18 Jul 06, 2022
A stock analysis app with streamlit

StockAnalysisApp A stock analysis app with streamlit. You select the ticker of the stock and the app makes a series of analysis by using the price cha

Antonio Catalano 50 Nov 27, 2022
Hangar is version control for tensor data. Commit, branch, merge, revert, and collaborate in the data-defined software era.

Overview docs tests package Hangar is version control for tensor data. Commit, branch, merge, revert, and collaborate in the data-defined software era

Tensorwerk 193 Nov 29, 2022
A Python 3 library making time series data mining tasks, utilizing matrix profile algorithms

MatrixProfile MatrixProfile is a Python 3 library, brought to you by the Matrix Profile Foundation, for mining time series data. The Matrix Profile is

Matrix Profile Foundation 302 Dec 29, 2022
Investigating EV charging data

Investigating EV charging data Introduction: Got an opportunity to work with a home monitoring technology company over the last 6 months whose goal wa

Yash 2 Apr 07, 2022
Weather Image Recognition - Python weather application using series of data

Weather Image Recognition - Python weather application using series of data

Kushal Shingote 1 Feb 04, 2022
Conduits - A Declarative Pipelining Tool For Pandas

Conduits - A Declarative Pipelining Tool For Pandas Traditional tools for declaring pipelines in Python suck. They are mostly imperative, and can some

Kale Miller 7 Nov 21, 2021
API>local_db>AWS_RDS - Disclaimer! All data used is for educational purposes only.

APIlocal_dbAWS_RDS Disclaimer! All data used is for educational purposes only. ETL pipeline diagram. Aim of project By creating a fully working pipe

0 Apr 25, 2022
A probabilistic programming library for Bayesian deep learning, generative models, based on Tensorflow

ZhuSuan is a Python probabilistic programming library for Bayesian deep learning, which conjoins the complimentary advantages of Bayesian methods and

Tsinghua Machine Learning Group 2.2k Dec 28, 2022
PyTorch implementation for NCL (Neighborhood-enrighed Contrastive Learning)

NCL (Neighborhood-enrighed Contrastive Learning) This is the official PyTorch implementation for the paper: Zihan Lin*, Changxin Tian*, Yupeng Hou* Wa

RUCAIBox 73 Jan 03, 2023
Analyzing Covid-19 Outbreaks in Ontario

My group and I took Covid-19 outbreak statistics from ontario, and analyzed them to find different patterns and future predictions for the virus

Vishwaajeeth Kamalakkannan 0 Jan 20, 2022
BioMASS - A Python Framework for Modeling and Analysis of Signaling Systems

Mathematical modeling is a powerful method for the analysis of complex biological systems. Although there are many researches devoted on produ

BioMASS 22 Dec 27, 2022
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
simple way to build the declarative and destributed data pipelines with python

unipipeline simple way to build the declarative and distributed data pipelines. Why you should use it Declarative strict config Scaffolding Fully type

aliaksandr-master 0 Jan 26, 2022
Utilize data analytics skills to solve real-world business problems using Humana’s big data

Humana-Mays-2021-HealthCare-Analytics-Case-Competition- The goal of the project is to utilize data analytics skills to solve real-world business probl

Yongxian (Caroline) Lun 1 Dec 27, 2021
Programmatically access the physical and chemical properties of elements in modern periodic table.

API to fetch elements of the periodic table in JSON format. Uses Pandas for dumping .csv data to .json and Flask for API Integration. Deployed on "pyt

the techno hack 3 Oct 23, 2022
follow-analyzer helps GitHub users analyze their following and followers relationship

follow-analyzer follow-analyzer helps GitHub users analyze their following and followers relationship by providing a report in html format which conta

Yin-Chiuan Chen 2 May 02, 2022
pyETT: Python library for Eleven VR Table Tennis data

pyETT: Python library for Eleven VR Table Tennis data Documentation Documentation for pyETT is located at https://pyett.readthedocs.io/. Installation

Tharsis Souza 5 Nov 19, 2022
Using approximate bayesian posteriors in deep nets for active learning

Bayesian Active Learning (BaaL) BaaL is an active learning library developed at ElementAI. This repository contains techniques and reusable components

ElementAI 687 Dec 25, 2022