Git Product home page Git Product logo

liquicomun's Introduction

Liquicomun lib

It provides a simple interface to reach ESIOS Liquicomun data.

Handled data:

  • Perdidas (losses)
  • Precios (prices)

Installation

pip install liquicomun

Usage

Fetch all available losses for a concrete date

It provides an iterator that handle all the available losses for the requested scenario.

For each iteration it return the related next Perdida instance (loss).

Start and end dates are mandatory.

Tariffs and subsystems list are optional, and override the default list of elements to process.

from liquicomun import Perdidas

scenario = {
    'date_start': '20171001',
    'date_end': '20171031',
    #'tariffs': ['2.0A'],                   # Optional tariffs list
    #'subsystems': ["baleares", "ceuta"],   # Optional subsystems list
}

losses = Perdidas(**scenario)

# Iterate losses
for a_loss in losses:
    current_tariff = a_loss.tariff
    current_subsystem = a_loss.subsystem
    data_matrix = a_loss.matrix
    data_version = a_loss.version

Fetch just the losses for one tariff and subsystem

It return a Loss instance

The expected tariff, start and end dates are mandatory.

Subsystem and version are optional. If no subsystem is provided will fetch the peninsular data.

from liquicomun import Perdida

scenario = {
    'date_start': '20171001',
    'date_end': '20171031',
    'tariff': '2.0A',
    #'subsystem': "baleares",              # default "" -> peninsula
}

a_loss = Perdida(**scenario)

data_matrix = a_loss.matrix
data_version = a_loss.version
current_tariff = a_loss.tariff
current_subsystem = a_loss.subsystem

liquicomun's People

Contributors

davidmunoznovoa avatar ecarreras avatar xavitorello avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

liquicomun's Issues

Losses iterator

Provide an iterator to handle all the available (in-scope) losses for a requested scenario (dates, subsystems, tariffs).

This will simplify the processal of all the available losses directly iterating a Perdidas instance.

Improve losses import method

OrakWlum only allows to import the ESIOS loss coefficients until the C3 version of each month, since later versions (from C4 to C5) do not include the fileCX_perdXXX_AAAMM01_AAAMMUU.

A good proposal to be able to use up to the C5 file, and therefore the real losses, would be to replace the way in which the losses are imported in the system.

Old method

Losses are read and imported hour by hour for each day of the month from the perdXXX_AAAMM01_AAAMMUU file downloaded from ESIOS.

Proposed method

Losses are read, calculated and imported hour by hour for each day of the month through the following formula, using the KEST and KREAL files downloaded from ESIOS:

coef_tariff= K * coef_boe

where:

  • coef_tariff is the loss coefficient that will be applied for the current tariff.
  • K is the coefficient KEST (estimated, from A1 to C2) or KREAL (real, from C3 to C5).
  • coef_boe is the percentage of loss per tariff and period set via BOE (A-2014-1052).

Refactor liquicomun Losses

Will be needed to refactor the Liquicomun Losses to provide a more pragmatic and efficient way to instantiate Losses based on a "liquicomun scenario" (dates, tariff, version, subsystem)

Implicit for #6

Provide CI

Integrate Travis-CI to ensure CI for this project.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.