Code Monkey home page Code Monkey logo

cptec's Introduction

cptec

CRAN_Status_Badge CRAC_Downloads

The goal of cptec is to allows the user to retrieve data from the CPTEC/INPE weather forecast API. CPTEC stands for 'Centro de Previsão de Tempo e Estudos Climáticos' and INPE for 'Instituto Nacional de Pesquisas Espaciais'. CPTEC is the most advanced numerical weather and climate forecasting center in Latin America, with high-precision short and medium-term weather forecasting since the beginning of 1995. See http://www.cptec.inpe.br/ for more information.

Installation

Install the release version from CRAN:

install.packages("cptec")

or the development version from github

# install.packages("devtools")
devtools::install_github("rpradosiqueira/cptec")

Functions

The "cptec" package contains the functions:

prev4dias          It retrieve 4 days weather forecast data
                   according to the 'id' provided
                   
prev7dias          It retrieve 7 days weather forecast data
                   according to the 'id' provided
                   
listaCidades       It allows the user to discover which are
                   the city`s ID of interest

metar              It allows the user to retrieve data from
                   airport surface stations
                   
ondas              It allows the user to retrieve data from
                   sea waves
                   
prevEstendida      It retrieve 14 days weather forecast data
                   according to the 'id' provided
                    
prevLatLon         It retrieve 7 days weather forecast data
                   according to the latitude/longitude provided
                   
estendidaLatLon    It retrieve 14 days weather forecast data
                   according to the latitude/longitude provided
                   
iuv                It retrieve the last updated data from CPTEC/INPE
                   ultra violet index for a determined city
                   
estacoes_metar     List "Metar" initials and descriptions

condicoes_tempo    List "tempo" descriptions

capitais           It allows the user to retrieve data from
                   current weather conditions of capitals

Example

Let's assume that we want the next 7 days weather forecast for the city of Rio de Janeiro/RJ. To do this simply execute:

library(cptec)

prev7dias(id = 241)
#>           cidade uf atualizacao        dia tempo maxima minima iuv
#> 1 Rio de Janeiro RJ  2017-09-21 2017-09-22    vn     33     17   9
#> 2 Rio de Janeiro RJ  2017-09-21 2017-09-23    pn     33     18   9
#> 3 Rio de Janeiro RJ  2017-09-21 2017-09-24    vn     35     17   9
#> 4 Rio de Janeiro RJ  2017-09-21 2017-09-25    pn     27     17   9
#> 5 Rio de Janeiro RJ  2017-09-21 2017-09-26    vn     31     17   9
#> 6 Rio de Janeiro RJ  2017-09-21 2017-09-27    vn     32     17   9

cptec's People

Contributors

rpradosiqueira avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.