Skip to main content

Package to work with data from brazilian agenci

Project description

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, wind, ...)

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 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

                         time        pr
                        1997-07-01  0.1
                        1997-07-02  0.3
                        ....
                        ...
                        ...
                        2020-01-01  0.3
                        2020-01-02  0.0

Format2

We work with datasets, to padronize, we create the function format2 that exists only when you are working with dataset files.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

AgenciBr-0.1.1.tar.gz (26.8 kB view details)

Uploaded Source

File details

Details for the file AgenciBr-0.1.1.tar.gz.

File metadata

  • Download URL: AgenciBr-0.1.1.tar.gz
  • Upload date:
  • Size: 26.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for AgenciBr-0.1.1.tar.gz
Algorithm Hash digest
SHA256 5660008e99a85256dfa2a91da3abd86e9251cb4bf52eedeac08423fa542e6482
MD5 ea37506024ba34858dbf6391a6ca8577
BLAKE2b-256 1aea1197f720c44542cd25bb6895f88ff90631f94a696b290319c66b0855fef3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page