JavaScript versus Data Science

November 2018: This material is under very active development, and we would appreciate your help: please email us, file an issue in our GitHub repository, or submit a pull request. (We would particularly appreciate descriptions of common errors and how to fix them.) Everyone whose work is incorporated will be acknowledged; please note that all contributors are required to abide by our Code of Conduct.

We were going to call this book JavaScript for Scientists and Engineers, but David Beazley thought that “versus” would make a better title. That one-word change sums up how many people view the language, but we hope we can convince you that modern JavaScript is usable as well as useful. We changed the second half of the title because hey, data science. We also hope that these lessons will help librarians, digital humanists, and everyone else who uses computing in their research, not just scientists and engineers.

We will cover:

  • Core features of modern JavaScript
  • Programming with callbacks
  • Creating objects and classes
  • Writing HTML and CSS
  • Programming with promises
  • Creating pages with React
  • Making pages interactive
  • Building data services
  • Testing
  • Integrating with a database
  • Data visualization
  • Combining everything to create a three-tier web application

Intended Audience

We assume that you:

  • can write two-page programs that use lists, loops, conditionals, and functions,
  • can run commands in the Unix shell to navigate the filesystem and create and delete directories and files, and
  • have reliable access to the Internet.

Unlike most introductions to JavaScript, these lessons start with server-side programming so that you can become comfortable with the language’s idiosyncracies before writing code that runs in your browser. We devote very little time to styling web pages with CSS; in fact, we devote very little time to any of our subjects. If you want to know more, there are many other free tutorials you can dive into once you’ve mastered the basics, some of which are both up-to-date and well designed.

Contributing

Contributions of all kinds are welcome, from errata and minor improvements to entirely new sections and chapters. Please email us, file an issue in our GitHub repository, or submit a pull request. Everyone whose work is incorporated will be acknowledged; please note that all contributors are required to abide by our Code of Conduct.