Citable Loader
Project description
Citable
Citable is a Python package for downloading datasets from Zenodo by using their DOIs.
from citable import Citable
dataset = Citable('DOI')
r = dataset.download()
Installing Citable and supported versions
Citable is available on PyPI:
$ python -m pip install citable
Citable supports Python 3.6+.
Supported Features
Citable is a handy tool for downloading and using data from Zenodo.
- Downloading data from Zenodo
- Unzipping the downloaded data if necessary
- Returning suitable data as a pandas DataFrame or displaying Markdown descriptions if you like to
Usage
First the Citable class must be imported into Python:
from citable import Citable
After doing so you must initiate a Citable object. You pass a DOI from Zenodo formatted as a string into the initiating method and give the returned object a name:
dataset = Citable('DOI')
The Citable class has only one function. This is the download()
function.
r = dataset.download(showMarkdown = True, pandas = True)
You can pass along two arguments with this function, both of which are boolean: showMarkdown and pandas. By default both are set to True, meaning that any markdown description contained in the downloaded data is shown via IPython and the package assumes you are using pandas DataFrames.
Input
- showMarkdown: if you don't want the markdown displayed, insert the argument
showMarkdown = False
into the download function - pandas: if you don't want to return a list containing pandas DataFrames but rather want to do your own thing and just want to know where the downloaded data was stored, insert the argument
pandas = False
into thedownload()
function.
Output
The output of the download function depends whether the input variable pandas is True or False:
pandas == True
: The download function returns a list of pandas DataFrames and strings ready for you to usepandas == False
: The download function returns a dictionary of the file names of the downloaded data and where they have been stored, so that you can copy & paste the path of the data you want to work with into your favourite data handler
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file citable-0.1.tar.gz
.
File metadata
- Download URL: citable-0.1.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b116c179168871eefb4b12c731d23caaf4106f92fe9e69012284e3ad7a65889 |
|
MD5 | 2a9cd134d0cc857f3897d38b42c2b8f5 |
|
BLAKE2b-256 | 7ff5d88472f470f08bd26affcea1b14771c62e52eebee5ad4ff97d871fd06e74 |
File details
Details for the file citable-0.1-py3-none-any.whl
.
File metadata
- Download URL: citable-0.1-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a943ebeb9da2d440ea4cfba4b43795b5b2881f201dc9d16ebfc3cbab7c43a54 |
|
MD5 | 486a2a737dc42f5949983cc3f9f93377 |
|
BLAKE2b-256 | 2f8521d9280697661643c89c65195dcf90bfdbc9d7523a74ab92ed19ae8a9daf |