{"id":24319420,"url":"https://github.com/btskinner/batch_reports","last_synced_at":"2026-04-11T20:42:53.825Z","repository":{"id":84089618,"uuid":"168974247","full_name":"btskinner/batch_reports","owner":"btskinner","description":"An example of how batch process reports with Bash and knitr","archived":false,"fork":false,"pushed_at":"2019-02-03T18:26:06.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-27T02:47:01.495Z","etag":null,"topics":["bash","batch-processing","knitr","r","reports"],"latest_commit_sha":null,"homepage":"","language":"R","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/btskinner.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}},"created_at":"2019-02-03T17:48:03.000Z","updated_at":"2019-02-03T18:26:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"ed32f5f1-ee8e-46c4-a285-aed79d8dab4b","html_url":"https://github.com/btskinner/batch_reports","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/btskinner/batch_reports","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/btskinner%2Fbatch_reports","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/btskinner%2Fbatch_reports/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/btskinner%2Fbatch_reports/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/btskinner%2Fbatch_reports/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/btskinner","download_url":"https://codeload.github.com/btskinner/batch_reports/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/btskinner%2Fbatch_reports/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278395892,"owners_count":25979685,"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-10-04T02:00:05.491Z","response_time":63,"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":["bash","batch-processing","knitr","r","reports"],"created_at":"2025-01-17T15:33:13.471Z","updated_at":"2025-10-05T00:39:39.542Z","avatar_url":"https://github.com/btskinner.png","language":"R","readme":"# Batch processing reports with Bash + knitr\n\nThis process uses a combination of Bash scripting and\n[knitr](https://yihui.name/knitr/) to batch process state-specific\nreports. The specific example used shows state-level unemployment\ntrends from 2000 to 2016. All numbers come from the [Bureau of Labor\nStatistics county-level\nestimates](https://www.btskinner.me/data/bls-unemployment/) that have\nbeen aggregated to various levels, using labor force size as weights.\n\nEach state will get its own report that contains:\n\n1. A line plot showing the state-level unemployment rate change from\n   2000 to 2016 as well as comparision lines for the state's census\n   region and the United States as a whole. While the national line\n   will be the same in each report, the region and state lines will\n   change based on the state.  \n2. A table showing the same numbers used in the plot as well as\n   columns showing the difference between the state's rates and those\n   of the nation and the region.\n\n## To run\n\nClone this directory, `cd` into the `scripts` directory, and run the\nfollowing scripts in order:\n\n1. `get_data.r`\n    - downloads necessary data files\n2. `munge_data.r`\n    - converts data files into format needed for reports\n3. `run_reports.sh`\n    - knits each state-level report, creating necessary subdirectories\n      as needed\n\t- `-d` option is used to set the top-level directory (should be\n      `../` unless you change the directory structure, which is not\n      recommended). \n\t- `-t` option is the name of the template file, without path\n      (should be `template.rnw` unless you change the template file\n      name). \n\n```bash\ngit clone\ncd ./bulk_reports/scripts\nRscript get_data.r\nRscript munge_data.r\n./run_reports -d ../ -t template.rnw\n```\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbtskinner%2Fbatch_reports","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbtskinner%2Fbatch_reports","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbtskinner%2Fbatch_reports/lists"}