5 Exploratory coding

 

This chapter covers

  • Understanding how having a fast feedback loop makes you more productive
  • Prototyping to explore our data and develop our understanding
  • Starting prototyping with Excel
  • Continuing prototyping with Node.js and the browser
  • Setting up a live reload coding pipeline, where code changes automatically flow through to data and visual output

In this chapter, we’ll use exploratory coding to delve into your data and build your knowledge and understanding. We’ll use a small example data set that’s easy to understand, but in the real world the need to explore and understand our data grows with larger and larger data sets.

This chapter is a microcosm of the data-wrangling process. We’ll move through acquisition, then exploration and understanding, then analysis, and finally arrive at visualization. Our focus here though is on fast prototyping, with an emphasis on having a streamlined and effective feedback loop so that we can code quickly and see results immediately.

The output from the exploration phase of the data-wrangling process is

  • An improved understanding of your data
  • JavaScript code that’s potentially usable in production

5.1 Expanding your toolkit

In this chapter we’ll expand our data-wrangling toolkit in a number of ways. We’ll use Excel for initial prototyping and visualization. Once we reach the limits of Excel, we’ll move to Node.js for exploration and analysis and later still to the browser for visualization.

5.2 Analyzing car accidents

5.3 Getting the code and data

5.4 Iteration and your feedback loop

5.5 A first pass at understanding your data

5.6 Working with a reduced data sample

5.7 Prototyping with Excel

5.8 Exploratory coding with Node.js

5.8.1 Using Nodemon

5.8.2 Exploring your data

5.8.3 Using Data-Forge

5.8.4 Computing the trend column

5.8.5 Outputting a new CSV file

5.9 Exploratory coding in the browser

Putting it all together

Summary