Skip to content

Commit 8c0b630

Browse files
authored
Merge pull request #473 from The-Strategy-Unit/drop_icb_from_national_data
sets ICB column to NATIONAL for national runs
2 parents 7a9aa54 + c4d8329 commit 8c0b630

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/nhp/model/data/databricks.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ def get_op(self) -> pd.DataFrame:
223223
.filter(F.col("fyear") == self._year)
224224
.withColumn("dataset", F.lit("NATIONAL"))
225225
.withColumn("sitetret", F.lit("NATIONAL"))
226+
.withColumn("icb", F.lit("NATIONAL"))
226227
# TODO: temporary fix, see #353
227228
.withColumn("sushrg_trimmed", F.lit("HRG"))
228229
.withColumn("imd_quintile", F.lit(0))
@@ -250,6 +251,7 @@ def get_aae(self) -> pd.DataFrame:
250251
.filter(F.col("fyear") == self._year)
251252
.withColumn("dataset", F.lit("NATIONAL"))
252253
.withColumn("sitetret", F.lit("NATIONAL"))
254+
.withColumn("icb", F.lit("NATIONAL"))
253255
.groupBy(aae.drop("index", "fyear", "arrivals").columns)
254256
.agg((F.sum("arrivals") * self._sample_rate).alias("arrivals"))
255257
# TODO: how do we make this stable? at the moment we can't use full model results with

0 commit comments

Comments
 (0)