-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
58 lines (40 loc) · 1.56 KB
/
README.Rmd
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# weather
<!-- badges: start -->
[![R-CMD-check](https://github.com/JuliaYu2002/weather/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/JuliaYu2002/weather/actions/workflows/R-CMD-check.yaml)
<!-- badges: end -->
The weather package retrieves weather data (highest temperature, lowest temperature, precipitation, windspeed) from websites and data sets, providing users with useful functions for data manipulation and visualization.
## Installation
You can install the development version of weather from [GitHub](https://github.com/) with:
``` r
# install.packages("devtools")
devtools::install_github("JuliaYu2002/weather")
```
## Usage
At any date, you can get weather data of Northampton, MA for the next 14 days from weather.com.
This package also has function that retrieves the highest and lowest temperature or the precipitation data for the past 30 days at a specific location.
```{r example}
library(weather)
noho_forecast <- weather_noho()
print(noho_forecast)
noho_past <- past_days(city = "northampton",
state ="massachusetts",
zip = "01060")
print(noho_past)
```
You can also plot the precipitation or the high/low temperatures using functions from this package:
```{r weather}
hi_lo_past <- to_hi_lo_temp(weather_data(noho_past))
plot(hi_lo_past)
```