IT Cooking

Success is just one script away

Towson University Class Database Fork

Towson University Class

The JavaScript SQLite database dashboard

The frame bellow is interactive:

This tool allows you to dig deeper in the whole 5700 Towson University Class Database available in Spring 2018. Don’t be afraid of the SQL part, it’s just a showcase of the code embedded in the buttons. You can modify the SQL code to add the classes you would like to check, or try different approaches to discover new things.

SQL queries to mine data

  • Example 1: Can you list all the classes from your pathway with their current status and open seats? Copy and paste this code in the tuScraper window and play! You can indeed replace ITEC%’ by ENGL%’ or whatever you like:
select title,status,SeatsTaken,(SeatsOpen-waitlisttotal) from history,classes 
where history.classnumber = classes.classnumber 
and title like 'ITEC%'
group by title
order by timestamp,title asc 
LIMIT 100;

Towson University Class

  • Now, did you know that many classes in you pathway are still totally empty? Let’s try with this code:
select title,status,SeatsTaken,SeatsOpen from history,classes 
where history.classnumber = classes.classnumber 
and title like 'ITEC%'
and SeatsTaken < 5
and status = 'Open'
group by title
order by timestamp,title asc 
LIMIT 100;

As of 11/26/2017, 3 weeks after the first enrollment openings, 8 ITEC classes are still kind of empty:

Towson University Class

  • Now, some real fun. Let’s grab the really emptiest classes that nobody wants (lol):
select title,status,meets,SeatsTaken,SeatsOpen from history,classes 
where history.classnumber = classes.classnumber 
and SeatsTaken = 0
and SeatsOpen > 9
and status = 'Open'
and meets != 'TBA'
group by title
order by timestamp,title asc;

We filter out the special topic classes with less than 9 seats, the graduate classes with only one seat, and the ones without an undefined meeting time because they may be fake.

Towson University Class

As you can see, 3 weeks after enrollment openings, Towson University still has an astonishing 590 classes for which absolutely NOBODY was interested in!

This naturally raises a question: do they really have that many teacher that just won’t have a job in January? Or did they offer these without any staff available so they would have to hire at the last minute?

  • You can also list the number of empty classes by class type:
select distinct substr(title, 1, 4) as class, count (*) as num_classes from history,classes 
where history.classnumber = classes.classnumber 
and SeatsTaken = 0
and SeatsOpen > 9
and status = 'Open'
and meets != 'TBA'
and timestamp in (
  SELECT timestamp from history,classes where history.classnumber = classes.classnumber 
  and SeatsTaken = 0
  and SeatsOpen > 9
  and status = 'Open'
  and meets != 'TBA'
  GROUP BY history.ClassNumber)
group by class

And here is the bottom top 10:

Towson University Class

Implementation

  1. How to use scrapy to feed an SQLite database
  2. How To Build a JavaScript SQLite Web Dashboard