Journalism JS
(Or: News Hacking in NodeJS and the Browser)
Although it has taken off with the wider development community, JavaScript is not yet a first choice for programming in many newsrooms, which often prefer Ruby or Python. This is a shame: in addition to being the only language that can be used in the browser, it also has a fast, well-supported server runtime in NodeJS, which uses Google's powerful V8 architecture.
In this set of tutorials, we'll cover how to use modern JavaScript libraries and tools to commit acts of data journalism. We'll process data, scrape web pages, and build interactives using deadline-friendly techniques.
What You'll Need
These tutorials assume some basic familiarity with JavaScript--you
should know about functions, simple data structures, and script tags in
an HTML page. You should also have Node installed. We'll be using NPM to
install dependencies for the Node lessons, and
Bower for client-side lessons. In general, if
there's a package.json
file, you should run npm install
for each
tutorial directory, and if there's a bower.json
, you can use
bower install
to fetch its browser libraries.
Table of Contents
/angular-table-sort - Creating sortable, filtered tables with AngularJS /scraping-by - Intro to Node asynchronicity via web scraping /sparkline - Simple sparklines as an intro to HTML5 Canvas