rp5pik

Download And Preprocess Russian Meteorological Data

https://github.com/atsyplenkov/rp5pik

Science Score: 49.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 3 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.2%) to scientific vocabulary
Last synced: 6 months ago · JSON representation

Repository

Download And Preprocess Russian Meteorological Data

Basic Info
  • Host: GitHub
  • Owner: atsyplenkov
  • License: other
  • Language: R
  • Default Branch: master
  • Size: 2.46 MB
Statistics
  • Stars: 3
  • Watchers: 2
  • Forks: 0
  • Open Issues: 0
  • Releases: 2
Created about 3 years ago · Last pushed over 2 years ago
Metadata Files
Readme Changelog License Codemeta

README.Rmd

---
output: github_document
editor_options: 
  chunk_output_type: inline
---



```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

Sys.setlocale(category = "LC_TIME", locale = "en_us")
```

# rp5pik 


[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.8090329.svg)](https://doi.org/10.5281/zenodo.8090329)
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![pkgcheck](https://github.com/atsyplenkov/rp5pik/workflows/pkgcheck/badge.svg)](https://github.com/atsyplenkov/rp5pik/actions?query=workflow%3Apkgcheck)
[![CRAN status](https://www.r-pkg.org/badges/version/rp5pik)](https://CRAN.R-project.org/package=rp5pik)
![GitHub R package version](https://img.shields.io/github/r-package/v/atsyplenkov/rp5pik?label=github)
![GitHub last commit](https://img.shields.io/github/last-commit/atsyplenkov/rp5pik)


The `rp5pik` package provides a set of functions to download and preprocess meteorological data from http://www.pogodaiklimat.ru/

## Installation

You can install the development version of rp5pik from [GitHub](https://github.com/) with:

``` r
# install.packages("devtools")
devtools::install_github("atsyplenkov/rp5pik")

# OR

# install.packages("remotes")
remotes::install_github("atsyplenkov/rp5pik")
```

## Examples
### 1. Data download 

Below is an example for `rp_parse_pik` functions. It allows you to download meteo data at **3-hour** temporal resolution for various stations using their WMO ID from [http://www.pogodaiklimat.ru/](http://www.pogodaiklimat.ru/):

```{r example}
library(rp5pik)

example <-
  rp_parse_pik(
    wmo_id = c("20069", "27524"),
    start_date = "2022-05-01",
    end_date = "2022-05-31"
  )

example
```

List of available variables:

- `wmo`
character. WMO index of the meteostation

- `datetime_utc`
POSIXct. Date and Time of the measurement at UTC

- `ta`
numeric. Air temperature at 2m above the surface, °C

- `td`
numeric. Dew point, °C

- `rh`
numeric. Relative humidity at 2m above the surface, %

- `ps`
numeric. Atmosphere pressure at meteostation, hPa

- `psl`
numeric. Atmosphere pressure adjusted to the height of mean sea level, hPa

- `prec`
numeric. Cumulative precipitation for the last 12 hours, mm

- `windd`
integer. Wind direction, deg

- `winds_mean`
numeric. Average 10-min wind speed, m/s

- `winds_max`
numeric. Maximum wind speed, m/s

We can visualize the `example` dataset using `ggplot2` as follows:
```{r plot, fig.align='center', dpi=1000, fig.width=7, fig.height=5, out.width='80%'}
library(ggplot2)

example |> 
  ggplot(
    aes(
      x = datetime_utc,
      y = ta,
      group = wmo
    )
  ) +
  geom_line(aes(color = wmo)) +
  labs(
    x = "",
    y = "Average Temperature, °C"
  ) +
  theme_minimal()

```

### 2. Data preprocessing
Since the downloaded with `rp_parse_pik` data contains raw data, it requires additional checking and cleaning. We suggest to explore the raw dataset by yourselves before any further manipulations.

However, the `rp5pik` package has a function to aggregate raw data on daily (`24h`) or semi-daily (`12h`) periods. The `rp_aggregate_pik` function removes known error codes from precipitation data (`699` values). Additionally, it calculates daily precipitation sums based on measured precipitation at 06 UTC and 18 UTC in European part of Russia (see [meteostation manuals for more info](https://method.meteorf.ru/ansambl/pojasnenijaansambl.html)). 

⚠ As of `r Sys.Date()` this function  works only with Moscow timezone.

This is how you can aggregate data daily:
```{r aggregate, message=FALSE, warning=FALSE}
library(dplyr)

example_daily <- 
  example |> 
  rp_aggregate_pik(.period = "24h") |> 
  group_split(wmo)

example_daily

```

Or semi-daily:

```{r aggregate_12, message=FALSE, warning=FALSE}
library(dplyr)

example_12h <- 
  example |> 
  rp_aggregate_pik(.period = "12h", .tz = "Europe/Moscow") |> 
  group_split(wmo)

example_12h

```


## Roadmap
```
rp5pik 📦
├── Parser functions for
│   ├── pogodaiklimat
│   │   ├── rp5pik::rp_parse_pik ✅
│   │   └── rp5pik::rp_aggregate_pik ✅
│   ├── rp5 🔲
│   └── gmvo.skniivh 🔲
├── WMO stations coordinates  🔲
└── Rain/Snow guessing  
    └── rp5pik::rp_get_temp50 ✅
```

Owner

  • Name: Anatolii Tsyplenkov
  • Login: atsyplenkov
  • Kind: user
  • Location: New Zealand
  • Company: @manaakiwhenua

Scientist-Geomorphologist and Research Software Engineer, fond of all things geospatial

CodeMeta (codemeta.json)

{
  "@context": "https://doi.org/10.5063/schema/codemeta-2.0",
  "@type": "SoftwareSourceCode",
  "identifier": "rp5pik",
  "description": "This package provides a set of functions to download and preprocess meteorological data from http://www.pogodaiklimat.ru/.",
  "name": "rp5pik: Download And Preprocess Russian Meteorological Data",
  "codeRepository": "https://github.com/atsyplenkov/rp5pik",
  "issueTracker": "https://github.com/atsyplenkov/rp5pik/issues",
  "license": "https://spdx.org/licenses/MIT",
  "version": "0.0.2",
  "programmingLanguage": {
    "@type": "ComputerLanguage",
    "name": "R",
    "url": "https://r-project.org"
  },
  "runtimePlatform": "R version 4.2.2 (2022-10-31 ucrt)",
  "author": [
    {
      "@type": "Person",
      "givenName": "Anatoly",
      "familyName": "Tsyplenkov",
      "email": "atsyplenkov@gmail.com",
      "@id": "https://orcid.org/0000-0003-4144-8402"
    }
  ],
  "maintainer": [
    {
      "@type": "Person",
      "givenName": "Anatoly",
      "familyName": "Tsyplenkov",
      "email": "atsyplenkov@gmail.com",
      "@id": "https://orcid.org/0000-0003-4144-8402"
    }
  ],
  "softwareRequirements": {
    "1": {
      "@type": "SoftwareApplication",
      "identifier": "R",
      "name": "R",
      "version": ">= 4.1.0"
    },
    "2": {
      "@type": "SoftwareApplication",
      "identifier": "cli",
      "name": "cli",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=cli"
    },
    "3": {
      "@type": "SoftwareApplication",
      "identifier": "dplyr",
      "name": "dplyr",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=dplyr"
    },
    "4": {
      "@type": "SoftwareApplication",
      "identifier": "lifecycle",
      "name": "lifecycle",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=lifecycle"
    },
    "5": {
      "@type": "SoftwareApplication",
      "identifier": "lubridate",
      "name": "lubridate",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=lubridate"
    },
    "6": {
      "@type": "SoftwareApplication",
      "identifier": "purrr",
      "name": "purrr",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=purrr"
    },
    "7": {
      "@type": "SoftwareApplication",
      "identifier": "rvest",
      "name": "rvest",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=rvest"
    },
    "8": {
      "@type": "SoftwareApplication",
      "identifier": "stringr",
      "name": "stringr",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=stringr"
    },
    "9": {
      "@type": "SoftwareApplication",
      "identifier": "terra",
      "name": "terra",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=terra"
    },
    "10": {
      "@type": "SoftwareApplication",
      "identifier": "tibble",
      "name": "tibble",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=tibble"
    },
    "11": {
      "@type": "SoftwareApplication",
      "identifier": "tidyr",
      "name": "tidyr",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=tidyr"
    },
    "SystemRequirements": null
  },
  "fileSize": "2120.039KB",
  "releaseNotes": "https://github.com/atsyplenkov/rp5pik/blob/master/NEWS.md",
  "readme": "https://github.com/atsyplenkov/rp5pik/blob/master/README.md",
  "contIntegration": "https://github.com/atsyplenkov/rp5pik/actions?query=workflow%3Apkgcheck",
  "developmentStatus": "https://lifecycle.r-lib.org/articles/stages.html#experimental"
}

GitHub Events

Total
Last Year

Issues and Pull Requests

Last synced: 12 months ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels

Dependencies

.github/workflows/pkgcheck.yaml actions
  • ropensci-review-tools/pkgcheck-action main composite
DESCRIPTION cran
  • R >= 4.3.0 depends
  • cli * imports
  • dplyr * imports
  • lifecycle * imports
  • lubridate * imports
  • purrr * imports
  • rvest * imports
  • stringr * imports
  • terra * imports
  • tibble * imports
  • tidyr * imports