archivesunleashed / auk-notebooks

Jupyter notebooks to assist in creating additional analysis and visualizations of Archives Unleashed Cloud derivatives.
https://cloud.archivesunleashed.org
Other
11 stars 5 forks source link

output_filename is a variable as currently written #16

Closed ruebot closed 5 years ago

ruebot commented 5 years ago

This example in the "Text Analysis" section will fail if uncomment as directed because output_filename is an undefined variable, not a string.

## Removing the # on the following line will write the results to a file entitled `output_filename`

#write_output(output_filename, year_results)
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-9-6bd5d6cf343c> in <module>
      8 ## Removing the # on the following line will write the results to a file entitled `output_filename`
      9 
---> 10 write_output(output_filename, year_results)

NameError: name 'output_filename' is not defined

Maybe we should change it to this?

## Removing the # on the following line will write the results to a file entitled `filtered.txt`

#write_output('filtered.txt', year_results)

We probably should add instructions to make it write to a VOLUME or -v mount with Docker too?