A toolkit for using Prevention of Future Death (PFD) Reports for Research and Policy Projects.
Project description
PFD Toolkit 
Turn raw PFD reports into structured insights — fast.
PFD Toolkit is a suite of tools that replaces the manual effort involved in the collection, screening, and thematic discovery of PFD reports. It helps researchers, journalists, and public health analysts turn raw reports into actionable insights.
For more information, please consult package documentation.
Getting started
Installation
pip install pfd_toolkit
Load PFD Report Data (in seconds)
To load PFD data, just import the module, specify the category of reports and your date-range:
from pfd_toolkit import load_reports
reports = load_reports(
start_date="2024-01-01",
end_date="2025-05-01"
)
reports will be a pandas DataFrame. Each row is a separate report, and each column is a report section. For example:
| url | date | coroner | area | receiver | investigation | circumstances | concerns |
|---|---|---|---|---|---|---|---|
| [...] | 2025-05-01 | A. Hodson | Birmingham and... | NHS England; The Rob... | On 9th December 2024... | At 10.45am on 23rd November... | To The Robert Jones... |
| [...] | 2025-04-30 | J. Andrews | West Sussex, Br... | West Sussex C... | On 2 November 2024 I... | They drove their car into... | The inquest was told t... |
| [...] | 2025-04-30 | A. Mutch | Manchester Sou... | Fluxton Road Medical... | On 1 October 2024 I... | They were prescribed long... | The inquest heard evide... |
| [...] | 2025-04-25 | J. Heath | North Yorkshire... | Townhead Surgery | On 4th June 2024 I... | On 15 March 2024, Richar... | When a referral docume... |
| [...] | 2025-04-25 | M. Hassell | Inner North Lo... | The President Royal... | On 23 August 2024, on... | They were a big baby and... | With the benefit of a m... |
PFD Toolkit updates daily with freshly published reports. By default,
load_reports() fetches the latest data each time. To reuse a locally cached
copy for faster loading, set refresh to False:
reports = load_reports(refresh=False)
Key features
Beyond loading reports, PFD Toolkit lets you:
- Screen reports: find cases relevant to your specific research question.
- Summarise text: distill full-length reports into a custom summary.
- Discover themes: uncover recurring topics contained within a selection of reports.
- Categorise: assign and tabulate reports by discovered or user-defined themes.
To get started with these features, please check out the documentation.
Licence
This project is distributed under the GNU Affero General Public License v3.0 (AGPL-3.0). See the LICENCE file for the full text.
Please note:
- You are welcome to use, modify, and share this code under the terms of the AGPL-3.0.
- If you use this code to provide a networked service, you are required to make the complete source code available to users of that service.
- Some project dependencies may have their own licence terms, which could affect certain types of non-research use (e.g. commercial use). Please review all relevant licences to ensure compliance.
Collaborate
We welcome feedback as well as code collaborators! Please read our collaboration page here
How to cite
If you use PFD Toolkit in your research, please cite the archived release:
Osian, S., & Pytches, J. (2025). PFD Toolkit: Unlocking Prevention of Future Death Reports for Research (Version 0.3.7) [Software]. Zenodo. https://doi.org/10.5281/zenodo.15729717
Or, in BibTeX:
@software{osian2025pfdtoolkit,
author = {Sam Osian and Jonathan Pytches},
title = {PFD Toolkit: Unlocking Prevention of Future Death Reports for Research},
year = {2025},
version = {0.3.7},
doi = {10.5281/zenodo.15729717},
url = {https://github.com/sam-osian/PFD-toolkit}
}
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pfd_toolkit-0.4.0.tar.gz.
File metadata
- Download URL: pfd_toolkit-0.4.0.tar.gz
- Upload date:
- Size: 10.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19f1b526d7c56414b184d9c4fc7f2325030bc05873403f5166540b5d3d74b0b2
|
|
| MD5 |
88c4a403b5a33625cedccbdb5065cd2c
|
|
| BLAKE2b-256 |
b4d57ba227638f7fc4ac52403868e515044f6f31fa1558de0f224cea4665a3de
|
File details
Details for the file pfd_toolkit-0.4.0-py3-none-any.whl.
File metadata
- Download URL: pfd_toolkit-0.4.0-py3-none-any.whl
- Upload date:
- Size: 70.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb5d8fa36b2c9b78fc4da9d384f77c5db3fd8e6736d664458abf2edc640ab1cb
|
|
| MD5 |
500a00183c7ee4532ab9b9474642a552
|
|
| BLAKE2b-256 |
918616402affe54e9ebbe59d5043c781a738b86725ebb47195c9ff2913ce7ad5
|