-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
39 lines (28 loc) · 1.04 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
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
```
# openweather
<!-- badges: start -->
<!-- badges: end -->
The goal of `openweather` is to generate a simple interactive weather forecast R shiny page using `openweather.org`.
## The App
Has a simple dropdown box for location; 'My location' or a list of Australian city locations. 'My location' uses the native HTML5 API on page load.
Once selected, the openweather.org API is called, and the data presented. It uses `insertUI`/`removeUI` to add and remove HMTL elements.
## Functions
```{r, eval = FALSE}
# Call openweather API using lat, lon and OPENWEATHERMAP_API_KEY environmental variable
# returns the JSON response as a list
get_weather_data(lat, lon)
```
```{r, eval = FALSE}
# Take the response list and generate HTML elements for presentation
# return a 'row' of the forecast data (lapply across the resp$list elements)
create_weather_data_row(data)
```