library(tidyverse)
energy = read_csv("data/energydata.csv")
weather = read_csv("data/weather.csv")
energy_weather = full_join(energy, weather, by = c("Date", "State"))
head(energy_weather)# A tibble: 6 × 9
Date Day State Price Demand NetExport MaxTemp WindDir WindSpeed
<date> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <chr> <dbl>
1 2018-07-15 Sun NSW 51.7 7564. -1231. 18 NW 2
2 2018-07-16 Mon NSW 87.9 8966. -18.6 18.5 W 7
3 2018-07-17 Tue NSW 62.8 8050. -643. 22.5 WNW 9
4 2018-07-18 Wed NSW 54.5 7840. -742. 20.8 SSW 1
5 2018-07-19 Thu NSW 64.2 8168. -40.6 20.8 NNW 1
6 2018-07-20 Fri NSW 60.9 8254. 318. 15.5 W 13
