R wrapper for MetaWeather API
Akshi Chaudhary: akshi8Cem Sinan Ozturk: cemsinanoNazli Ozum Kafaee: nazliozumTarini Bhatnagar: tarinib
- Date : April 14, 2018
- Release: v1.0
climateR offers 3 functions that enable the user to call for data from the MetaWeather API:
-
get_weather(cities, continent): Maps the weather state of given cities (all from same continent) on the current date. -
sunrise(city): Gets sunrise and sunset time as well as the total day time of a particular city on the current date. -
getpastinfo(city_name, date): Gets minimum temperature, maximum temperatures, average wind speed, and average humidity of a particular city on a given date.
You can install climateR from Github with:
# install.packages("devtools")
devtools::install_github("UBC-MDS/climateR")
- get_weather(cities, continent)
# Plot weather state of Vancouver and Seattle on map
get_weather(cities = c("Vancouver", "Seattle", "Boston"), continent = "North America")
- suntime()
# Get sunrise, sunset, and total day time for Instanbul today
suntime("Istanbul")
Output:
$sunrise
[1] "03:26:53"
$sunset
[1] "16:42:34"
$day_time
[1] "13 hours and 16 minutes"
- getpastinfo()
# Get value for Vancouver on 2017/8/30
getpastinfo("Vancouver", "2017/8/30")
Output:
$min_temp
[1] 16.10833
$max_temp
[1] 21.51667
$windspeed
[1] 4.64
$humidity
[1] 67.32
This is an open source project. So feedback, suggestions and contributions are very welcome. For feedback and suggestions, please open an issue in this repo. If you are willing to contribute this package, please refer to Contributing guidelines for details.

