This project has been delivered and is no longer maintained. If you'd like to reproduce or improve on it, please contact OpenOakland's Steering Committee at steering@openoakland.org. Let us know why you're interested and what you hope to accomplish. Consider using the Project Exploration Worksheet (required for all new OpenOakland projects).
A site to visualize data around the expenditure of Oakland Measure G funds
The measure-g
project (now cleverly called TrackG) is hosted here: http://trackg.org
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.
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:
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 ./deploy_setup.sh
See the script for comments on what goes on in that script.
Once you have that setup process complete, you can run:
bash ./deploy_staging.sh
to see your changes at https://openoakland.github.io/measure-g-staging/
Staging is hosted on GitHub pages here: https://github.com/openoakland/measure-g-staging
bash ./deploy_production.sh
Hosted on GitHub pages here: https://github.com/openoakland/measure-g-production
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_YYYY
with the year you are adding. - In
_harp.json
, updatelatestEnrollmentYear
with the year you just added (2017-18 school year would be2017
) andenrollmentDataTable
with the name of the table you created in step 6.
We request the data each year from OUSD's finance office (typically through the Measure G Oversight Committee)
- Change column names to match the
measure_g_actuals
table - Format spending columns into
####.##
- 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. - Upload to carto. Be sure that columns containing numberic ids or spending are in number format, not text.
- Use a
UNION ALL
query in Carto to join the datasets. Something like this. - Create a new dataset from the query. Make it public and name it
measure_g_actuals
to replace the existing table with that name. - Update the
supported_years
andyearsToDisplay
arrays inprograms.ejs
andschool.ejs
to include the year you just added. (Unfortunately, it may break without this adjustment). - Update
latestExpenditureDataYear
inharp.json
to the year you have just added and add another element to to theyear-select
element inmap.ejs
.