Skip to content

Instantly share code, notes, and snippets.

@dannguyen
dannguyen / 1README.md
Last active February 15, 2022 04:26
Bash script to collect New York Times-authored stories from their ArticleSearch API V2

Counting front-page NYT bylines with Bash and jq

A quickie script in Bash, with the jq JSON-command-line-parser, to access the New York Times Article Search API v2 and count up the bylines. You can count whatever you want obviously, but a student was interested in replicating the gender calculation found at Who Writes for the New York Times?.

The NYT Article Search API

First thing you have to do is signup and register as a developer. API Keys are assigned by API, so make sure you specify the Article Search API.

Even before you register, you can use the NYT's handy API Console to interactively test your queries: http://developer.nytimes.com/io-docs

@waldoj
waldoj / legislative_tags.csv
Last active November 13, 2015 14:26
A collection of 11,000 sets of crowdsourced, moderated tags, applied to legislation by hundreds of people over the course of eight years. Sourced from richmondsunlight.com.
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 3 columns, instead of 8. in line 1.
art,blacksburg,home rule
business,electricity,energy,regulation,results,scc,ssc,utility
business,electricity,energy,regulation,results,scc,ssc,utility
amendment,business,clean air,freedom,loss,marshall,newman,regulation,restaurant,sb,smoking
amendment,business,clean air,freedom,loss,marshall,newman,regulation,restaurant,sb,smoking
alcohol,bar,business,firearm,gun,regulation,restaurant,weapon
alcohol,bar,business,firearm,gun,regulation,restaurant,weapon
court,judge,supreme court,term limits
court,judge,supreme court,term limits
deed,foreclosure,hb,house,mortgage
Open Law Tools (Code) Open Lawmaking Tools (Legislative Data) Supportive Policies Supportive Organizations
AmLegal Decoder, AmericaDecoded (redeploying StateDecoded across the U.S.) AskThem (representative contact information and crowdsourced city council agenda Q&A) New York City passed a resolution amending their City Council Rules to make all proposed ordinances and associated legislative information available openly through an online database and [passed an amendment to the New York city charter](ht