-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
64 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
from typing import Optional | ||
from pydantic import BaseModel | ||
import pandas as pd | ||
from datetime import date | ||
|
||
from sentier_data_tools.iri import ProductIRI, GeonamesIRI | ||
|
||
|
||
class Demand(BaseModel): | ||
product_iri: ProductIRI | ||
properties: Optional[list] | ||
amount: float | ||
spatial_context: GeonamesIRI = GeonamesIRI("https://sws.geonames.org/6295630/") | ||
begin_date: Optional[date] = None | ||
end_date: Optional[date] = None | ||
|
||
|
||
class RunConfig(BaseModel): | ||
num_samples: int = 1000 | ||
|
||
|
||
class SentierModel: | ||
def __init__(self, demand: Demand, run_config: RunConfig): | ||
self.demand = demand | ||
self.run_config = run_config | ||
if self.run_config.begin_date is None: | ||
self.run_config.begin_date = date(date.today().year - 5, 1, 1) | ||
if self.run_config.end_date is None: | ||
self.run_config.end_date = date(date.today().year + 5, 1, 1) | ||
|
||
def get_model_data(self) -> list[pd.DataFrame]: | ||
pass | ||
|
||
def prepare(self) -> None: | ||
self.get_model_data() | ||
self.data_validity_checks() | ||
self.resample() | ||
|
||
def run(self) -> list[Demand]: | ||
pass | ||
|
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
from sentier_data_tools import ProductIRI | ||
|