Skip to content

Commit fb68c48

Browse files
Create deaths_single.md
1 parent b8e3875 commit fb68c48

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

docs/curated_assets/deaths_single.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
layout: default
3+
title: Deaths - Single
4+
nav_order: 1
5+
parent: Deaths
6+
grand_parent: Curated Assets
7+
permalink: /curated_assets/deaths/deaths_single
8+
---
9+
10+
# Deaths - Single
11+
12+
<a href="https://github.com/BHFDSC/hds_curated_assets/blob/main/D09-deaths.py" class="btn btn-primary fs-5 mb-4 mb-md-0 mr-2" target="_blank">View code on GitHub</a>
13+
14+
The *deaths_single* table is compiled from the latest archived version of the Civil Registration of Deaths table. The table is curated such that the output contains a single record of death for each unique person ID. Initially, rows in which the person ID is null are removed. Records are subsequently grouped by person ID and ordered by (earliest) registration date, date of death and underlying cause of death. The first of these records is retained and any duplicate records for the same person ID are dropped based on this criterion.
15+
16+
The table is saved to the DSA schema **dsa_391419_j3w9t_collab**. The archived_on_date is in the format **YYYY_MM_DD**.
17+
18+
{: .highlight-title }
19+
> Table Name
20+
>
21+
> >
22+
> hds_curated_assets__deaths_single_archived_on_date
23+
24+
The below code will load the deaths_single table as at October 2024 using PySpark:
25+
26+
{% highlight markdown %}
27+
```python
28+
import pyspark.sql.functions as f
29+
dsa = f'dsa_391419_j3w9t_collab'
30+
demographics_table = spark.table(f'{dsa}.hds_curated_assets__deaths_single_2024_10_01')
31+
```
32+
{% endhighlight %}

0 commit comments

Comments
 (0)