codeforamerica / brigade-information

Data about Code for America brigades and other civic tech organizations for the CfA API
MIT License
17 stars 63 forks source link

Brigade Information

This repository hosts data about Code for America brigades and other civic tech organizations for the Code for America API.

How to add or edit your Brigade for the API

The organization list is a JSON file named organizations.json. Add or edit your organization's information in that file and submit your changes as a pull request.

A single organization's record looks like this:

{
    "name": "Beta NYC",
    "website": "http://www.beta.nyc",
    "city": "New York, NY",
    "location": {
      "city": "New York",
      "state": "New York",
      "country": "USA",
      "continent": "North America",
      "coordinates": {
        "latitude": "40.7144",
        "longitude": "-74.0060"
      }
    },
    "events_url": "http://www.meetup.com/BetaNYC/",
    "rss": "http://betanyc.tumblr.com/",
    "projects_list_url": "http://projects.betanyc.us/projects",
    "projects_tag": "beta-nyc",
    "latitude": "40.7144",
    "longitude": "-74.0060",
    "tags": [
      "Brigade",
      "Official"
    ],
    "social_profiles": {
        "twitter": "@BetaNYC",
        "facebook": "https://www.facebook.com/BetaNYC/"
    }
}

Official Schema

Before committing your change, please make sure that there are no formatting issues by running the bin/format-json script. (You will need to brew install jq moreutils for that script to run.)

Projects List

If you don't want to use a GitHub organization URL for your projects list, you can link to a custom CSV or JSON file.

The custom projects list should have the following columns:

A CSV example:

name,description,link_url,code_url
South Bend Voices,"A redeploy of CityVoice for South Bend, IN.",http://www.southbendvoices.com/,https://github.com/codeforamerica/cityvoice

The projects list URL can be any flavor of csv. The easiest way is to make a Google Spreadsheet like my example and then select File > Publish it to the web.

If you are using the new Google Spreadsheets, add /export?format=csv to the end. https://docs.google.com/spreadsheets/d/<key>/export?format=csv

If you have the older Google Drive version change ?output=html to ?output=csv. https://docs.google.com/spreadsheet/pub?key=<key>?output=csv

Put that in the Brigade Information sheet and you're done.

The projects list URL can also be a JSON file, with a list of strings containing GitHub project URLs.

If you have any questions, start an issue on this repo.

Syncing Brigade list from Salesforce

At Code for America we use Salesforce as the primary source of Brigade information.

In order to sync from Salesforce you will need:

We recommend setting up a virtualenv with:

python3 -m venv env
source env/bin/activate
pip install geopy requests

Then, you can sync from Salesforce with this command:

bin/merge-from-salesforce <(bin/download-from-salesforce) organizations.json