AgenciBr


NameAgenciBr JSON
Version 0.1.8 PyPI version JSON
download
home_page
SummaryPackage to work with data from brazilian agenci
upload_time2023-07-16 22:58:53
maintainer
docs_urlNone
authorThiago Santos
requires_python
licenseMIT License
keywords ana inemet ideam
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # AgenciBr

> The objective is create a package that help to usa data of **Agencia Nacional de Águas (ANA)**, **Instituto Nacional de Meteorologia (INEMET)**, **Merge**, **Brazilian Daily Weather Gridded Data (BR-DWGD)** and **Instituto de Hidrología, Meteorología y Estudios Ambientales (IDEAM)**. All the data above is from Brazil, minus the **IDEAM** that is from Colombia.
 
 - **ANA** [https://www.gov.br/ana/pt-br] or [https://www.snirh.gov.br/hidroweb/apresentacao]
 - **INEMET** [https://portal.inmet.gov.br]
 - **MERGE** [http://ftp.cptec.inpe.br/modelos/tempo/MERGE/GPM/DAILY/]
 - **BR-DWGD** [https://github.com/AlexandreCandidoXavier/BR-DWGD]
 - **IDEAM** [http://www.ideam.gov.co]

**Usage**
> pip install AgenciBr  

In python:

**Import Ana**
```python
from AgenciBr import Ana.Ana
data = Ana.Ana('path file')

""" Properties """
data.dataset # return the dataset

data.code #Return the 

data.startdate #return the first date from dataset

data.enddate  #return the end date from dataset

data.len #return the length from dataset

data.type_data #return the data informations (precipitation, temperature, t_maxmin, wind, ...)

data.type #return if data is original, format1, format2 ...
```

**Import Inemet**

```python
from AgenciBr import Inemet

data = Inemet.Inemet('path file')
```

   **Import Merge**
 ```python
 from AgenciBr import Merge

data = Merge.Merge('path file')
 ```
 
 **Import Alexandre**
 ```python
 from AgenciBr import Alexandre

data = Alexandre.Alexandre('path file')
 ```
 
**Import Ideam**

```python
from AgenciBr import Ideam

data = Ideam.Ideam('path file')
```

**Suported functions**

|Agenci| Precipitacion | vazão | Temperature(mean) | Temperature (minimun, maximum)|
|------|---------------|-------|-------------------|-------------------------------|
| Ana  | [x]           |[ ]    |      [ ]          |            [ ]                |
|Inemet|      [x]      |       |      [x]          |                               |
|Merge |   [ ]         | [ ]   |      [ ]          |            [ ]                |
|Alexandre|  [ ]       |  [ ]  |       [ ]         |     [ ]                       |
| Ideam|  [ ]          | [ ]   |        [ ]        |        [ ]                    |
 

From internal function we construct function1, functon2

  
 
 
### Internal functions

## Format1
We work with distints data and dataframe models, bacause this, was create the function format1 in each agenci.
This function have three param:
- **Comma_to_dot**: change the comma of all file to dot and to float number
- **grow**: Change the dataframe from de lower to larger
- **years**: is a vector of two numbers (year1, year2) that you wish be the start and end, the year can be the future

**The principal objective of this function is**
1) put date that can be jumped
2) organize the file from to smaler to larger based in time 
3) Change the ',' to '.'
4) Remove same values from file
5) Change the name of time variable to time
6) padronize a file to work with Ana, Inemet, Merge and etc
7) have option to select a series of year start and year end. The date that not exist, are created and set NaN

**The outfile have format precipitation**
```python
                         time        pr
                        1997-07-01  0.1
                        1997-07-02  0.3
                        ....
                        ...
                        ...
                        2020-01-01  0.3
                        2020-01-02  0.0

```
**The outfile have format temperature**
```python
                                time   max   min
                    0     1961-01-01   NaN   NaN
                    1     1961-01-02   NaN   NaN
                    2     1961-01-03   NaN   NaN
                    3     1961-01-04   NaN   NaN
                    4     1961-01-05   NaN   NaN
                    ...          ...   ...   ...
                    22276 2021-12-28  28.7  21.6
                    22277 2021-12-29  29.3  21.6
                    22278 2021-12-30  26.9  21.8
                    22279 2021-12-31  32.3  21.6
                    22280 2022-01-01  27.6  23.8
                    
                    [22281 rows x 3 columns]
```
## Format2
We work with datasets, to padronize, we create the function format2 that exists only when you are working with dataset files.

### Climate Indices

| Indices | Ana | Inemet | Xavier | Merge | IDEAM |
| ------- | --- | ------ | ------ | ----- | ----- |
| TXX     |     | [X]    |        |       |    [X]   |
| TNX     |     | [X]    |        |       | [X]      |
| TX90P   |     | [X]    |        |       |     [X]  |
| TN90P   |     | [X]    |        |       |     [X]  |
| CDD     | [X] |        |        |       |       |
| CWD     | [X] |        |        |       |      |
| PRCPTOT | [X] |        |        |       |     [X]  |
| RX5DAY  | [X] |        |        |       |   [X]    |
| TN10P   |     |        |        |       |       |
| FD      |     |        |        |       |       |
| SU      |     |        |        |       |       |
| ETR     |     |        |        |       |       |
| RNNMM   |     |        |        |       |       |
| R99P    |     |        |        |       |       |
| R95P    |     |        |        |       |       |
| R10MM   |     |        |        |       |       |
| R20MM   |     |        |        |       |       |
| R99PTOT |     |        |        |       |       |





            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "AgenciBr",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "Ana,Inemet,Ideam",
    "author": "Thiago Santos",
    "author_email": "tthiagosantos38@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/de/0a/368f15638c57532b3e75b268a39910f8809f041abdac6b3f1e641e11ed1f/AgenciBr-0.1.8.tar.gz",
    "platform": null,
    "description": "# AgenciBr\n\n> The objective is create a package that help to usa data of **Agencia Nacional de \u00c1guas (ANA)**, **Instituto Nacional de Meteorologia (INEMET)**, **Merge**, **Brazilian Daily Weather Gridded Data (BR-DWGD)** and **Instituto de Hidrolog\u00eda, Meteorolog\u00eda y Estudios Ambientales (IDEAM)**. All the data above is from Brazil, minus the **IDEAM** that is from Colombia.\n \n - **ANA** [https://www.gov.br/ana/pt-br] or [https://www.snirh.gov.br/hidroweb/apresentacao]\n - **INEMET** [https://portal.inmet.gov.br]\n - **MERGE** [http://ftp.cptec.inpe.br/modelos/tempo/MERGE/GPM/DAILY/]\n - **BR-DWGD** [https://github.com/AlexandreCandidoXavier/BR-DWGD]\n - **IDEAM** [http://www.ideam.gov.co]\n\n**Usage**\n> pip install AgenciBr  \n\nIn python:\n\n**Import Ana**\n```python\nfrom AgenciBr import Ana.Ana\ndata = Ana.Ana('path file')\n\n\"\"\" Properties \"\"\"\ndata.dataset # return the dataset\n\ndata.code #Return the \n\ndata.startdate #return the first date from dataset\n\ndata.enddate  #return the end date from dataset\n\ndata.len #return the length from dataset\n\ndata.type_data #return the data informations (precipitation, temperature, t_maxmin, wind, ...)\n\ndata.type #return if data is original, format1, format2 ...\n```\n\n**Import Inemet**\n\n```python\nfrom AgenciBr import Inemet\n\ndata = Inemet.Inemet('path file')\n```\n\n   **Import Merge**\n ```python\n from AgenciBr import Merge\n\ndata = Merge.Merge('path file')\n ```\n \n **Import Alexandre**\n ```python\n from AgenciBr import Alexandre\n\ndata = Alexandre.Alexandre('path file')\n ```\n \n**Import Ideam**\n\n```python\nfrom AgenciBr import Ideam\n\ndata = Ideam.Ideam('path file')\n```\n\n**Suported functions**\n\n|Agenci| Precipitacion | vaz\u00e3o | Temperature(mean) | Temperature (minimun, maximum)|\n|------|---------------|-------|-------------------|-------------------------------|\n| Ana  | [x]           |[ ]    |      [ ]          |            [ ]                |\n|Inemet|      [x]      |       |      [x]          |                               |\n|Merge |   [ ]         | [ ]   |      [ ]          |            [ ]                |\n|Alexandre|  [ ]       |  [ ]  |       [ ]         |     [ ]                       |\n| Ideam|  [ ]          | [ ]   |        [ ]        |        [ ]                    |\n \n\nFrom internal function we construct function1, functon2\n\n  \n \n \n### Internal functions\n\n## Format1\nWe work with distints data and dataframe models, bacause this, was create the function format1 in each agenci.\nThis function have three param:\n- **Comma_to_dot**: change the comma of all file to dot and to float number\n- **grow**: Change the dataframe from de lower to larger\n- **years**: is a vector of two numbers (year1, year2) that you wish be the start and end, the year can be the future\n\n**The principal objective of this function is**\n1) put date that can be jumped\n2) organize the file from to smaler to larger based in time \n3) Change the ',' to '.'\n4) Remove same values from file\n5) Change the name of time variable to time\n6) padronize a file to work with Ana, Inemet, Merge and etc\n7) have option to select a series of year start and year end. The date that not exist, are created and set NaN\n\n**The outfile have format precipitation**\n```python\n                         time        pr\n                        1997-07-01  0.1\n                        1997-07-02  0.3\n                        ....\n                        ...\n                        ...\n                        2020-01-01  0.3\n                        2020-01-02  0.0\n\n```\n**The outfile have format temperature**\n```python\n                                time   max   min\n                    0     1961-01-01   NaN   NaN\n                    1     1961-01-02   NaN   NaN\n                    2     1961-01-03   NaN   NaN\n                    3     1961-01-04   NaN   NaN\n                    4     1961-01-05   NaN   NaN\n                    ...          ...   ...   ...\n                    22276 2021-12-28  28.7  21.6\n                    22277 2021-12-29  29.3  21.6\n                    22278 2021-12-30  26.9  21.8\n                    22279 2021-12-31  32.3  21.6\n                    22280 2022-01-01  27.6  23.8\n                    \n                    [22281 rows x 3 columns]\n```\n## Format2\nWe work with datasets, to padronize, we create the function format2 that exists only when you are working with dataset files.\n\n### Climate Indices\n\n| Indices | Ana | Inemet | Xavier | Merge | IDEAM |\n| ------- | --- | ------ | ------ | ----- | ----- |\n| TXX     |     | [X]    |        |       |    [X]   |\n| TNX     |     | [X]    |        |       | [X]      |\n| TX90P   |     | [X]    |        |       |     [X]  |\n| TN90P   |     | [X]    |        |       |     [X]  |\n| CDD     | [X] |        |        |       |       |\n| CWD     | [X] |        |        |       |      |\n| PRCPTOT | [X] |        |        |       |     [X]  |\n| RX5DAY  | [X] |        |        |       |   [X]    |\n| TN10P   |     |        |        |       |       |\n| FD      |     |        |        |       |       |\n| SU      |     |        |        |       |       |\n| ETR     |     |        |        |       |       |\n| RNNMM   |     |        |        |       |       |\n| R99P    |     |        |        |       |       |\n| R95P    |     |        |        |       |       |\n| R10MM   |     |        |        |       |       |\n| R20MM   |     |        |        |       |       |\n| R99PTOT |     |        |        |       |       |\n\n\n\n\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "Package to work with data from brazilian agenci",
    "version": "0.1.8",
    "project_urls": null,
    "split_keywords": [
        "ana",
        "inemet",
        "ideam"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "de0a368f15638c57532b3e75b268a39910f8809f041abdac6b3f1e641e11ed1f",
                "md5": "02c807137a574beaaa5cf06735849633",
                "sha256": "69bf90cb8fb52b9d91d8024e41116c3194247250bb3d7598c9314ac8d691d3ef"
            },
            "downloads": -1,
            "filename": "AgenciBr-0.1.8.tar.gz",
            "has_sig": false,
            "md5_digest": "02c807137a574beaaa5cf06735849633",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 27169,
            "upload_time": "2023-07-16T22:58:53",
            "upload_time_iso_8601": "2023-07-16T22:58:53.878955Z",
            "url": "https://files.pythonhosted.org/packages/de/0a/368f15638c57532b3e75b268a39910f8809f041abdac6b3f1e641e11ed1f/AgenciBr-0.1.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-16 22:58:53",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "agencibr"
}
        
Elapsed time: 0.12534s