Skip to content

Commit

Permalink
Merge pull request #20 from PolicyEngine/survey-enhance-dep
Browse files Browse the repository at this point in the history
Move Survey-Enhance to not a top-level import
  • Loading branch information
nikhilwoodruff authored Sep 18, 2024
2 parents dace650 + d75c1da commit 2273e7a
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.2.2] - 2024-09-18 11:38:21

## [1.2.1] - 2024-09-18 10:05:45

### Fixed
Expand All @@ -31,6 +33,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0



[1.2.2]: https://github.com/PolicyEngine/policyengine-us-data/compare/1.2.1...1.2.2
[1.2.1]: https://github.com/PolicyEngine/policyengine-us-data/compare/1.2.0...1.2.1
[1.2.0]: https://github.com/PolicyEngine/policyengine-us-data/compare/1.1.0...1.2.0
[1.1.0]: https://github.com/PolicyEngine/policyengine-us-data/compare/1.0.0...1.1.0
5 changes: 5 additions & 0 deletions changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,8 @@
fixed:
- Data download URLs.
date: 2024-09-18 10:05:45
- bump: patch
changes:
removed:
- Survey Enhance is no longer used as a top-level import.
date: 2024-09-18 11:38:21
3 changes: 2 additions & 1 deletion policyengine_uk_data/utils/imputations/consumption.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from survey_enhance.impute import Imputation
import pandas as pd
from pathlib import Path
import numpy as np
Expand Down Expand Up @@ -133,6 +132,8 @@ def uprate_lcfs_table(


def save_imputation_models():
from survey_enhance.impute import Imputation

consumption = Imputation()
lcfs_household = pd.read_csv(
LCFS_TAB_FOLDER / "lcfs_2021_dvhh_ukanon.tab",
Expand Down
3 changes: 2 additions & 1 deletion policyengine_uk_data/utils/imputations/income.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from survey_enhance.impute import Imputation
import pandas as pd
from pathlib import Path
import numpy as np
Expand Down Expand Up @@ -85,6 +84,8 @@ def generate_spi_table(spi: pd.DataFrame):


def save_imputation_models():
from survey_enhance.impute import Imputation

income = Imputation()
spi = pd.read_csv(SPI_TAB_FOLDER / "put2021uk.tab", delimiter="\t")
spi = generate_spi_table(spi)
Expand Down
3 changes: 2 additions & 1 deletion policyengine_uk_data/utils/imputations/vat.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from survey_enhance.impute import Imputation
import pandas as pd
from pathlib import Path
import numpy as np
Expand Down Expand Up @@ -30,6 +29,8 @@ def generate_etb_table(etb: pd.DataFrame):


def save_imputation_models():
from survey_enhance.impute import Imputation

vat = Imputation()
etb = pd.read_csv(
ETB_TAB_FOLDER / "householdv2_1977-2021.tab",
Expand Down
3 changes: 2 additions & 1 deletion policyengine_uk_data/utils/imputations/wealth.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from survey_enhance.impute import Imputation
import pandas as pd
from pathlib import Path
import numpy as np
Expand Down Expand Up @@ -133,6 +132,8 @@ def generate_was_table(was: pd.DataFrame):


def save_imputation_models():
from survey_enhance.impute import Imputation

was = pd.read_csv(
WAS_TAB_FOLDER / "was_round_7_hhold_eul_march_2022.tab",
sep="\t",
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "policyengine_uk_data"
version = "1.2.1"
version = "1.2.2"
description = "A package to create representative microdata for the UK."
readme = "README.md"
authors = [
Expand Down

0 comments on commit 2273e7a

Please sign in to comment.