Skip to main content

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

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

from AgenciBr import Inemet

data = Inemet.Inemet('path file')

Import Merge

from AgenciBr import Merge

data = Merge.Merge('path file')

Import Alexandre

from AgenciBr import Alexandre

data = Alexandre.Alexandre('path file')

Import Ideam

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

                         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

                                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

Metadata

Release files for AgenciBr 0.1.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for AgenciBr 0.1.8
File Size Uploaded Provenance
AgenciBr-0.1.8.tar.gz 27.2 kB Without provenance Details

Release files / AgenciBr-0.1.8.tar.gz

Download URL AgenciBr-0.1.8.tar.gz
Size 27.2 kB
Tags Source
SHA-256 checksum
How to use checksums
69bf90cb8fb52b9d91d8024e41116c3194247250bb3d7598c9314ac8d691d3ef
BLAKE2b-256 checksum
How to use checksums
de0a368f15638c57532b3e75b268a39910f8809f041abdac6b3f1e641e11ed1f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.7

Security for AgenciBr 0.1.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page