Trove government
Resources generated or collected by the Australian Commonwealth Government are available in a number of different locations and formats across Trove. This repository contains tools and examples to work with digitised government publications available through Trove.
See below for information on running these notebooks in a live computing environment. Or just take them for a spin using Binder.
Notebooks¶
Harvest parliament press releases from Trove¶
Trove includes more than 380,000 press releases, speeches, and interview transcripts issued by Australian federal politicians and saved by the Parliamentary Library. This notebook shows you how to harvest both metadata and full text from a search of the parliamentary press releases. The metadata is available from Trove, but to get the full text we have to go back to the Parliamentary Library's database, ParlInfo.
Harvest details of Commonwealth Parliamentary Papers digitised in Trove¶
Trove includes thousands of digitised papers and reports presented to the Commonwealth Parliament. However, finding all the Parliamentary Papers is not straightforward because of inconsistencies in the way they've been arranged and described. This notebook attempts to work around these problems and harvest as complete as possible data about Parliamentary Papers in Trove.
Datasets¶
Press releases relating to COVID¶
Trove includes more than 380,000 press releases, speeches, and interview transcripts issued by Australian federal politicians and saved by the Parliamentary Library. This dataset contains metadata and full text of items from the press releases collection that include the term 'covid' or 'coronavirus'.
Press releases relating to refugees¶
Trove includes more than 380,000 press releases, speeches, and interview transcripts issued by Australian federal politicians and saved by the Parliamentary Library. This dataset contains metadata and full text of items from the press releases collection that include the term 'refugees' (or a number of related terms).
Digitised Parliamentary Papers in Trove¶
This dataset contains metadata describing Commonwealth Parliamentary Papers that have been digitised and are made available through Trove.
Run these notebooks¶
There are a number of different ways to use these notebooks. Binder is quickest and easiest, but it doesn't save your data. I've listed the options below from easiest to most complicated (requiring more technical knowledge).
Using ARDC Binder¶
Click on the button above to launch the notebooks in this repository using the ARDC Binder service. This is a free service available to researchers in Australian universities. You'll be asked to log in with your university credentials. Note that sessions will close if you stop using the notebooks, and no data will be preserved. Make sure you download any changed notebooks or harvested data that you want to save.
See Using ARDC Binder for more details.
Using Binder¶
Click on the button above to launch the notebooks in this repository using the Binder service (it might take a little while to load). This is a free service, but note that sessions will close if you stop using the notebooks, and no data will be saved. Make sure you download any changed notebooks or harvested data that you want to save.
See Using Binder for more details.
Using Reclaim Cloud¶
Reclaim Cloud is a paid hosting service, aimed particularly at supported digital scholarship in hte humanities. Unlike Binder, the environments you create on Reclaim Cloud will save your data – even if you switch them off! To run this repository on Reclaim Cloud for the first time:
- Create a Reclaim Cloud account and log in.
- Click on the button above to start the installation process.
- A dialogue box will ask you to set a password, this is used to limit access to your Jupyter installation.
- Sit back and wait for the installation to complete!
- Once the installation is finished click on the 'Open in Browser' button of your newly created environment (note that you might need to wait a few minutes before everything is ready).
See Using Reclaim Cloud for more details.
Running in a container on your own computer¶
GLAM Workbench repositories are stored as pre-built container images on quay.io. You can run these containers on your own computer to set up a virtual machine with everything you need to use the notebooks. This is free, but requires more technical knowledge – you'll have to install Podman on your computer, and be able to use the command line.
- Install Podman.
- In a terminal, run the following command:
podman run --rm -p 8888:8888 quay.io/glamworkbench/trove-government jupyter lab --ip=0.0.0.0 --port=8888 --ServerApp.token="" --LabApp.default_url="/lab/tree/index.ipynb"
- It will take a while to download and configure the container image. Once it's ready you'll see a message saying that Jupyter Notebook is running.
- Point your web browser to
http://127.0.0.1:8888
- When you've finished, download any files or data you want to keep from Jupyter Lab, and enter Ctrl+C int the terminal.
See Running in a container on your own computer for more details.
Setting up on your own computer¶
If you know your way around the command line and are comfortable installing software, you might want to set up your own computer to run these notebooks. You'll need to have recent versions of Python and Git installed. I use pyenv, pyenv-virtualenv, and pip-tools to create and manage Python versions and environments.
In a terminal:
- Create a Python virtual environment (Python >= 3.10 should be ok):
pyenv virtualenv 3.10.12 trove-government
- Activate the virtual environment:
pyenv local trove-government
- Use
git clone
to create a local version of the GLAM Workbench repository:git clone https://github.com/GLAM-Workbench/trove-government.git
- Use
cd
to move into the newly-cloned folder:cd trove-government
- Run
pip install pip-tools
to installpip-tools
. - Run
pip-sync requirements.txt dev-requirements.txt
to install the required Python packages. - Start Jupyter with
jupyter lab
– a browser window should open automatically. If not, copy and paste the url from the command line to your web browser. - To shut down your Jupyter Lab session enter Ctrl+C in the terminal.
See Using Python on your own computer for more details.