A website that allows students (high school and adult) and those who support them (parents, guidance counselors) to not only search among colleges to find schools that would meet their desires, but also encourage them to consider "value" factors, be exposed to schools with better outcomes, and allow users to compare and contrast schools across different dimensions of "fit," highlighting "value" factors. The goal is to enable people to find schools that are best suited to them, and ensure a broad and flexible definition of elements that contribute to "fit."
This repo contains the front end of a web app with its API created by an instance of Open Data Maker which is configured with a specific data set. For more details on setting up the back end of the web app, see below: Running the API Locally. However, you can run the web app with the hosted API following the installation instructions in the next section.
Create a local development environment using Docker containers or with a traditional unix system.
- Add values to
- In App Root: Start Docker Containers
- You can start it with
docker-compose up -dto detach the process from the current shell if desired.
- Wait for output:
web_1 | Server address: http://0.0.0.0:4000/ web_1 | Server running... press ctrl-c to stop.
- Start a new cli tab/window (if not running detached)
- Only on first run: Install Dependencies in
docker-compose exec node npm install
- Launch webpack with watch on the
docker-compose exec node npm run watch
- Wait for:
Entrypoint main = app.js app.js.map
- Site will be available at:
Traditional Unix Development Environment
This site is made with [Jekyll]. Once you've got [Ruby] on your computer, you can run:
gem install github-pages
(Note: depending on how Ruby was installed, you may need to prefix the above
Then install all the ruby gems you need:
Required Environment Variables
API_KEY: The api key used to submit requests to Open Data Maker. Authorization is handled by api.data.gov. Sign up for a key at: api.data.gov/signup/
API_BASE_URL: The API base URL for Open Data Maker.
Typical configuration on a Unix based development environment:
export API_KEY=<API_KEY_HERE> export API_BASE_URL=https://api.data.gov/ed/collegescorecard/v1/ export BASEURL=http://localhost:4000
Optional Environment Variables
The following environment variables should be set to ensure full functionality for all pages. These configurations are not required to view the site locally but will ensure all items are working as intended.
API_SIGNUP_KEY: API key for api.data.gov used during the embedded sign up form submission process (
data/documentation/#api-key-signup). This key should be configured by following this documentation
RECAPTCHA_SITE_KEY: Key used during
V2 ReCaptchaworkflows. See documentation for registration and configuration information.
API_KEY_GOOGLE_MAPS: API key for Google Static Maps functionality. Refer to Google Maps Developer Documentation for configuration information.
Typical configuration on a unix based development environment:
export API_SIGNUP_KEY=<API_KEY_HERE> export RECAPTCHA_SITE_KEY=<RECAPTCHA_API_KEY_HERE> export API_KEY_GOOGLE_MAPS=<GOOGLE_MAPS_API_KEY_HERE>
To start up the local server, run:
jekyll serve --baseurl='' -w
Then visit http://localhost:4000 to view it. The
--watch) flag tells Jekyll to rebuild the relevant pages when you edit
the source files.
Front End Development
- We use [Sass] to generate our CSS. Webpack is configured to translate standalone Sass files or styles within VueJS Single File Components
- We adhere to Web Content Accessibility Guidelines 2.0, level AA.
- We test the site's accessibility with pa11y.
Running the API Locally
To set up the API (as a developer), follow the Open Data Maker installation instructions then:
download the [full data set] into open-data-maker directory and rename the folder as "real-data"
DATA_PATHenvironment variable. On the command line:
This application uses only most recent data. To speed up start up time, edit
data.yamlfile inside the
real-datadirectory to limit the number of files indexed to 4 (year 2013 is included twice, once for the columns that are not specific to any year, and once for the 2013 data, then 2012 and 2011). Optionally, limiting the number of rows will reduce the set of colleges in the data set and is helpful for testing since it speeds startup time significantly:
options: limit_files: 4 limit_rows: 100
To create the API for the complete set of schools, comment out the
limit_rowsoption by adding a
#to the start of the line:
options: limit_files: 4 # limit_rows: 100
Start Open Data Maker. On the command line, from the open-data-maker directory:
To view progress of indexing, it is helpful to look at the development log in another terminal window:
tail -f log/development.log