https://github.com/joelseq/ucsd-rooms-seed
Seed MongoDB with all the schedule of classes data for ucsd-rooms
https://github.com/joelseq/ucsd-rooms-seed
Last synced: 5 days ago
JSON representation
Seed MongoDB with all the schedule of classes data for ucsd-rooms
- Host: GitHub
- URL: https://github.com/joelseq/ucsd-rooms-seed
- Owner: joelseq
- Created: 2016-11-16T04:09:34.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-01-10T21:07:27.000Z (over 8 years ago)
- Last Synced: 2026-03-31T12:39:58.767Z (3 months ago)
- Language: JavaScript
- Homepage: https://www.ucsdrooms.com
- Size: 205 KB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# UCSD Rooms Seed
Seeds the Database for [UCSD Rooms](https://github.com/joelseq/ucsd-rooms)
## Instructions to seed DB
Make sure to have a local instance of MongoDB running, then:
1. Make sure to set the `QUARTER` variable in `get_codes.js` to the desired quarter (eg. `const QUARTER = 'SP17'`)
2. Run `node get_codes.js`
3. Make sure to set the `QUARTER` variable in `socs.js` to the desired quarter (eg. `const QUARTER = 'SP17'`)
4. Create a `data` directory
5. Edit the for loop in `socs.js` to run only 10 times eg. `for (let i = 0; i < 10; i++) {}` if not the operation times out and there will be data loss.
6. Run `node socs.js`
7. Repeat steps 5 and 6 but update the values by 10 each time until one file for each department has been written to the data folder
8. Run `node add_rooms.js`
9. Run `node add_times.js`
10. Run `node add_openings.js`