Code Monkey home page Code Monkey logo

congress dot dev forthebadge forthebadge forthebadge


Setup

Required Software

Docker >= 19.0

Docker is a set of platform as a service products that use OS-level virtualization to deliver software in packages called containers. https://docs.docker.com/install/

Docker-Compose >= 1.24

Compose is a tool for defining and running multi-container Docker applications. With Compose, you use a YAML file to configure your application's services. https://docs.docker.com/compose/install/


Usage

Basic usage - To start an entirely local copy. This will come with an empty database, you'll have to follow the instructions to populate it (or load the provided backup).

docker-compose -f .docker/docker-compose.yml up -d

Advance Usage - If you rename docker-compose.local-example.yml to docker-compose.local.yml you can run this script to use our API instead of running the database yourself.

chmod +x ./start_local.sh
sh ./start_local.sh

Loading the database

From the backend folder, you will need to tell it to parse some files before you can view them. importers.releases will load 1 release point from the US Code website. ~10MB compressed and put it into the database ~500MB in the db.

docker exec -it docker_parser_api bash

python3 -m billparser.importers.releases rp.json
python3 -m billparser.importers.bills bills.json

A semi up to date postgres dump is available for download.

Assuming you're running the normal docker-compose and an empty database named us_code, you can run this to restore from the backup.

pg_restore -h localhost -U parser -d us_code -F C us_code_beta.backup

Contributing

Please note we have a code of conduct, please follow it in all your interactions with the project.

congress.dev's Projects

congress-dev icon congress-dev

Tool for parsing US Federal legislation and displaying the proposed changes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.