Skip to content

Repository files navigation

CDP - The City of Alameda

Infrastructure Deployment StatusEvent Processing PipelineEvent Index PipelineWeb Deployment StatusRepo Build Status


Council Data Project

Council Data Project is an open-source project dedicated to providing journalists, activists, researchers, and all members of each community we serve with the tools they need to stay informed and hold their Council Members accountable.

For more information about Council Data Project, please visit our website.

Instance Information

This repo serves the municipality: The City of Alameda

Python Access

Install:

pip install cdp-backend

Quickstart:

fromcdp_backend.databaseimportmodelsasdb_modelsfromcdp_backend.pipeline.transcript_modelimportTranscriptimportfireofromgcsfsimportGCSFileSystemfromgoogle.auth.credentialsimportAnonymousCredentialsfromgoogle.cloud.firestoreimportClient# Connect to the databasefireo.connection(client=Client(
project="cdp-alameda-d3dabe54",
credentials=AnonymousCredentials()
))
# Read from the databasefive_people=list(db_models.Person.collection.fetch(5))
# Connect to the file storefs=GCSFileSystem(project="cdp-alameda-d3dabe54", token="anon")
# Read a transcript's details from the databasetranscript_model=list(db_models.Transcript.collection.fetch(1))[0]
# Read the transcript directly from the file storewithfs.open(transcript_model.file_ref.get().uri, "r") asopen_resource:
transcript=Transcript.from_json(open_resource.read())
# OR download and store the transcript locally with `get`fs.get(transcript_model.file_ref.get().uri, "local-transcript.json")
# Then read the transcript from your local machinewithopen("local-transcript.json", "r") asopen_resource:
transcript=Transcript.from_json(open_resource.read())

Contributing

If you wish to contribute to CDP please note that the best method to do so is to contribute to the upstream libraries that compose the CDP Instances themselves. These are detailed below.

  • cdp-backend: Contains all the database models, data processing pipelines, and infrastructure-as-code for CDP deployments. Contributions here will be available to all CDP Instances. Entirely written in Python.
  • cdp-frontend: Contains all of the components used by the web apps to be hosted on GitHub Pages. Contributions here will be available to all CDP Instances. Entirely written in TypeScript and React.
  • cookiecutter-cdp-deployment: The repo used to generate new CDP Instance deployments. Like this repo!
  • councildataproject.org: Our landing page! Contributions here should largely be text changes and admin updates.

Instance Admin Documentation

You can find documentation on how to customize, update, and maintain this CDP instance in the admin-docs directory.

License

CDP software is licensed under a MIT License.

Content produced by this instance is available under a Creative Commons Attribution 4.0 International License.

About

CDP Instance for The City of Alameda

Resources

Code of conduct

Contributing

Stars

0 stars

Watchers

4 watching

Forks

Used by

Contributors

Languages