Modern business applications bring together many strands of development. You’re no doubt most familiar with n-tier applications, building on decades of programming skills and techniques, linking UI to code and to data. They’re familiar and easy to understand. But that all changes when you start to add new technologies and approaches, constructing massively scalable distributed computing platforms that take advantage of large amounts of data and machine learning.
Much of modern machine learning builds on using analytical tools to explore data and develop rules for showing statistically significant outliers. Although specialized neural networks handle complex speech and image recognition, most problems don’t require particularly complex models—especially if you’re using predictive algorithms on streams of data from sensors or other IoT hardware. Even so it’s important to try new algorithms out on realm data before you implement them.
Introducing Azure Notebooks
Getting to grips with machine learning can be tricky. It’s hard to visualize data at scale, and harder still to understand how analytics can drive machine learning. That’s where Azure Notebooks come in, giving you a place to explore analytics using familiar languages in a playground where you can try out code and visualizations, sharing results with colleagues, and adding descriptive text around your code and results for presentations to management and your team.
Azure Notebooks is an implementation of the widely used open-source Jupyter Notebook. Supporting more than 40 different languages, Jupyter Notebooks can run locally as well as on the cloud, and you can bring code that’s developed on Azure into a private Jupyter Notebook, ready for sharing on-premises—or if you need to work with cloud code on a plane.
All you need to start is a Microsoft account and a modern web browser, though public notebooks don’t need a login. Once you’ve set up an account, you can create and save new notebooks or clone existing ones for your own experiments. There’s support for both personal and work accounts, so you can work with Azure Notebooks as a development tool for trying out ideas on your own time, or to share code and documentation as part of a development team.
A playground for analytics and machine learning
The underlying technologies are familiar: You can add content around executable code playgrounds using Markdown to format text. Azure Notebooks automatically adds UI to your code snippets, and you can use any of a selection of visualization tools for charting results. Data can be uploaded to and downloaded from local PCs, so you can take files you’ve been using with Excel’s analytics and use them in Azure Notebooks, letting you compare results and use business intelligence tools to prepare data before it’s used.
You import online data with Curl or Wget, using Python code in a notebook or from a notebook’s built-in terminal window. There’s also integration with Dropbox, so you can share files with colleagues or use it to ensure you’re always working with the latest version of a file.
Although Microsoft provides most of the tools you’ll need, it can only really support general-purpose analytical operations with tools like Python’s Anaconda data science extensions. If you need specialized libraries, such as to handle a specific mathematical or machine learning operation, or if you want to use a tool that’s in common use in your organization, you can install code from language-specific package managers via the notebook terminal.
Building libraries from notebooks
Groups of Notebooks save as Libraries, with a dashboard to help manage and control your libraries. As well as sharing individual notebooks, Azure Notebooks gives controlled access to entire libraries for coworkers and collaborators, as well as wide-open access to any libraries you make public.
Public libraries aren’t the only way of bringing code into Azure Notebooks; you can also import from GitHub repos. If you save a library into GitHub, why not make it easier for others to use your code by adding a GitHub badge to your readme file that automatically clones and launches your saved notebooks?
If you find a public Azure Notebook you want to work with, all you need to do is make a clone of it. Perhaps it explores a predictive maintenance machine-learning algorithm that might work well with your IoT sensors, so add your own visualizations and data to a clone, as well as tweak any code. If it works, you can implement the algorithm or a derivative in your application. By using an Azure Notebook as a code what-if, you can explore how different algorithms affect your code without having to build the entire application into a test environment.
Learn, try, and learn again
Azure Notebooks is not a full implementation of Jupyter Notebooks, but the subset that Microsoft offers is tailored to the tools in Azure’s analytics and machine learning platforms. It’s also currently free, though there are some memory and storage limitations: You can use only 4GB of memory per user, with 1GB of stored data. Microsoft also whitelists external data sources, and although it responds to user requests you may not have access to third-party data you want to use, so you may prefer to build and upload any extracts you need.
One important use of Azure Notebooks is as a training platform. You can use it to start learning different versions of Python (which is how I’ve been using them, because I’ve realized that I’ve got a large Python-shaped hole in my language knowledge), of R, or even F#. Microsoft provides a library of notebooks to help you learn other tools, including using Python with its CNTK deep learning framework and building and training Azure ML models.
Having a sandbox to play in is a good way to learn new techniques, especially with machine learning and other analytic techniques. But Azure Notebooks also has built-in presentation tools, so if you’ve come up with something that could work in a project, annotate your notebook code in Markdown and share it with colleagues.
Making Azure Notebooks part of your development process makes development more collaborative, letting you try out code and get comments before it’s used in your day-to-day development environment.