A site to visualize data around the expenditure of Oakland Measure G funds
measure-g project (now cleverly called TrackG) is hosted here: http://trackg.org
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, trackg.org 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:
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.
See the script for comments on what goes on in that script.
Once you have that setup process complete, you can run:
to see your changes hosted at http://staging.trackg.org
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.
- Download the enrollment data for the year you would like to add
Carto Postgres Hosting (jbaldo.carto.com)
- To conserve file size, delete all rows where district != 'Oakland Unified' (Excel can do this pretty easily)
- Save as csv (original sorce is text flat file)
- Upload to the carto account as a new dataset
- 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.
- In Carto, save the query result as a new dataset. Name something like
ousd_enrollment_YYYYwith the year you are adding.
latestEnrollmentYearwith the year you just added (2017-18 school year would be
enrollmentDataTablewith 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)
- Change column names to match the
- Format spending columns into
- Add a
yearcolumn 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.
- Upload to carto. Be sure that columns containing numberic ids or spending are in number format, not text.
- Use a
UNION ALLquery in Carto to join the datasets. Something like this.
- Create a new dataset from the query. Make it public and name it
measure_g_actualsto replace the existing table with that name.
- Update the
school.ejsto include the year you just added. (Unfortunately, it may break without this adjustment).
harp.jsonto the year you have just added and add another element to to the