All Projects → openoakland → openbudgetoakland

openoakland / openbudgetoakland

Licence: MIT License
Visualizations of Oakland's budget data, and explanations about the budget process.

Programming Languages

javascript
184084 projects - #8 most used programming language
Pug
443 projects
PHP
23972 projects - #3 most used programming language
SCSS
7915 projects
HTML
75241 projects
python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to openbudgetoakland

tdm-calculator
DTLA Hack for LA is partnering with Los Angeles Department of Transportation (LADOT) to develop a Traffic Demand Management (TDM) calculator tool. This tool will help planners at LADOT and real estate developers to meet the Los Angeles’s Mobility Plan goals by 2035.
Stars: ✭ 21 (-76.92%)
Mutual labels:  code-for-america, civictechindex
woeip
A platform for impacted communities to understand their local air quality and advocate for environmental justice.
Stars: ✭ 26 (-71.43%)
Mutual labels:  code-for-america, openoakland
food-oasis
Repository for the current redevelopment of the Food Oasis Los Angeles website
Stars: ✭ 33 (-63.74%)
Mutual labels:  code-for-america, civictechindex
311-data
Empowering Neighborhood Associations to improve the analysis of their initiatives using 311 data
Stars: ✭ 48 (-47.25%)
Mutual labels:  code-for-america, civictechindex
asset-declarations
Crowd sourcing implementation of Moonsheep platform for Romanian asset declarations.
Stars: ✭ 13 (-85.71%)
Mutual labels:  civictech, civic-hacking
CTI-website-frontend
Join a worldwide movement to catalog 
every open source 
civic tech project.
Stars: ✭ 28 (-69.23%)
Mutual labels:  code-for-america, civictechindex
lucky-parking
Visualization of parking data to assist in understanding of the effects of parking policies on a neighborhood by neighborhood basis in the City of Los Angeles
Stars: ✭ 24 (-73.63%)
Mutual labels:  code-for-america, civictechindex
HomeUniteUs
We're working with community non-profits who have a Host Home or empty bedrooms initiative to develop a workflow management tool to make the process scalable (across all providers), reduce institutional bias, and effectively capture data.
Stars: ✭ 22 (-75.82%)
Mutual labels:  code-for-america, civictechindex
heart
Heart is a project working directly with the LA City Attorney’s Homeless Engagement and Response Team. We are building a database and case management system to streamline their workflow and enable them to scale their program. Find us on the Hack for LA Slack #heart.
Stars: ✭ 27 (-70.33%)
Mutual labels:  code-for-america, civictechindex
communityconnect
No description or website provided.
Stars: ✭ 23 (-74.73%)
Mutual labels:  code-for-america
public salaries
Public sector employee salaries
Stars: ✭ 16 (-82.42%)
Mutual labels:  budget
tenants
JustFix.nyc is a tool to document, organize, and take action in getting repairs made on your apartment.
Stars: ✭ 15 (-83.52%)
Mutual labels:  civictech
modern-software-delivery-maturity-index
A resource to help teams evaluate and improve their software delivery.
Stars: ✭ 15 (-83.52%)
Mutual labels:  civictech
who-owns-what
Who owns what in nyc?
Stars: ✭ 146 (+60.44%)
Mutual labels:  civictech
Neighborhood-Dashboard
We're working to help neighborhoods help themselves by giving them easy access to useful data to allow them to identify and track problem areas in their neighborhood.
Stars: ✭ 19 (-79.12%)
Mutual labels:  code-for-america
dimeshift-desktop
DimeShift desktop application
Stars: ✭ 14 (-84.62%)
Mutual labels:  budget
cash
Home Bookkeeping on ExtJS 4, PHP 5, SQLite 3
Stars: ✭ 37 (-59.34%)
Mutual labels:  budget
upswyng
UpSwyng is a mobile-ready, digital directory of resources to assist the unhoused and at-risk communities of Boulder, CO
Stars: ✭ 19 (-79.12%)
Mutual labels:  civic-hacking
performance-budget-plugin
Perfromance budget plugin for Webpack (https://webpack.js.org/)
Stars: ✭ 65 (-28.57%)
Mutual labels:  budget
budget-watch
Application for personal budget management
Stars: ✭ 70 (-23.08%)
Mutual labels:  budget

Open Budget: Oakland

Contributing

If you're looking for a starter development task to get your feet wet with our codebase, any of our Issues tagged help wanted might be a good fit.

Some of the other Issues are larger and require some deeper design or architectural work; if one of those catches your eye, you'll probably want to talk with us for some more context and background. Either comment on the Issue or — even better — catch up with us at one of OpenOakland's weekly Hack Nights.

Developing Locally

Quick Start Guide for Unix-based systems (Mac or Linux)

  1. Sign into GitHub and fork this repo
  2. Clone the fork onto your machine and navigate to the new folder
  3. While still in the root directory of the repo, create a new folder called "build". This folder will be ignored by our version control system.
  4. Navigate to the _src/ folder, which is where all development work takes place.
  5. Install dependencies with npm install
  6. Serve the website by entering npx @11ty/eleventy --serve --port=8011

Congratulations! Your local copy of Open Budget Oakland's website should now be running at http://localhost:8011. That means you're ready to do the codez if you want to contribute to the codebase of Open Budget Oakland. You will probably want to open a new terminal window, though, to regain access to the command line.

  • Please note that after editing a SASS file you should run npm run build-css from the _src/ folder in order to incorporate your changes into the CSS

Eleventy

This site is built with Eleventy, a JavaScript-based static site generator that parses Markdown, Pug, and other template languages and runs on Node.js. That means you can reproduce our site locally with minimal setup!

You'll need these installed globally:

  • Node is a prerequisite for NPM
  • NPM or Yarn
  • NVM is optional, but very handy for downloading, updating, and switching between versions of NPM

Install & Run Eleventy in _src/

Once you have the NPM package manager installed, you can install Eleventy and the other dependencies listed in package.json. Enter the following from the _src/ folder, where the Eleventy configuration file .eleventy.js lives.

npm install

This command usually runs without a glitch, but if you run into trouble, check your version of node. The latest version of node that we can confirm works with our set-up is v15.14.0.

To start eleventy, simply enter the following. (You may choose any network port on your system that is available; 8011 is just a suggestion.)

npx @11ty/eleventy --serve --port=8011

Frontend Stack

This project is coded with, among other things:

  • Bootstrap, a CSS framework
  • D3, a data visualization library for JavaScript
  • Pug, a JavaScript-friendly HTML templating language
  • React, a rendering library for JavaScript
  • Sass, a CSS preprocessor

Creating & Editing Pages

  • Please note that it is your responsibility to keep your fork of the repo up-to-date with changes made by others working on the project. Doing this diligently should go a long way towards protecting you from scary git merge conflicts.
  • All development activity occurs in _src/. The root folder is only for compiled output for deployment.
  • Page content is inserted into the content block. If you are updating data, be sure you understand how it will be consumed.
  • In many cases you will simple create or update a .pug file, which Eleventy will turn into HTML. If you are making another type of change, you may need to read Pug documentation (which is excellent, by the way!).
  • If your page uses custom page-specific css, add it to a new .scss partial and import it into the main stylesheet. (Make sure to namespace it the same way the others are.)

Additional instructions for "flow" diagram pages

  1. Flow pages are built off a template; copy one of the *-budget-flow.pug pages and update the content blocks as necessary.
  2. Data files must be placed in the data/flow directory. Follow the naming convention seen there or your files won't load properly. You also will need to point your page at the appropriate files as seen in the get_datafiles content block.
  3. the following columns are required in your datafile and their names should be normalized as seen here. Other columns should be removed to minimize the data download.
    • budget_year
    • department
    • fund_code
    • account_type (this should be the Expense/Revenue column, if there are duplicate names)
    • account_category
    • amount

Additional instructions for treemap diagram pages

  1. Treemap pages are built off a template; copy one of the *-budget-tree.pug pages and update the content blocks as necessary.
  2. Instructions for generating the necessary data files can be found here. Add them to the data/tree/ directory following the naming convention seen in the existing files.
  3. Update the datafiles content block with the appropriate metadata and file path for the data files you generated.

Additional instructions for the Compare page

  1. The Compare page is a React application. The source files are in _src/js/compare/ and are are bundled with Webpack.
  2. When developing on the Compare page, run yarn to install all the necessary node dependencies and yarn run watch to watch the source files for changes and rebuild the asset bundles accordingly.
  3. The Compare page communicates with a separately maintained API to fetch its data. Documentation for that API can be found in our wiki.

Publishing Changes

Make changes and review them on your local development site. If everyting looks good, push your changes to your personal fork and merge the commit(s) into your master branch. Finally, issue a pull request and we'll take it from there!

Issuing a pull request

Simply push your code changes to your repo in whatever branch you used locally, then merge into master. At this point you can either 1) push from your master to the staging branch of the upstream repo or 2) just tell an admin of the upstream repo that your work is ready for review. (Anyone with admin privileges on the original repo will be able to create a pull request from your repo). Your changes will then be reviewed, tested, and (if everything looks good) pushed into the master branch.

Starting in March 2020, code changes pushed to the master branch of the (original) repo will use GitHub Actions to trigger a continuous integration process that (among other things):

  • runs WebPack;
  • builds static files with Eleventy; and
  • deploys the updated web files to GitHub Pages

Generating the API

Background

Oakland budget data are hosted in a special table that lives in the database of a WordPress site. This site exists primarily for the purpose of managing this data, and is not intended for public consumption. Should you need access to the backend of the site, please contact Felicia on Slack.

The API we have built is completely independent of the Open Budget Oakland site, and can be consumed by anyone. Thus far, we have not had to place any limits on traffic to the server, but that may change in the future. To learn how to use the API, please see the documentation in our GitHub wiki.

Using the plugin to generate the API

The WordPress plugin (OBO Custom Routes) that generates our API can be installed and used on any WordPress site, providing a database table with the expected column names is present. Currently, the plugin is hard-coded to expect a table called oakland_budget_items. Obviously, that would be something you'd want to change if you were to use the plugin for another project. Additionally, database queries can easily be altered to fit a different table structure and to create different kinds of endpoints with a bit of PHP skill.

Developing locally

To develop new features for the API, you may want to run Wordpress locally. This repo includes a configuration file for doing so with Docker Compose. With Docker Compose installed, simply run docker-compose up in wordpress plugin for custom API endpoints/ to activate linked containers for Wordpress, MySQL, and PhpMyAdmin. The Wordpress container will mount that directory as though it were Wordpress' plugins/ directory, allowing your edits to the plugin files in obo_custom_routes/ to be reflected in your Wordpress instance. (Additional plugins that are not part of this repository will appear in that directory; they should be ignored by git.)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].