Skip to main content

Python library for loading/cleaning data used in Valorum training

Project description

This package provides a simplified interface to datasets that we use frequently.

Loading data

To see a list of available datasets run

import valorum
valorum.data.available()

To load one of the listed datasets run

df = valorum.data.load("dataset_name")

where dataset_name is replaced by one of the names returned by valorum.data.available().

When you first load a dataset, valorum will fetch the data from somewhere online. It will then save a local copy of the data to your hard drive. Subsequent requests to load a dataset (even in different python sessions) will first attempt to load the data from your hard drive and only fetch from online if necessary.

Configuration

The valorum library is configurable. Below is a listing of available configuration options.

To see a list of valid configuration options run

import valorum
valorum.data.config.describe_options()

To set a configuration use valourm.data.options[section.option] = value.

For example, to set the configuration option for the BLS api_key I would call:

import valorum
valorum.data.options["bls.api_key"] = "MY_API_KEY"

Developer docs

Contributing datasets

To contribute a dataset you need to implement a function _retrieve_{name} inside the file data/retrieve.py. This function is responsible for obtaining the data either “by hand” (data hard coded into the function) or from online. The function must return a pandas DataFrame with the data.

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

valorum-0.2.3.tar.gz (20.6 kB view details)

Uploaded Source

File details

Details for the file valorum-0.2.3.tar.gz.

File metadata

  • Download URL: valorum-0.2.3.tar.gz
  • Upload date:
  • Size: 20.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for valorum-0.2.3.tar.gz
Algorithm Hash digest
SHA256 a391c93de0f92641558d95eff3d4cf1107081ed0567bf1a50fdb843314d00ab7
MD5 209dcd6cb1c4534b8a90f324e872b917
BLAKE2b-256 df2c9a6f611e29c3b5181a4ba27fa5ef3b55d92f8bfe8f17bf6cc817d55b8e65

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page