Skip to main content

Generates random Oil and Gas Data

Project description

ZOil

Language License Version

ZOil is a python library used to generate random Oil and Gas data. Most Oil and Gas data is either propreitary or costly to aquire. ZOil lets you quickly generate an unlimited amount of production data that can be used to for testing, anonymization and much more. ZOil was inspired by the Faker library.

Installation

pip install zoil

Usage

ZOil generates random production data using the get_production_data shown below with default keyword arguements

zoil.get_production_data(start_date=datetime(year=1950,month=1,day=1), end_date=datetime.now(), qio_min=100, qio_max=2500, qig_min=500, qig_max=5000, qiw_min=100, qiw_max=2500)

"""
get_production_data generates a dictionary containing random production data.

:param granularity: 'monthly' | 'daily' Granularity of data
:param start_date: The start date of the production history
:param end_date: The end date of the production history
:param qio_min: The minimum initial oil production rate
:param qio_max: The maximum initial oil production rate
:param qig_min: The minimum initial gas production rate
:param qig_max: The maximum initial gas production rate
:param qiw_min: The minimum initial water production rate
:param qiw_max: The maximum initial water production rate
:return: A dictionary containing random production data
"""

See the example below to visualize a random wells production decline curve using pandas and matplotlib

from zoil import get_production_data
import matplotlib.pyplot as plt
import pandas as pd

production_data = get_production_data()

df = pd.DataFrame(production_data)

df.plot(x='date'
        , y=['oil', 'gas', 'water']
        , color=['green','red','blue']
        , title='Production History for a Random Well'
        , xlabel='Date'
        , ylabel='Production'
    )

plt.show()

Each time the get_production_data function is called a new dictionary of production data will be generated. The occasional halts in production are to represent workovers where the well is shut-in for repair for sometime.

To Do

  • Make data more chaotic and realistic

  • Create more keyword arguements

  • Create new functions for other types of data (drilling, logging, etc.)

Contribute

For any bugs, issues, suggestions please create an Issue or a Pull Request.

License

ZOil is released under the MIT License. See the bundled LICENSE file for details.

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

zoil-0.0.4.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

zoil-0.0.4-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file zoil-0.0.4.tar.gz.

File metadata

  • Download URL: zoil-0.0.4.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.61.1 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.3 CPython/3.9.5

File hashes

Hashes for zoil-0.0.4.tar.gz
Algorithm Hash digest
SHA256 2c4ce3f756e35b4bc9f511a8818db77b3bb08554103a5afafe79ad2af8e72ae5
MD5 7011fc516dc1c7818ce168b31ef7e020
BLAKE2b-256 8e10be9ebdde389b773b8da446005f30528217436b3e0e1a137e292da8e468d5

See more details on using hashes here.

File details

Details for the file zoil-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: zoil-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.61.1 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.3 CPython/3.9.5

File hashes

Hashes for zoil-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ee0f2b147f4f073600d4b92f386dde58833ffd68d26bedbcc5bb052c05f21558
MD5 cfcde9cff67a47bbda115ca6981b279b
BLAKE2b-256 c325deadd92b77b97672f0793c346ea7606c3571b665a3fa7b8ea477c8ecc878

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