- A webapp for visualizing and understanding MCIEA survey data
- A webapp for visualizing and understanding MCIEA survey data
- Tasks for processing and indexing raw survey data
- Tasks for processing and indexing raw survey data
- Experimental work to conduct survey samples via text message
- Experimental work to conduct survey samples via text message
@ -12,29 +13,38 @@ This is a Rails project, deployed on Heroku.
Live app: [https://mciea-dashboard.herokuapp.com/](https://mciea-dashboard.herokuapp.com/)
Live app: [https://mciea-dashboard.herokuapp.com/](https://mciea-dashboard.herokuapp.com/)
Live dashboard: [http://mciea-dashboard.herokuapp.com/districts/winchester/schools/winchester-high-school/dashboard?year=2020-21](http://mciea-dashboard.herokuapp.com/districts/winchester/schools/winchester-high-school/dashboard?year=2020-21)
Live dashboard: [http://mciea-dashboard.herokuapp.com/districts/winchester/schools/winchester-high-school/dashboard?year=2020-21](http://mciea-dashboard.herokuapp.com/districts/winchester/schools/winchester-high-school/dashboard?year=2020-21)
## Local development
## Local development
Install Postgres and running first.
Install Postgres and running first.
(MacOS, Optional), you can use Homebrew:
(MacOS, Optional), you can use Homebrew:
```
```
$ brew install postgres
brew install postgres
$ brew services start postgresql
brew services start postgresql
```
```
Linux:
Linux:
Install postgres. Known working version is version 13
Install postgres. Known working version is version 13
```
```bash
https://www.postgresql.org/download/
https://www.postgresql.org/download/
```
```
Once postgres is installed and running, install the required gems and then migrate the database.
Once postgres is installed and running, install the required gems and then migrate the database.
```bash
bundle install
bundle exec rake db:create db:migrate db:seed
```
```
$ bundle install
$ bundle exec rake db:create db:migrate db:seed
Install the javascript dependencies
```bash
yarn install
```
```
At this point you can run the app and login. There won't be any data yet though; keep reading!
At this point you can run the app and login. There won't be any data yet though; keep reading!
The seed file populates the following tables
The seed file populates the following tables
@ -50,6 +60,7 @@ The seed file populates the following tables
SurveyItemResponses does not get populated at this stage.
SurveyItemResponses does not get populated at this stage.
### Database
### Database
Postgres
Postgres
### Gems
### Gems
@ -75,15 +86,18 @@ None yet. Hoping to integrate with Powerschool and Aspen for school administrat
### Javascript libraries
### Javascript libraries
None yet
Esbuild is used as the javascript bundler. The javascript testing library is jest.
### css
### css
Bootstrap 5
Bootstrap 5
## Loading Data
## Loading Data
SurveyItemResponses is the most important table to understand. SurveyItemResponses is the data that will change year to year and makes up the majority of the database records. Roughly 500,000 SurveyItemResponses per year.
SurveyItemResponses is the most important table to understand. SurveyItemResponses is the data that will change year to year and makes up the majority of the database records. Roughly 500,000 SurveyItemResponses per year.
Some notes:
Some notes:
- The data loading task assumes that the CSV files live in the `#{RAILS_ROOT}/data/survey_responses` directory
- The data loading task assumes that the CSV files live in the `#{RAILS_ROOT}/data/survey_responses` directory
- The data loading task is idempotent, i.e. it can be run multiple times without duplicating previously-ingested data
- The data loading task is idempotent, i.e. it can be run multiple times without duplicating previously-ingested data