diff --git a/docs/.doctrees/api/pyhazards.datasets.doctree b/docs/.doctrees/api/pyhazards.datasets.doctree index 8b373eb..c2298d8 100644 Binary files a/docs/.doctrees/api/pyhazards.datasets.doctree and b/docs/.doctrees/api/pyhazards.datasets.doctree differ diff --git a/docs/.doctrees/environment.pickle b/docs/.doctrees/environment.pickle index 98af61a..367ab53 100644 Binary files a/docs/.doctrees/environment.pickle and b/docs/.doctrees/environment.pickle differ diff --git a/docs/.doctrees/pyhazards_datasets.doctree b/docs/.doctrees/pyhazards_datasets.doctree index b38f078..01848d9 100644 Binary files a/docs/.doctrees/pyhazards_datasets.doctree and b/docs/.doctrees/pyhazards_datasets.doctree differ diff --git a/docs/_sources/pyhazards_datasets.rst.txt b/docs/_sources/pyhazards_datasets.rst.txt index 8cb9e6b..25c2c38 100644 --- a/docs/_sources/pyhazards_datasets.rst.txt +++ b/docs/_sources/pyhazards_datasets.rst.txt @@ -21,7 +21,7 @@ Datasets - ECMWF ERA5 reanalysis served via the `Copernicus CDS `_, providing hourly single-/pressure-level variables for benchmarks and hazard covariates; see `Hersbach et al. (2020) `_. * - :doc:`noaa_flood ` - - Flood-related event reports from the `NOAA Storm Events Database _` (time, location, impacts), commonly used for event-level labeling and impact analysis; see `NCEI record `_(C00648). + - Flood-related event reports from the `NOAA Storm Events Database `_ (time, location, impacts), commonly used for event-level labeling and impact analysis; see `NCEI record `_(C00648). * - :doc:`firms ` - Near-real-time active fire detections from `NASA FIRMS `_ (MODIS/VIIRS), used for operational monitoring and as wildfire occurrence labels; see `Schroeder et al. (2014) `_. @@ -47,17 +47,10 @@ quickly explore dataset structure and contents through a unified API. The example below demonstrates how to inspect a daily MERRA-2 file using the PyHazards dataset interface. -.. code-block:: python - - import pyhazards +.. code-block:: bash - dataset = pyhazards.datasets.MERRA2( - root="/path/to/merra2", - start_date="2024-01-01", - end_date="2024-01-31", - ) + python -m pyhazards.datasets.inspection --root /path/to/Prithvi-WxC/data/merra-2 --day 2024-01-01 - dataset.inspect(day="2024-01-01") Core classes ------------ diff --git a/docs/_static/pygments.css b/docs/_static/pygments.css index f71bfbf..041d38c 100644 --- a/docs/_static/pygments.css +++ b/docs/_static/pygments.css @@ -1,8 +1,8 @@ -.highlight pre { line-height: 125%; } -.highlight td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } -.highlight span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } -.highlight td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } -.highlight span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } .highlight .hll { background-color: #ffffcc } .highlight { background: #f8f8f8; } .highlight .c { color: #8F5902; font-style: italic } /* Comment */ @@ -81,178 +81,4 @@ .highlight .vg { color: #000 } /* Name.Variable.Global */ .highlight .vi { color: #000 } /* Name.Variable.Instance */ .highlight .vm { color: #000 } /* Name.Variable.Magic */ -.highlight .il { color: #0000CF; font-weight: bold } /* Literal.Number.Integer.Long */ -@media not print { -body[data-theme="dark"] .highlight pre { line-height: 125%; } -body[data-theme="dark"] .highlight td.linenos .normal { color: #aaaaaa; background-color: transparent; padding-left: 5px; padding-right: 5px; } -body[data-theme="dark"] .highlight span.linenos { color: #aaaaaa; background-color: transparent; padding-left: 5px; padding-right: 5px; } -body[data-theme="dark"] .highlight td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } -body[data-theme="dark"] .highlight span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } -body[data-theme="dark"] .highlight .hll { background-color: #404040 } -body[data-theme="dark"] .highlight { background: #202020; color: #D0D0D0 } -body[data-theme="dark"] .highlight .c { color: #ABABAB; font-style: italic } /* Comment */ -body[data-theme="dark"] .highlight .err { color: #A61717; background-color: #E3D2D2 } /* Error */ -body[data-theme="dark"] .highlight .esc { color: #D0D0D0 } /* Escape */ -body[data-theme="dark"] .highlight .g { color: #D0D0D0 } /* Generic */ -body[data-theme="dark"] .highlight .k { color: #6EBF26; font-weight: bold } /* Keyword */ -body[data-theme="dark"] .highlight .l { color: #D0D0D0 } /* Literal */ -body[data-theme="dark"] .highlight .n { color: #D0D0D0 } /* Name */ -body[data-theme="dark"] .highlight .o { color: #D0D0D0 } /* Operator */ -body[data-theme="dark"] .highlight .x { color: #D0D0D0 } /* Other */ -body[data-theme="dark"] .highlight .p { color: #D0D0D0 } /* Punctuation */ -body[data-theme="dark"] .highlight .ch { color: #ABABAB; font-style: italic } /* Comment.Hashbang */ -body[data-theme="dark"] .highlight .cm { color: #ABABAB; font-style: italic } /* Comment.Multiline */ -body[data-theme="dark"] .highlight .cp { color: #FF3A3A; font-weight: bold } /* Comment.Preproc */ -body[data-theme="dark"] .highlight .cpf { color: #ABABAB; font-style: italic } /* Comment.PreprocFile */ -body[data-theme="dark"] .highlight .c1 { color: #ABABAB; font-style: italic } /* Comment.Single */ -body[data-theme="dark"] .highlight .cs { color: #E50808; font-weight: bold; background-color: #520000 } /* Comment.Special */ -body[data-theme="dark"] .highlight .gd { color: #FF3A3A } /* Generic.Deleted */ -body[data-theme="dark"] .highlight .ge { color: #D0D0D0; font-style: italic } /* Generic.Emph */ -body[data-theme="dark"] .highlight .ges { color: #D0D0D0; font-weight: bold; font-style: italic } /* Generic.EmphStrong */ -body[data-theme="dark"] .highlight .gr { color: #FF3A3A } /* Generic.Error */ -body[data-theme="dark"] .highlight .gh { color: #FFF; font-weight: bold } /* Generic.Heading */ -body[data-theme="dark"] .highlight .gi { color: #589819 } /* Generic.Inserted */ -body[data-theme="dark"] .highlight .go { color: #CCC } /* Generic.Output */ -body[data-theme="dark"] .highlight .gp { color: #AAA } /* Generic.Prompt */ -body[data-theme="dark"] .highlight .gs { color: #D0D0D0; font-weight: bold } /* Generic.Strong */ -body[data-theme="dark"] .highlight .gu { color: #FFF; text-decoration: underline } /* Generic.Subheading */ -body[data-theme="dark"] .highlight .gt { color: #FF3A3A } /* Generic.Traceback */ -body[data-theme="dark"] .highlight .kc { color: #6EBF26; font-weight: bold } /* Keyword.Constant */ -body[data-theme="dark"] .highlight .kd { color: #6EBF26; font-weight: bold } /* Keyword.Declaration */ -body[data-theme="dark"] .highlight .kn { color: #6EBF26; font-weight: bold } /* Keyword.Namespace */ -body[data-theme="dark"] .highlight .kp { color: #6EBF26 } /* Keyword.Pseudo */ -body[data-theme="dark"] .highlight .kr { color: #6EBF26; font-weight: bold } /* Keyword.Reserved */ -body[data-theme="dark"] .highlight .kt { color: #6EBF26; font-weight: bold } /* Keyword.Type */ -body[data-theme="dark"] .highlight .ld { color: #D0D0D0 } /* Literal.Date */ -body[data-theme="dark"] .highlight .m { color: #51B2FD } /* Literal.Number */ -body[data-theme="dark"] .highlight .s { color: #ED9D13 } /* Literal.String */ -body[data-theme="dark"] .highlight .na { color: #BBB } /* Name.Attribute */ -body[data-theme="dark"] .highlight .nb { color: #2FBCCD } /* Name.Builtin */ -body[data-theme="dark"] .highlight .nc { color: #71ADFF; text-decoration: underline } /* Name.Class */ -body[data-theme="dark"] .highlight .no { color: #40FFFF } /* Name.Constant */ -body[data-theme="dark"] .highlight .nd { color: #FFA500 } /* Name.Decorator */ -body[data-theme="dark"] .highlight .ni { color: #D0D0D0 } /* Name.Entity */ -body[data-theme="dark"] .highlight .ne { color: #BBB } /* Name.Exception */ -body[data-theme="dark"] .highlight .nf { color: #71ADFF } /* Name.Function */ -body[data-theme="dark"] .highlight .nl { color: #D0D0D0 } /* Name.Label */ -body[data-theme="dark"] .highlight .nn { color: #71ADFF; text-decoration: underline } /* Name.Namespace */ -body[data-theme="dark"] .highlight .nx { color: #D0D0D0 } /* Name.Other */ -body[data-theme="dark"] .highlight .py { color: #D0D0D0 } /* Name.Property */ -body[data-theme="dark"] .highlight .nt { color: #6EBF26; font-weight: bold } /* Name.Tag */ -body[data-theme="dark"] .highlight .nv { color: #40FFFF } /* Name.Variable */ -body[data-theme="dark"] .highlight .ow { color: #6EBF26; font-weight: bold } /* Operator.Word */ -body[data-theme="dark"] .highlight .pm { color: #D0D0D0 } /* Punctuation.Marker */ -body[data-theme="dark"] .highlight .w { color: #666 } /* Text.Whitespace */ -body[data-theme="dark"] .highlight .mb { color: #51B2FD } /* Literal.Number.Bin */ -body[data-theme="dark"] .highlight .mf { color: #51B2FD } /* Literal.Number.Float */ -body[data-theme="dark"] .highlight .mh { color: #51B2FD } /* Literal.Number.Hex */ -body[data-theme="dark"] .highlight .mi { color: #51B2FD } /* Literal.Number.Integer */ -body[data-theme="dark"] .highlight .mo { color: #51B2FD } /* Literal.Number.Oct */ -body[data-theme="dark"] .highlight .sa { color: #ED9D13 } /* Literal.String.Affix */ -body[data-theme="dark"] .highlight .sb { color: #ED9D13 } /* Literal.String.Backtick */ -body[data-theme="dark"] .highlight .sc { color: #ED9D13 } /* Literal.String.Char */ -body[data-theme="dark"] .highlight .dl { color: #ED9D13 } /* Literal.String.Delimiter */ -body[data-theme="dark"] .highlight .sd { color: #ED9D13 } /* Literal.String.Doc */ -body[data-theme="dark"] .highlight .s2 { color: #ED9D13 } /* Literal.String.Double */ -body[data-theme="dark"] .highlight .se { color: #ED9D13 } /* Literal.String.Escape */ -body[data-theme="dark"] .highlight .sh { color: #ED9D13 } /* Literal.String.Heredoc */ -body[data-theme="dark"] .highlight .si { color: #ED9D13 } /* Literal.String.Interpol */ -body[data-theme="dark"] .highlight .sx { color: #FFA500 } /* Literal.String.Other */ -body[data-theme="dark"] .highlight .sr { color: #ED9D13 } /* Literal.String.Regex */ -body[data-theme="dark"] .highlight .s1 { color: #ED9D13 } /* Literal.String.Single */ -body[data-theme="dark"] .highlight .ss { color: #ED9D13 } /* Literal.String.Symbol */ -body[data-theme="dark"] .highlight .bp { color: #2FBCCD } /* Name.Builtin.Pseudo */ -body[data-theme="dark"] .highlight .fm { color: #71ADFF } /* Name.Function.Magic */ -body[data-theme="dark"] .highlight .vc { color: #40FFFF } /* Name.Variable.Class */ -body[data-theme="dark"] .highlight .vg { color: #40FFFF } /* Name.Variable.Global */ -body[data-theme="dark"] .highlight .vi { color: #40FFFF } /* Name.Variable.Instance */ -body[data-theme="dark"] .highlight .vm { color: #40FFFF } /* Name.Variable.Magic */ -body[data-theme="dark"] .highlight .il { color: #51B2FD } /* Literal.Number.Integer.Long */ -@media (prefers-color-scheme: dark) { -body:not([data-theme="light"]) .highlight pre { line-height: 125%; } -body:not([data-theme="light"]) .highlight td.linenos .normal { color: #aaaaaa; background-color: transparent; padding-left: 5px; padding-right: 5px; } -body:not([data-theme="light"]) .highlight span.linenos { color: #aaaaaa; background-color: transparent; padding-left: 5px; padding-right: 5px; } -body:not([data-theme="light"]) .highlight td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } -body:not([data-theme="light"]) .highlight span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } -body:not([data-theme="light"]) .highlight .hll { background-color: #404040 } -body:not([data-theme="light"]) .highlight { background: #202020; color: #D0D0D0 } -body:not([data-theme="light"]) .highlight .c { color: #ABABAB; font-style: italic } /* Comment */ -body:not([data-theme="light"]) .highlight .err { color: #A61717; background-color: #E3D2D2 } /* Error */ -body:not([data-theme="light"]) .highlight .esc { color: #D0D0D0 } /* Escape */ -body:not([data-theme="light"]) .highlight .g { color: #D0D0D0 } /* Generic */ -body:not([data-theme="light"]) .highlight .k { color: #6EBF26; font-weight: bold } /* Keyword */ -body:not([data-theme="light"]) .highlight .l { color: #D0D0D0 } /* Literal */ -body:not([data-theme="light"]) .highlight .n { color: #D0D0D0 } /* Name */ -body:not([data-theme="light"]) .highlight .o { color: #D0D0D0 } /* Operator */ -body:not([data-theme="light"]) .highlight .x { color: #D0D0D0 } /* Other */ -body:not([data-theme="light"]) .highlight .p { color: #D0D0D0 } /* Punctuation */ -body:not([data-theme="light"]) .highlight .ch { color: #ABABAB; font-style: italic } /* Comment.Hashbang */ -body:not([data-theme="light"]) .highlight .cm { color: #ABABAB; font-style: italic } /* Comment.Multiline */ -body:not([data-theme="light"]) .highlight .cp { color: #FF3A3A; font-weight: bold } /* Comment.Preproc */ -body:not([data-theme="light"]) .highlight .cpf { color: #ABABAB; font-style: italic } /* Comment.PreprocFile */ -body:not([data-theme="light"]) .highlight .c1 { color: #ABABAB; font-style: italic } /* Comment.Single */ -body:not([data-theme="light"]) .highlight .cs { color: #E50808; font-weight: bold; background-color: #520000 } /* Comment.Special */ -body:not([data-theme="light"]) .highlight .gd { color: #FF3A3A } /* Generic.Deleted */ -body:not([data-theme="light"]) .highlight .ge { color: #D0D0D0; font-style: italic } /* Generic.Emph */ -body:not([data-theme="light"]) .highlight .ges { color: #D0D0D0; font-weight: bold; font-style: italic } /* Generic.EmphStrong */ -body:not([data-theme="light"]) .highlight .gr { color: #FF3A3A } /* Generic.Error */ -body:not([data-theme="light"]) .highlight .gh { color: #FFF; font-weight: bold } /* Generic.Heading */ -body:not([data-theme="light"]) .highlight .gi { color: #589819 } /* Generic.Inserted */ -body:not([data-theme="light"]) .highlight .go { color: #CCC } /* Generic.Output */ -body:not([data-theme="light"]) .highlight .gp { color: #AAA } /* Generic.Prompt */ -body:not([data-theme="light"]) .highlight .gs { color: #D0D0D0; font-weight: bold } /* Generic.Strong */ -body:not([data-theme="light"]) .highlight .gu { color: #FFF; text-decoration: underline } /* Generic.Subheading */ -body:not([data-theme="light"]) .highlight .gt { color: #FF3A3A } /* Generic.Traceback */ -body:not([data-theme="light"]) .highlight .kc { color: #6EBF26; font-weight: bold } /* Keyword.Constant */ -body:not([data-theme="light"]) .highlight .kd { color: #6EBF26; font-weight: bold } /* Keyword.Declaration */ -body:not([data-theme="light"]) .highlight .kn { color: #6EBF26; font-weight: bold } /* Keyword.Namespace */ -body:not([data-theme="light"]) .highlight .kp { color: #6EBF26 } /* Keyword.Pseudo */ -body:not([data-theme="light"]) .highlight .kr { color: #6EBF26; font-weight: bold } /* Keyword.Reserved */ -body:not([data-theme="light"]) .highlight .kt { color: #6EBF26; font-weight: bold } /* Keyword.Type */ -body:not([data-theme="light"]) .highlight .ld { color: #D0D0D0 } /* Literal.Date */ -body:not([data-theme="light"]) .highlight .m { color: #51B2FD } /* Literal.Number */ -body:not([data-theme="light"]) .highlight .s { color: #ED9D13 } /* Literal.String */ -body:not([data-theme="light"]) .highlight .na { color: #BBB } /* Name.Attribute */ -body:not([data-theme="light"]) .highlight .nb { color: #2FBCCD } /* Name.Builtin */ -body:not([data-theme="light"]) .highlight .nc { color: #71ADFF; text-decoration: underline } /* Name.Class */ -body:not([data-theme="light"]) .highlight .no { color: #40FFFF } /* Name.Constant */ -body:not([data-theme="light"]) .highlight .nd { color: #FFA500 } /* Name.Decorator */ -body:not([data-theme="light"]) .highlight .ni { color: #D0D0D0 } /* Name.Entity */ -body:not([data-theme="light"]) .highlight .ne { color: #BBB } /* Name.Exception */ -body:not([data-theme="light"]) .highlight .nf { color: #71ADFF } /* Name.Function */ -body:not([data-theme="light"]) .highlight .nl { color: #D0D0D0 } /* Name.Label */ -body:not([data-theme="light"]) .highlight .nn { color: #71ADFF; text-decoration: underline } /* Name.Namespace */ -body:not([data-theme="light"]) .highlight .nx { color: #D0D0D0 } /* Name.Other */ -body:not([data-theme="light"]) .highlight .py { color: #D0D0D0 } /* Name.Property */ -body:not([data-theme="light"]) .highlight .nt { color: #6EBF26; font-weight: bold } /* Name.Tag */ -body:not([data-theme="light"]) .highlight .nv { color: #40FFFF } /* Name.Variable */ -body:not([data-theme="light"]) .highlight .ow { color: #6EBF26; font-weight: bold } /* Operator.Word */ -body:not([data-theme="light"]) .highlight .pm { color: #D0D0D0 } /* Punctuation.Marker */ -body:not([data-theme="light"]) .highlight .w { color: #666 } /* Text.Whitespace */ -body:not([data-theme="light"]) .highlight .mb { color: #51B2FD } /* Literal.Number.Bin */ -body:not([data-theme="light"]) .highlight .mf { color: #51B2FD } /* Literal.Number.Float */ -body:not([data-theme="light"]) .highlight .mh { color: #51B2FD } /* Literal.Number.Hex */ -body:not([data-theme="light"]) .highlight .mi { color: #51B2FD } /* Literal.Number.Integer */ -body:not([data-theme="light"]) .highlight .mo { color: #51B2FD } /* Literal.Number.Oct */ -body:not([data-theme="light"]) .highlight .sa { color: #ED9D13 } /* Literal.String.Affix */ -body:not([data-theme="light"]) .highlight .sb { color: #ED9D13 } /* Literal.String.Backtick */ -body:not([data-theme="light"]) .highlight .sc { color: #ED9D13 } /* Literal.String.Char */ -body:not([data-theme="light"]) .highlight .dl { color: #ED9D13 } /* Literal.String.Delimiter */ -body:not([data-theme="light"]) .highlight .sd { color: #ED9D13 } /* Literal.String.Doc */ -body:not([data-theme="light"]) .highlight .s2 { color: #ED9D13 } /* Literal.String.Double */ -body:not([data-theme="light"]) .highlight .se { color: #ED9D13 } /* Literal.String.Escape */ -body:not([data-theme="light"]) .highlight .sh { color: #ED9D13 } /* Literal.String.Heredoc */ -body:not([data-theme="light"]) .highlight .si { color: #ED9D13 } /* Literal.String.Interpol */ -body:not([data-theme="light"]) .highlight .sx { color: #FFA500 } /* Literal.String.Other */ -body:not([data-theme="light"]) .highlight .sr { color: #ED9D13 } /* Literal.String.Regex */ -body:not([data-theme="light"]) .highlight .s1 { color: #ED9D13 } /* Literal.String.Single */ -body:not([data-theme="light"]) .highlight .ss { color: #ED9D13 } /* Literal.String.Symbol */ -body:not([data-theme="light"]) .highlight .bp { color: #2FBCCD } /* Name.Builtin.Pseudo */ -body:not([data-theme="light"]) .highlight .fm { color: #71ADFF } /* Name.Function.Magic */ -body:not([data-theme="light"]) .highlight .vc { color: #40FFFF } /* Name.Variable.Class */ -body:not([data-theme="light"]) .highlight .vg { color: #40FFFF } /* Name.Variable.Global */ -body:not([data-theme="light"]) .highlight .vi { color: #40FFFF } /* Name.Variable.Instance */ -body:not([data-theme="light"]) .highlight .vm { color: #40FFFF } /* Name.Variable.Magic */ -body:not([data-theme="light"]) .highlight .il { color: #51B2FD } /* Literal.Number.Integer.Long */ -} -} \ No newline at end of file +.highlight .il { color: #0000CF; font-weight: bold } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/docs/api/pyhazards.datasets.html b/docs/api/pyhazards.datasets.html index ffa2e1b..1fd913d 100644 --- a/docs/api/pyhazards.datasets.html +++ b/docs/api/pyhazards.datasets.html @@ -207,17 +207,7 @@

API Reference

    -
  • Datasets -
  • +
  • Datasets
  • Models
  • Engine
  • Metrics
  • @@ -470,206 +460,14 @@

    Submodules -

    pyhazards.datasets.transforms package

    -

    Reusable transforms for preprocessing hazard datasets. -Currently placeholders; implement normalization, index computation, temporal windowing, etc.

    +
    +

    pyhazards.datasets.transforms package

    -
    -

    pyhazards.datasets.hazards package

    -

    Namespace for hazard-specific dataset loaders (earthquake, wildfire, flood, hurricane, landslide, etc.). -Populate with concrete Dataset subclasses and register them in pyhazards.datasets.registry.

    +
    +

    pyhazards.datasets.hazards package

    -
    -

    Module contents

    -
    -
    -class pyhazards.datasets.DataBundle(splits, feature_spec, label_spec, metadata=<factory>)[source]
    -

    Bases: object

    -

    Bundle of train/val/test splits plus metadata. -Keeps feature/label specs to make model construction easy.

    -
    -
    -feature_spec: FeatureSpec
    -
    - -
    -
    -get_split(name)[source]
    -
    -
    Return type:
    -

    DataSplit

    -
    -
    -
    - -
    -
    -label_spec: LabelSpec
    -
    - -
    -
    -metadata: Dict[str, Any]
    -
    - -
    -
    -splits: Dict[str, DataSplit]
    -
    - -
    - -
    -
    -class pyhazards.datasets.DataSplit(inputs, targets, metadata=<factory>)[source]
    -

    Bases: object

    -

    Container for a single split.

    -
    -
    -inputs: Any
    -
    - -
    -
    -metadata: Dict[str, Any]
    -
    - -
    -
    -targets: Any
    -
    - -
    - -
    -
    -class pyhazards.datasets.Dataset(cache_dir=None)[source]
    -

    Bases: object

    -

    Base class for hazard datasets. -Subclasses should load data and return a DataBundle with splits ready for training.

    -
    -
    -_load()[source]
    -
    -
    Return type:
    -

    DataBundle

    -
    -
    -
    - -
    -
    -load(split=None, transforms=None)[source]
    -

    Return a DataBundle. Optionally return a specific split if provided.

    -
    -
    Return type:
    -

    DataBundle

    -
    -
    -
    - -
    -
    -name: str = 'base'
    -
    - -
    - -
    -
    -class pyhazards.datasets.FeatureSpec(input_dim=None, channels=None, description=None, extra=<factory>)[source]
    -

    Bases: object

    -

    Describes input features (shapes, dtypes, normalization).

    -
    -
    -channels: Optional[int] = None
    -
    - -
    -
    -description: Optional[str] = None
    -
    - -
    -
    -extra: Dict[str, Any]
    -
    - -
    -
    -input_dim: Optional[int] = None
    -
    - -
    - -
    -
    -class pyhazards.datasets.GraphTemporalDataset(x, y, adjacency=None)[source]
    -

    Bases: Dataset

    -

    Simple container for county/day style tensors with an optional adjacency.

    -

    Each sample is a window of shape (past_days, num_counties, num_features) and a label -of shape (num_counties,).

    -
    - -
    -
    -class pyhazards.datasets.LabelSpec(num_targets=None, task_type='regression', description=None, extra=<factory>)[source]
    -

    Bases: object

    -

    Describes labels/targets for downstream tasks.

    -
    -
    -description: Optional[str] = None
    -
    - -
    -
    -extra: Dict[str, Any]
    -
    - -
    -
    -num_targets: Optional[int] = None
    -
    - -
    -
    -task_type: str = 'regression'
    -
    - -
    - -
    -
    -pyhazards.datasets.available_datasets()[source]
    -
    - -
    -
    -pyhazards.datasets.graph_collate(batch)[source]
    -

    Collate function that stacks x and adjacency if provided.

    -
    - -
    -
    -pyhazards.datasets.load_dataset(name, **kwargs)[source]
    -
    -
    Return type:
    -

    Dataset

    -
    -
    -
    - -
    -
    -pyhazards.datasets.register_dataset(name, builder)[source]
    -
    -
    Return type:
    -

    None

    -
    -
    -
    - +
    +

    Module contents

    @@ -760,50 +558,9 @@

    Submodulesregister_dataset()

-
  • pyhazards.datasets.transforms package
  • -
  • pyhazards.datasets.hazards package
  • -
  • Module contents -
  • +
  • pyhazards.datasets.transforms package
  • +
  • pyhazards.datasets.hazards package
  • +
  • Module contents
  • diff --git a/docs/api/pyhazards.html b/docs/api/pyhazards.html index 70f1053..7562793 100644 --- a/docs/api/pyhazards.html +++ b/docs/api/pyhazards.html @@ -207,17 +207,7 @@

    API Reference

    -
  • pyhazards.datasets.transforms package
  • -
  • pyhazards.datasets.hazards package
  • -
  • Module contents -
  • +
  • pyhazards.datasets.transforms package
  • +
  • pyhazards.datasets.hazards package
  • +
  • Module contents
  • pyhazards.models package + @@ -635,8 +607,6 @@

    I

  • input_dim (pyhazards.datasets.base.FeatureSpec attribute)
  • @@ -645,8 +615,6 @@

    I

  • inputs (pyhazards.datasets.base.DataSplit attribute)
  • @@ -662,15 +630,11 @@

    L

  • LabelSpec (class in pyhazards)
  • @@ -680,15 +644,11 @@

    L

  • load_dataset() (in module pyhazards)
  • @@ -706,10 +666,6 @@

    M

  • (pyhazards.datasets.base.DataBundle attribute)
  • (pyhazards.datasets.base.DataSplit attribute) -
  • -
  • (pyhazards.datasets.DataBundle attribute) -
  • -
  • (pyhazards.datasets.DataSplit attribute)
  • (pyhazards.DataSplit attribute)
  • @@ -733,16 +689,10 @@

    M

    - -
    • pyhazards.engine.trainer @@ -891,6 +814,8 @@

      P

    • module
    + + - - + + -