Skip to content

Instantly share code, notes, and snippets.

@tetlabo
Created March 4, 2021 12:40
Show Gist options
  • Save tetlabo/8fea9748bd4392b8a08e388acbe4cf8e to your computer and use it in GitHub Desktop.
Save tetlabo/8fea9748bd4392b8a08e388acbe4cf8e to your computer and use it in GitHub Desktop.
owmrパッケージを使ってOpenWeatherから現在の東京の気温を取得する
# owmrパッケージは、GitHub版でないと、APIキーの認証がうまくいきませんでした。
# https://github.com/crazycapivara/owmr
library(tidyverse)
library(owmr)
Sys.setenv(OWM_API_KEY = "APIキーを指定してください")
(tokyo_temper <- get_current("Tokyo", units = "metric") %>% owmr_as_tibble() %>% pull(temp))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment