Este analisis tiene como propósito entrar a profundidad dentro de las capacidades de R en los aspectos de análisis de datos. En este caso se evalua a profundidad la capacidad de buscar terminos en bases de datos sujetadas de APIs, esto en el caso de la estación del clima alrededor del mundo proveida por ASOS..

Instalar programas requeridos

library(riem)
library(tidyverse)
## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.2 ──
## ✔ ggplot2 3.3.6      ✔ purrr   0.3.4 
## ✔ tibble  3.1.8      ✔ dplyr   1.0.10
## ✔ tidyr   1.2.1      ✔ stringr 1.4.1 
## ✔ readr   2.1.2      ✔ forcats 0.5.2 
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
library(lubridate)
## 
## Attaching package: 'lubridate'
## 
## The following objects are masked from 'package:base':
## 
##     date, intersect, setdiff, union
library(ggplot2)
library(plotly)
## 
## Attaching package: 'plotly'
## 
## The following object is masked from 'package:ggplot2':
## 
##     last_plot
## 
## The following object is masked from 'package:stats':
## 
##     filter
## 
## The following object is masked from 'package:graphics':
## 
##     layout

Se describen los procesos a continuación para poder buscar informacion respectiva al clima en distintos lugares alrededor del mundo utilizando el extractor de información de la base de datos de ASOS. Identificando primero la red a conectar, despues la estacion, el ID y finalmente el periodo de tiempo correspondiente.

Este buscador permite la busqueda de cantidad de lluvia , unicamente disponible para las estaciones en USA

Paso 1. Buscar la red

Ejemplo: TEXAS, y copiar CODE

view(riem_networks())

Paso 2. Buscar la estación (ciudad)

Ejemplo: Atlanta

view(riem_stations("TX_ASOS"))

Paso 3. Escribir ID

atlanta <- riem_measures("ATA")
str(atlanta)
## tibble [8,035 × 32] (S3: tbl_df/tbl/data.frame)
##  $ station          : chr [1:8035] "ATA" "ATA" "ATA" "ATA" ...
##  $ valid            : POSIXct[1:8035], format: "2022-05-19 10:55:00" "2022-05-19 12:35:00" ...
##  $ lon              : num [1:8035] -94.2 -94.2 -94.2 -94.2 -94.2 ...
##  $ lat              : num [1:8035] 33.1 33.1 33.1 33.1 33.1 ...
##  $ tmpf             : num [1:8035] 71.1 71.6 72.1 73.2 74.5 75.9 77.4 79.2 79.9 80.6 ...
##  $ dwpf             : num [1:8035] 69.6 70 70 70.3 70.7 71.2 71.4 71.4 70.3 70.5 ...
##  $ relh             : num [1:8035] 95 94.7 93.1 90.6 88 ...
##  $ drct             : num [1:8035] 180 180 160 170 180 200 220 220 210 190 ...
##  $ sknt             : num [1:8035] 5 5 5 5 10 5 9 10 9 11 ...
##  $ p01i             : num [1:8035] 0 0 0 0 0 0 0 0 0 0 ...
##  $ alti             : num [1:8035] 29.8 29.8 29.8 29.8 29.8 ...
##  $ mslp             : num [1:8035] 1000 1000 1000 1000 1000 ...
##  $ vsby             : num [1:8035] 10 10 10 10 10 10 10 10 10 10 ...
##  $ gust             : num [1:8035] NA NA NA NA NA NA NA 15 NA 17 ...
##  $ skyc1            : chr [1:8035] "CLR" "CLR" "CLR" "CLR" ...
##  $ skyc2            : chr [1:8035] NA NA NA NA ...
##  $ skyc3            : chr [1:8035] NA NA NA NA ...
##  $ skyc4            : chr [1:8035] NA NA NA NA ...
##  $ skyl1            : num [1:8035] NA NA NA NA 1600 1500 1600 2000 2400 2500 ...
##  $ skyl2            : num [1:8035] NA NA NA NA NA NA NA NA NA NA ...
##  $ skyl3            : num [1:8035] NA NA NA NA NA NA NA NA NA NA ...
##  $ skyl4            : num [1:8035] NA NA NA NA NA NA NA NA NA NA ...
##  $ wxcodes          : chr [1:8035] NA NA NA NA ...
##  $ ice_accretion_1hr: logi [1:8035] NA NA NA NA NA NA ...
##  $ ice_accretion_3hr: logi [1:8035] NA NA NA NA NA NA ...
##  $ ice_accretion_6hr: logi [1:8035] NA NA NA NA NA NA ...
##  $ peak_wind_gust   : num [1:8035] NA NA NA NA NA NA NA NA NA NA ...
##  $ peak_wind_drct   : num [1:8035] NA NA NA NA NA NA NA NA NA NA ...
##  $ peak_wind_time   : chr [1:8035] NA NA NA NA ...
##  $ feel             : num [1:8035] 71.1 71.6 72.1 73.2 74.5 ...
##  $ metar            : chr [1:8035] "KATA 191055Z AUTO 18005KT 10SM CLR 22/21 A2981 RMK AO2 SLP995 T02170209 $" "KATA 191235Z AUTO 18005KT 10SM CLR 22/21 A2983 RMK AO2 SLP001 T02200211 $" "KATA 191255Z AUTO 16005KT 10SM CLR 22/21 A2982 RMK AO2 SLP998 T02230211 $" "KATA 191315Z AUTO 17005KT 10SM CLR 23/21 A2982 RMK AO2 SLP997 T02290213 $" ...
##  $ snowdepth        : logi [1:8035] NA NA NA NA NA NA ...

Paso 4. Información

Extraer información de este mes

este_mes <- subset(atlanta, valid >= as.POSIXct("2022-09-01 00:00") & valid <= as.POSIXct("2022-09-18 23:59"))

Paso 5. Graficar

plot(este_mes$valid, este_mes$relh)