{"id":20234825,"url":"https://github.com/datamade/bga-payroll","last_synced_at":"2025-09-13T10:50:14.779Z","repository":{"id":35419390,"uuid":"117862671","full_name":"datamade/bga-payroll","owner":"datamade","description":"💰 How much do your public officials make?","archived":false,"fork":false,"pushed_at":"2025-07-16T14:11:02.000Z","size":110085,"stargazers_count":4,"open_issues_count":89,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-16T17:52:18.814Z","etag":null,"topics":["government-data","salary","visualization"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/datamade.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-01-17T16:32:35.000Z","updated_at":"2025-07-16T14:11:05.000Z","dependencies_parsed_at":"2023-01-15T20:45:56.008Z","dependency_job_id":"4aaf5add-065a-4265-aa89-2ef922ae539b","html_url":"https://github.com/datamade/bga-payroll","commit_stats":null,"previous_names":[],"tags_count":53,"template":false,"template_full_name":null,"purl":"pkg:github/datamade/bga-payroll","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datamade%2Fbga-payroll","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datamade%2Fbga-payroll/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datamade%2Fbga-payroll/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datamade%2Fbga-payroll/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/datamade","download_url":"https://codeload.github.com/datamade/bga-payroll/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datamade%2Fbga-payroll/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274608194,"owners_count":25316608,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-11T02:00:13.660Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["government-data","salary","visualization"],"created_at":"2024-11-14T08:13:19.814Z","updated_at":"2025-09-13T10:50:14.751Z","avatar_url":"https://github.com/datamade.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 💰 bga-payroll\n\nHow much do your public officials make?\n\n## Running the app locally\n\n### Requirements\n\n- 🐳 [Docker](https://hub.docker.com/search/?type=edition\u0026offering=community)\n\n### Getting started\n\nPerform the following steps from your terminal.\n\nClone this repository and `cd` into your local copy.\n\n```bash\ngit clone https://github.com/datamade/bga-payroll.git\ncd bga-payroll\n```\n\nNext, copy `bga_database/local_settings.py.example` from `bga_database/local-settings.py`.\n\n```bash\ncp bga_database/local-settings.example.py bga_database/local-settings.py\n```\n\nFinally, build and run the applicaton.\n\n```bash\ndocker-compose up -d --build\n```\n\nOnce the command exits, you can visit the app in your browser at\nhttp://localhost:8000.\n\nTo view logs for `app`, `worker`, or any of the other services defined in\n`docker-compose.yml`, run `docker-compose logs -f \u003cSERVICE_NAME\u003e`, e.g.,\n`docker-compose logs -f app`.\n\n### Adding data\n\nThe application will work without data, but if you'd like to add some,\nyou have two options: Restore from a database dump, or create and upload a data file.\n\n#### Restore from a database dump\n\nDataMaders can make or request a dump of the staging database in the #bga-payroll Slack channel.\n\nTo create a dump, you must have SSH access to the staging server. Provided that's true, run the following command in your terminal, swapping in the correct value for `${STAGING_URL}`:\n\n```bash\nssh ubuntu@${STAGING_URL} pg_dump -U postgres -Fc -O -d bga_payroll -h ${RDS_URL} \u003e bga_payroll.dump\n```\n\nWhen restoring a database, it's important that your local database is empty. So, remove your data volumes prior to restoring.\n\n```bash\ndocker-compose down --volumes\n```\n\nThen, bring your database service up. This will create the `bga_payroll` database.\n\n```bash\ndocker-compose up postgres\n```\n\nWhen your database is ready, you'll see output like this:\n\n```bash\nbga-payroll-postgres | PostgreSQL init process complete; ready for start up.\nbga-payroll-postgres |\nbga-payroll-postgres | 2021-08-18 16:31:36.869 UTC [1] LOG:  listening on IPv4 address \"0.0.0.0\", port 5432\nbga-payroll-postgres | 2021-08-18 16:31:36.869 UTC [1] LOG:  listening on IPv6 address \"::\", port 5432\nbga-payroll-postgres | 2021-08-18 16:31:36.873 UTC [1] LOG:  listening on Unix socket \"/var/run/postgresql/.s.PGSQL.5432\"\nbga-payroll-postgres | 2021-08-18 16:31:36.890 UTC [75] LOG:  database system was shut down at 2021-08-18 16:31:36 UTC\nbga-payroll-postgres | 2021-08-18 16:31:36.895 UTC [1] LOG:  database system is ready to accept connections\n```\n\nIn a separate terminal window, run `pg_restore` to load your dump into your containerized database.\n\n```\ndocker exec -i bga-payroll-postgres pg_restore -U postgres -Fc -O -v -d bga_payroll \u003c bga_payroll.dump\n```\n\nFinally, start the app:\n\n```bash\ndocker-compose up\n```\n\nN.b., if you need search for development, you also need to build the search index. This command will add employers from 2018 to the index. Add people to the entity types argument, if you need to.\n\n```bash\ndocker-compose exec app python manage.py build_solr_index --reporting_year 2018 --entity-types units,departments --chunksize=25\n```\n\n#### Upload a data file\n\nFirst, make a formatted data file in the `data/raw` folder. \n\n* The file should have a name like payroll-actual-*.csv\n* The data should have these columns in this order: `employer,last_name,first_name,title,department,base_salary,extra_pay,date_started,id,year`\n\n`data/raw/payroll-actual-2017-pt-1.csv`\n\n```bash\ndocker-compose exec app make import/payroll-actual-2017-pt-1.csv\n```\n\nThis will process and import the file `data/raw/payroll-actual-2017-pt-1.csv`. So to add data, first put the new data in that directory with that naming convention.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatamade%2Fbga-payroll","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatamade%2Fbga-payroll","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatamade%2Fbga-payroll/lists"}