{"id":18998869,"url":"https://github.com/anthonydb/advanced-sql-nicar15","last_synced_at":"2026-04-18T11:30:21.355Z","repository":{"id":27204139,"uuid":"30674830","full_name":"anthonydb/advanced-sql-nicar15","owner":"anthonydb","description":"Code and data for the NICAR 2015 Advanced SQL with PostgreSQL hands-on class.","archived":false,"fork":false,"pushed_at":"2015-03-06T20:59:00.000Z","size":1029,"stargazers_count":13,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-01T17:29:19.187Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"SQLPL","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/anthonydb.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}},"created_at":"2015-02-11T23:15:52.000Z","updated_at":"2022-05-27T19:36:09.000Z","dependencies_parsed_at":"2022-09-01T12:50:51.365Z","dependency_job_id":null,"html_url":"https://github.com/anthonydb/advanced-sql-nicar15","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthonydb%2Fadvanced-sql-nicar15","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthonydb%2Fadvanced-sql-nicar15/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthonydb%2Fadvanced-sql-nicar15/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthonydb%2Fadvanced-sql-nicar15/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anthonydb","download_url":"https://codeload.github.com/anthonydb/advanced-sql-nicar15/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240018686,"owners_count":19734872,"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","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":[],"created_at":"2024-11-08T17:48:12.449Z","updated_at":"2026-04-18T11:30:21.285Z","avatar_url":"https://github.com/anthonydb.png","language":"SQLPL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NICAR 2015: Advanced SQL with PostgreSQL\nThe code and data examples here were created for the 2015 National Institute for Computer Assisted Reporting conference held in Atlanta, Ga., and sponsored by [Investigative Reporters and Editors](www.ire.org).\n\n## Getting started\n\n* This hands-on class will use the [pgAdmin](www.pgadmin.org) client to edit and run queries on PostgreSQL. Depending on your operating system and how you installed PostgreSQL, pgAdmin may need to be installed separately.\n\n* In pgAdmin, load the `create-tables.sql` script and run it. (You may need to change the location of the data files in the three `COPY` statements.) When finished, you'll have three tables loaded with data:\n  * **counties**: 2010 Census PL94 data.\n  * **meat_poultry_inspect**: USDA data on plants that produce meat and poultry.\n  * **acs_2012_stats**: Derived data from the 2012 American Community Survey.\n\n## Basic math\n\nWe'll start with math review before moving on.\n\n* Load the `basic-math.sql` script and work through each example.\n\n## Interview and clean data\n\nThis segment covers how to check your data for problems and how to clean it up safely.\n\n* Load the `interview-create.sql` script and work through the examples.\n\n## Creating ranks and rates\n\nJournalists generally like to discover which X is (highest/most/smallest/least/etc.). Here's how to do that with SQL.\n\n* Load the `ranks-rates.sql` script to work the examples.\n\n## Statistical functions\n\nPostgreSQL can't match the power of R, Pandas or even Excel for stats, but a few built-in functions can give you a quick read on your data.\n\n* For examples, load the `stats-functions.sql` script.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanthonydb%2Fadvanced-sql-nicar15","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanthonydb%2Fadvanced-sql-nicar15","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanthonydb%2Fadvanced-sql-nicar15/lists"}