Skip to content

Commit

Permalink
Merge pull request #14 from dfe-analytical-services/clearing_installs
Browse files Browse the repository at this point in the history
Clearing installs
  • Loading branch information
rmbielby authored Feb 1, 2024
2 parents 7b1cfbe + 61c0f80 commit f63963b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-shiny.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,5 @@ jobs:
run: >
Rscript
-e "rsconnect::setAccountInfo(name = 'department-for-education', token = '${{secrets.SHINYAPPS_TOKEN}}', secret = '${{secrets.SHINYAPPS_SECRET}}')"
-e "rsconnect::deployApp(appName=${{env.SHINYAPP_NAME}})"
-e "rsconnect::deployApp(appName=${{env.SHINYAPP_NAME}}, forceUpdate = TRUE)"
21 changes: 7 additions & 14 deletions R/Data_processing.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,15 @@


# These are the packages needed for this code, you may already have these installed but run this section if not
install.packages("dplyr")
install.packages("odbc")
install.packages("DBI")
install.packages("janitor")
install.packages("tidyverse")
install.packages("purrr")
shhh(library(dplyr))
shhh(library(odbc))
shhh(library(DBI))
shhh(library(janitor))
shhh(library(tidyverse))
shhh(library(purrr))

pull_latest_data <- function() {
# Load libraries==from here
library(dplyr)
library(odbc)
library(DBI)
library(janitor)
library(tidyverse)


# round function
Expand Down Expand Up @@ -795,8 +790,6 @@ AND (pupil.NFTYPE in (32,33) or pupil.NFTYPE in (20,21,22,23,24,25,26,27,28,31,5


# copying data to an Excel file
# save_tidy_data_file_attainment = 'Y:/Pre-16 development/Routine products/Transition Matrices/TM Dev/8.TM_in_R/KS4_TM_Scaled_Scores/2021_Tidy_Data_Output_Attainment_Scaled_Scores_Final.csv'
# save_tidy_data_file_attainment = 'C:/Users/SMANCHESTER.AD/OneDrive - Department for Education/Documents/R Projects/KS4_TM_Scaled_Scores/2021_Tidy_Data_Output_Attainment_Scaled_Scores_Final.csv'
save_tidy_data_file_attainment <- "C:/Users/MPARMAR/repos/Transition-matrices-dashboard/data/2023_Tidy_Data_Output_Attainment_Scaled_Scores_Final.csv" # # update year
save_tidy_data_file_attainment <- "data/2023_Tidy_Data_Output_Attainment_Scaled_Scores_Final.csv" # # update year
write.table(attainment_tidy_data, save_tidy_data_file_attainment, row.names = FALSE, sep = ",")
}
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ You should list out the software and programming skills needed, as well as any a

You should clearly lay out the steps needed to run your code here - generally, they will be similar to the below for Shiny apps:

### Data updates

#### Pre-update tasks

Around 3-7 days prior to a data update, create a new branch from main and run `renv::update()`. Then add/commit/push and create PR of that branch into main and merge in. This will make the deploy for the data update run much faster on publication day.


### Running the app locally

Expand Down

0 comments on commit f63963b

Please sign in to comment.