-
Notifications
You must be signed in to change notification settings - Fork 1
barty
This plugin is known as barty
(for BART-year, as opposed to our first BART plugin, which has data for only one day).
BARTy gives users access to (at this writing) one year of BART data: for each hour, and each pair of stations, you can learn the number of people who entered the system at the first station and exited at the second. This works out to over 10 million cases.
The designer's task, therefore, is to give users easy-to-understand access to this large data set, and to give them useful choices about what cases to download, when they can only practically work with a few thousand cases at a time.
The data are more multidimensional than they sound, so users have to think hard about what data to ask for; and then CODAP gives them the chance to fix their mistakes easily and improve what they are doing. Also, because of that multidimensionality, there are many ways to organize data and compute aggregate measures. So there is a lot of flexibility in what data moves are possible or useful.
For example, suppose you have the task of figuring out how many people took BART to attend Pride, which is on a Sunday in June. You need to conider questions such as
- What destination stations should you look at?
- Do "source" stations matter?
- What times should you look at?
- So you look at arrivals or departures or both?
- Should you compare the data with a non-pride day? Which day? Only one?
Of course, Tim prefers that we not give students these questions but let them come up with them themselves in a process of looking critically at partial solutions.
-
barty.html
: The overall UI, etc. -
barty.js
: this contains the central initialization method, and defines the globalbarty
. -
barty.constants.js
: containsbarty.constants
. Here is wherewhence
and the php paths are defined. -
barty.css
: styling the html -
barty.ui.js
: vast file that adjusts visibility, contents of controls, formats of strings, etc., and responds to user changes to their selection criteria. Inlater plugins, some of this would be in auserActions
file. -
bartyManager.js
: the main controller, definesbarty.manager.
Importantly, assembles thePOST
parameters its methoddoBucketOfData
sends to PHP. NOTE: this whole mechanism ought to be updated to use the Fetch interface; we would use that and make abarty.phpConnect
file. -
bartyCODAPConnector.js
: establishes communication with CODAP, and outputs any data items received from the DB. -
bartyMeetings.js
: regulates the meetings parameters and count adjustments if there is a secret meeting. -
bartStations.js
: defines the JSON objectbarty.stations
that makes thestations
table in the mySQL obsolete. -
php/getBARTYdata.php
: receives a POST from `barty.manager', then uses PDO (thankfully) to extract the specified data from the DB. -
php/establishCredentials.php
: refers to the publicly-inaccessible credentials file that contains mySQL passwords. requires thatwhence
be set properly. -
sql/barty entire 2015.sql
: A huge (533 MB) SQL file containing all of the data for 2015.
-
hours
: The large, 10M record file, one for each hour between each pair of stations -
stations
: One record per station (total 50). Not used, I think, as all of the data are inbarty.stations
.