Skip to content

Commit

Permalink
set up 19-20 and 20-21 enrollent data
Browse files Browse the repository at this point in the history
  • Loading branch information
TarinAComer committed Dec 10, 2021
1 parent 08ee734 commit 4ddde97
Show file tree
Hide file tree
Showing 7 changed files with 3,707 additions and 3 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ This project is setup to deploy with capistrano to MAPC servers. Run `cap stagin
## Data Migration
The data migration process to generate a new seed file from the old site is documented [in this commit](https://github.com/MAPC/myschoolcommute2/commit/1fe57646446be2779203b97c5347c3f9dc5e6af4).

## Fetch Enrollment Data for annual update from
https://www.doe.mass.edu/infoservices/reports/enroll/default.html

## WARNING
`bin/setup` runs a seed task that creates an admin user with the following credentials:
User: `admin@user.org`
Expand Down
Binary file added lib/external/report/.Backup_2RData
Binary file not shown.
Binary file modified lib/external/report/.RData
Binary file not shown.
16 changes: 14 additions & 2 deletions lib/external/report/_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,14 @@ get_enrollment_df = function(start_date) {
else if (start_date < as.Date("2019-07-30")) {
df = enrollment18_19
}
else if (start_date < as.Date("2020-07-30")) {
df = enrollment19_20
}
else if (start_date < as.Date("2021-07-30")) {
df = enrollment20_21
}
else {
df = enrollment18_19
df = enrollment20_21
}

return(df)
Expand Down Expand Up @@ -80,8 +86,14 @@ get_enrollment_date = function(start_date) {
else if (start_date < as.Date("2019-07-30")) {
df = "2018-2019"
}
else if (start_date < as.Date("2020-07-30")) {
df = "2019-2020"
}
else if (start_date < as.Date("2021-07-30")) {
df = "2020-2021"
}
else {
df = "2018-2019"
df = "2020-2021"
}

return(df)
Expand Down
4 changes: 3 additions & 1 deletion lib/external/report/_read_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@
#enrollment15_16 = read.csv("enrollment15_16.csv", as.is = T)
enrollment16_17 = read.csv("enrollment16_17.csv", as.is = T)
enrollment17_18 = read.csv("enrollment17_18.csv", as.is = T)
enrollment18_19 = read.csv("enrollment18_19.csv", as.is = T)
enrollment18_19 = read.csv("enrollment18_19.csv", as.is = T)
enrollment19_20 = read.csv("enrollment19_20.csv", as.is = T)
enrollment20_21 = read.csv("enrollment20_21.csv", as.is = T)
1,844 changes: 1,844 additions & 0 deletions lib/external/report/enrollment19_20.csv

Large diffs are not rendered by default.

1,843 changes: 1,843 additions & 0 deletions lib/external/report/enrollment20_21.csv

Large diffs are not rendered by default.

0 comments on commit 4ddde97

Please sign in to comment.