An app to visualize outcome data around the expenditure of funds through Measure G
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


A site to visualize data around the expenditure of Oakland Measure G funds

The measure-g project (now cleverly called TrackG) is hosted here:

Set Up Development Environment

Install Node / npm

Note: Node comes with npm which is a package manager for Node. You can use the instructions above to update to the latest version and verify that it's installed.

Install & Run Harp

TrackG is using a minimal server framework called Harp for EJS templating and sass stylesheets. Currently, is just compiled static HTML and not a Harp server. But that may change and Harp simplifies the development process.

npm install harp -g

To start the Harp server, git clone this directory and then run:

harp server

Now you can hit the server at localhost:9000 (by default). Any changes you make in source will automatically compile on refresh.


Since we are using GitHub pages for hosting, pushing up changes is a little tricky. Shell scripts are currently being used to make the process easier for you.


If it's the first time you are deploying to your machine, get write access to the measure-g-staging repository.

Then run:

bash ./

See the script for comments on what goes on in that script.


Once you have that setup process complete, you can run:

bash ./

to see your changes hosted at

Data Maintenence

Adding Enrollment Data

Our enrollment source has been the US Dept of Ed National Center for Education Statistics and the CA Dept of Ed. These instructions are for the CA Dept of Ed.

  1. Download the enrollment data for the year you would like to add

Carto Postgres Hosting (

  1. To conserve file size, delete all rows where district != 'Oakland Unified' (Excel can do this pretty easily)
  2. Save as csv (original sorce is text flat file)
  3. Upload to the carto account as a new dataset
  4. This data is broken out by ethnicity and grade level. Use this query in Carto to sum up the enrollment for each school site and union with existing data.
  5. In Carto, save the query result as a new dataset. Name something like ousd_enrollment_YYYY with the year you are adding.
  6. In _harp.json, update latestEnrollmentYear with the year you just added (2017-18 school year would be 2017) and enrollmentDataTable with the name of the table you created in step 6.

Adding Annual Measure G Data

We request the data each year from OUSD's finance office (typically through the Measure G Oversight Committee)

  1. Change column names to match the measure_g_actuals table
  2. Format spending columns into ####.##
  3. Add a year column and place the same year in every row. This should be the year that the school year started. For example, if it were to 2014-2015 school year, you would place 2014 in the column.
  4. Upload to carto. Be sure that columns containing numberic ids or spending are in number format, not text.
  5. Use a UNION ALL query in Carto to join the datasets. Something like this.
  6. Create a new dataset from the query. Make it public and name it measure_g_actuals to replace the existing table with that name.
  7. Update the supported_years and yearsToDisplay arrays in programs.ejs and school.ejs to include the year you just added. (Unfortunately, it may break without this adjustment).
  8. Update latestExpenditureDataYear in harp.json to the year you have just added and add another element to to the year-select element in map.ejs.

Example Commit