Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jma_collect()での平年値の取得 #21

Merged
merged 6 commits into from
Sep 11, 2024
Merged

Conversation

uribo
Copy link
Owner

@uribo uribo commented Sep 11, 2024

Summary

「過去の気象データ検索」から、平年値を取得する処理を追加しました。jma_collect(item = )に下記の引数を指定して実行します。

  • nml_ym: 年・月ごとの平年値
  • nml_3m: 3か月ごとの平年値
  • nml_10d: 旬ごとの平年値
  • nml_mb5d: 半旬ごとの平年値
  • nml_daily: 月の日ごとの平年値。このitemを指定する際は、対象のmonthの指定も必要です。
library(jmastats)
#> ℹ Loading jmastats
jma_collect("nml_10d", "0228", pack = FALSE)
#> Data from: https://www.data.jma.go.jp/stats/etrn/view/nml_amd_10d.php?prec_no=33&block_no=0228&year=&month=&view=
#> The record is based on the statistical period from 1991 to 2020 (30 years of data).
#> Treated as missing: lines 1, 2, 3, 4, 5, 6, 36 at temperature_average(℃)
#> Treated as missing: lines 1, 2, 3, 4, 5, 6, 7, 8, 9, 33, 34, 35, 36 at temperature_min(℃)
#> Treated as missing: lines 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36 at snow_fall(cm)
#> Treated as missing: lines 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36 at snow_depth(cm)
#> 
#> ── Column specification ────────────────────────────────────────────────────────
#> cols(
#>   element = col_character(),
#>   element2 = col_character(),
#>   `precipitation(mm)` = col_double(),
#>   `temperature_average(℃)` = col_double(),
#>   `temperature_max(℃)` = col_double(),
#>   `temperature_min(℃)` = col_double(),
#>   `wind_average_speed(m/s)` = col_double(),
#>   `daylight_(h)` = col_double(),
#>   `snow_fall(cm)` = col_logical(),
#>   `snow_depth(cm)` = col_logical()
#> )
#> # A tibble: 36 × 9
#>    element `precipitation(mm)` `temperature_average(℃)` `temperature_max(℃)`
#>    <chr>                 <dbl>                    <dbl>                <dbl>
#>  1 1月上旬                19.4                     -1.5                  2.5
#>  2 1月中旬                12.3                     -2.4                  1.9
#>  3 1月下旬                14.8                     -2.3                  2  
#>  4 2月上旬                12                       -2.1                  2.3
#>  5 2月中旬                16.7                     -1.4                  3.1
#>  6 2月下旬                11.1                     -0.3                  4.7
#>  7 3月上旬                26.9                      0.8                  5.7
#>  8 3月中旬                22.5                      2.3                  7.8
#>  9 3月下旬                27.6                      3.7                  9.5
#> 10 4月上旬                24.2                      6.3                 12.3
#> # ℹ 26 more rows
#> # ℹ 5 more variables: `temperature_min(℃)` <dbl>,
#> #   `wind_average_speed(m/s)` <dbl>, `daylight_(h)` <dbl>,
#> #   `snow_fall(cm)` <lgl>, `snow_depth(cm)` <lgl>

Created on 2024-09-11 with reprex v2.1.1

Relate issues

Close #20

@uribo uribo merged commit 6b8b863 into main Sep 11, 2024
1 check passed
@uribo uribo deleted the feature/climatological_normals branch September 11, 2024 05:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

平年値の追加
1 participant