Skip to content

Update data, forecasts, plots and render doc #627

Update data, forecasts, plots and render doc

Update data, forecasts, plots and render doc #627

# Get hourly data
name: Update data, forecasts, plots and render doc
# Controls when the action will run.
on:
schedule:
- cron: '15 12 * * *'
# push:
# Controls when the action will run.
#on: [push, pull_request]
jobs:
run_rscripts:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Load repo and install R
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-r@v2
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-r-dependencies@v2
with:
packages: |
any::data.table
any::lubridate
any::rjson
any::flextable
any::forecast
any::ggplot2
any::webshot
any::rmarkdown
any::patchwork
any::jsonlite
# Run R script
- name: Get hourly data nordpool
run: Rscript scripts/get_hourly_data_nordpool.R
# Run R script
- name: Filter prices with sept_2023 system
run: Rscript scripts/filter.R
# # Run R script
# - name: Estimate compensation
# run: Rscript scripts/forecast.R
# # Run R script
# - name: Compensation table
# run: Rscript scripts/viz_compensation.R
# # Run R script
# - name: Plot compensation and mean price
# run: Rscript scripts/viz_compensation_month.R
# # Run R script
# - name: Render README
# run: Rscript -e 'rmarkdown::render("README.Rmd",output_format="all")'
# Add new files in data folder, commit along with other modified files, push
- name: Commit files
run: |
git config --local user.name actions-user
git config --local user.email "actions@github.com"
git add *
git commit -am "GHA update data, forecasts, plots and render doc $(date)"
git push