From 433757e135de8a0e83eaa85754d61dfc9446fb3d Mon Sep 17 00:00:00 2001 From: Nikhil Woodruff Date: Tue, 17 Sep 2024 19:11:16 +0100 Subject: [PATCH] Use correct folder names --- .gitignore | 1 + policyengine_uk_data/storage/download_private_prerequisites.py | 2 ++ policyengine_uk_data/utils/imputations/consumption.py | 2 +- policyengine_uk_data/utils/imputations/income.py | 2 +- policyengine_uk_data/utils/imputations/vat.py | 2 +- policyengine_uk_data/utils/imputations/wealth.py | 2 +- 6 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 61b49b8..f07f442 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ **/*.csv **/*.zip **/*.pkl +**/*.tab !uprating_factors.csv !uprating_growth_factors.csv !incomes.csv diff --git a/policyengine_uk_data/storage/download_private_prerequisites.py b/policyengine_uk_data/storage/download_private_prerequisites.py index b5f8e34..f2813a5 100644 --- a/policyengine_uk_data/storage/download_private_prerequisites.py +++ b/policyengine_uk_data/storage/download_private_prerequisites.py @@ -18,6 +18,8 @@ def extract_zipped_folder(folder): ] for file in FILES: + if (FOLDER / file).exists(): + continue download( "PolicyEngine", "ukda", diff --git a/policyengine_uk_data/utils/imputations/consumption.py b/policyengine_uk_data/utils/imputations/consumption.py index 6de810f..2270f72 100644 --- a/policyengine_uk_data/utils/imputations/consumption.py +++ b/policyengine_uk_data/utils/imputations/consumption.py @@ -5,7 +5,7 @@ import yaml from policyengine_uk_data.storage import STORAGE_FOLDER -LCFS_TAB_FOLDER = Path("/Users/nikhilwoodruff/Downloads/UKDA-9123-tab/tab") +LCFS_TAB_FOLDER = STORAGE_FOLDER / "lcfs_2021_22" REGIONS = { 1: "NORTH_EAST", diff --git a/policyengine_uk_data/utils/imputations/income.py b/policyengine_uk_data/utils/imputations/income.py index 7cc2558..95d3947 100644 --- a/policyengine_uk_data/utils/imputations/income.py +++ b/policyengine_uk_data/utils/imputations/income.py @@ -4,7 +4,7 @@ import numpy as np from policyengine_uk_data.storage import STORAGE_FOLDER -SPI_TAB_FOLDER = Path("/Users/nikhilwoodruff/Downloads/UKDA-9121-tab/tab") +SPI_TAB_FOLDER = STORAGE_FOLDER / "spi_2020_21" SPI_RENAMES = dict( private_pension_income="PENSION", self_employment_income="PROFITS", diff --git a/policyengine_uk_data/utils/imputations/vat.py b/policyengine_uk_data/utils/imputations/vat.py index 868f441..9519212 100644 --- a/policyengine_uk_data/utils/imputations/vat.py +++ b/policyengine_uk_data/utils/imputations/vat.py @@ -4,7 +4,7 @@ import numpy as np from policyengine_uk_data.storage import STORAGE_FOLDER -ETB_TAB_FOLDER = Path("/Users/nikhilwoodruff/Downloads/UKDA-8856-tab/tab") +ETB_TAB_FOLDER = STORAGE_FOLDER / "etb_1977_21" CONSUMPTION_PCT_REDUCED_RATE = 0.03 # From OBR's VAT page CURRENT_VAT_RATE = 0.2 diff --git a/policyengine_uk_data/utils/imputations/wealth.py b/policyengine_uk_data/utils/imputations/wealth.py index 686a9b3..2513f5d 100644 --- a/policyengine_uk_data/utils/imputations/wealth.py +++ b/policyengine_uk_data/utils/imputations/wealth.py @@ -5,7 +5,7 @@ import yaml from policyengine_uk_data.storage import STORAGE_FOLDER -WAS_TAB_FOLDER = Path("/Users/nikhilwoodruff/Downloads/UKDA-7215-tab/tab") +WAS_TAB_FOLDER = STORAGE_FOLDER / "was_2006_20" REGIONS = { 1: "NORTH_EAST",