Skip to main content

Tool to define random variables in a table. The main purpose is to support the EAM framework.

  • Free software: Apache Software License 2.0

Installation

pip install eam-data-tools

You can also install the in-development version with:

pip install https://github.com/dschien/eam-data-tools/archive/master.zip

Documentation

https://eam-data-tools.readthedocs.io/

Usage

# Example Given an excel file with rows similar to the below

variable

scenario

type

ref value

param

initial_value_proportional_variation

unit

mean growth

variability growth

ref date

label

comment

source

a

exp

10

0.4

kg

-0.20

0.10

01/01/2009

test var 1

b

interp

{“2010-01-01”:1, “2010-03-01”:100 , “2010-12-01”:110}

linear

0.4

kg

-0.20

0.10

01/01/2009

test var 1

Write code that references these variables and generates random distributions in pandas dataframes with pint-pandas units.:

repository = ParameterRepository()
TableParameterLoader(filename='./test_v2.xlsx', excel_handler='xlrd').load_into_repo(sheet_name='Sheet1',
                                                                                     repository=repository)
p = repository.get_parameter('a')

settings = {'sample_size': 3, 'times': pd.date_range('2016-01-01', '2017-01-01', freq='MS'),
            'sample_mean_value': False, 'use_time_series': True}
val = p(settings)
series = val.pint.m

Changelog

0.0.0 (2020-04-04)

  • First release on PyPI.

Release files for eam-data-tools 1.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for eam-data-tools 1.5.0
File Size Uploaded
eam-data-tools-1.5.0.tar.gz 77.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for eam-data-tools 1.5.0
File Interpreter ABI Platform
eam_data_tools-1.5.0-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 93.3 kB

Release files / eam-data-tools-1.5.0.tar.gz

Download URL eam-data-tools-1.5.0.tar.gz
Size 77.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d4506f9e1923d7974ffbdfc87b5e2cd067fcfb8cde36bae2f597bc694d75ebc1
BLAKE2b-256 checksum
How to use checksums
f3cdd9096eb58fe59df835bf2a8d618a868bdbb0ced123a3e7c82247a1860f4c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2

Release files / eam_data_tools-1.5.0-py2.py3-none-any.whl

Download URL eam_data_tools-1.5.0-py2.py3-none-any.whl
Size 15.6 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
270954a25c00fef3280cf9d1e2c18f92c9b2831820f15cd57353dead4137e0a2
BLAKE2b-256 checksum
How to use checksums
f4515ba51f259627454bc68adf29b8774bd559d43d7bbdf4407e0d9df613dd27
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2

Release history Release notifications | RSS feed

This release

1.5.0 This release

2 release files

1.4.4

2 release files

1.4.3

2 release files

1.4.2

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.2

2 release files

1.2.1

1 release file

1.2.0

1 release file

1.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page