ESRI's Notebooks are a Python based line by line scripting tool. We can perform all the ArcPy's geoprocessing analysis with immediate results, automate workflows and share notebooks. Similar in a lot of ways to the model builder but scripted.
Two ways to create a Notebook.
In my experience a Notebook is useful because, I can see what is happening at each stage of the processing clearly and secondly, I can use code Ive already created in other applications like FME with a few small changes.
I'll discuss my approches and what I do to get the results I want or need.
The screenshot below is just the notebook interface. Fairly straight forward, Run at the top to run a peice of code and line underneath for some scrips code, for example: import arcpy
Type in the top cell: import arcpy the click run. That is it, a first simple script that loads arcpy ready for use.
Type in the second cell: (press enter after each line)
sssi = "Sites_of_Special_Scientific_Interest"
desc = arcpy.Describe(sssi)
Now hit run at the top. We get the spatial reference of the layer we chose. Useful if you are unsure of the SRS processing requires a certain SRS.
This is generally how this all works. My suggestion is to work from paper and pen first, decide what you want and what geoprocessing tools to use. Then change this into python code, line by line and build the notebook from there. I have added to example below. I hope this helps, I have left out all the technicals etc and just looked out how we can basically use a notebook.
Three arcpy tools needed.
The Resulting Map
A link worth having for detailed python use of arcpy and all its functions is:
The best bit of advice is - just play and see what happens. Notebooks are quick, nice and cleanly layed out, and it's not just for arcpy, it's for python generally.