Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

08 add map #9

Draft
wants to merge 29 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
cfe2149
update README
crispy-wonton Sep 21, 2023
aec3c3e
update local_data_dir in getters
crispy-wonton Sep 21, 2023
a7be30d
update requirements.txt with versions
crispy-wonton Sep 21, 2023
60b59bc
change outputs to .html files
crispy-wonton Sep 21, 2023
a56f765
fix introduced typo in requirements.txt
crispy-wonton Sep 22, 2023
cf57335
automate all data downloads/loading in script
crispy-wonton Oct 6, 2023
a37451a
update README
crispy-wonton Oct 6, 2023
43fd319
update requirements.txt with argpase
crispy-wonton Oct 6, 2023
cd6d1eb
merge asf_senedd_response wales_analysis.py
crispy-wonton Oct 10, 2023
ba2dc7a
add global parameters to config file
crispy-wonton Oct 10, 2023
ecebb72
merge asf_senedd_response getters from loading.py
crispy-wonton Oct 10, 2023
3c5d597
update function name
crispy-wonton Oct 10, 2023
8768231
add new files from asf_senedd_response repo
crispy-wonton Oct 10, 2023
465e997
resolve merge conflits - merge branch 'dev' into 03_merge_asf_senedd_…
crispy-wonton Oct 13, 2023
31cf6d1
update config variable name in __init__.py
crispy-wonton Oct 13, 2023
bfe9ea3
fix minor errors in produce_plots
crispy-wonton Oct 13, 2023
3a765f0
use new config_file variable name
crispy-wonton Oct 13, 2023
fd5d6e6
update domain min and max variables in time_series_comparison
crispy-wonton Oct 13, 2023
7518c22
update README with new output files
crispy-wonton Oct 13, 2023
1f29a92
update plot max dates for newest EPC/MCS batches
crispy-wonton Oct 13, 2023
97899cd
add supp_data arg
crispy-wonton Oct 13, 2023
c93f5a1
add function to get postcodes to coords
crispy-wonton Oct 13, 2023
9779cff
add functions to produce kepler map
crispy-wonton Oct 13, 2023
a35e03d
update README with supp_data arg and historical analyses
crispy-wonton Oct 13, 2023
b2d9361
delete formatting file and merge augmenting with process_data.py
crispy-wonton Oct 13, 2023
f79bd33
add logging and improve how default domain min and max is determined
crispy-wonton Oct 16, 2023
84694fa
update import statements to remove import *
crispy-wonton Oct 16, 2023
a909fd3
fix merge conflicts - merge branch '03_merge_asf_senedd_repo' into 08…
crispy-wonton Oct 16, 2023
f8177ed
fix import errors
crispy-wonton Oct 16, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 26 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@ The remainder of the charts in the response can be produced from code in the rep
- Install packages listed in `requirements.txt`
- Activate conda environment: `conda activate asf_welsh_energy_consultation`
- Run `make inputs-pull` to pull the zipped static data from S3 and put it in `/inputs`

- Run `python asf_welsh_energy_consultation/analysis/produce_plots.py --local_data_dir <YOUR_LOCAL_DIR>`. You need to specify the path to the local
directory where your local copy of the EPC data is/will be saved by replacing `<YOUR_LOCAL_DIR>` with the path to your "ASF_data" directory or equivalent.
If you don't have a local directory for ASF core data, you can create a folder called "ASF_data" in your home directory. You can specify which
batch of EPC data to download and MCS data to load from S3 by passing the `--epc_batch` and `--mcs_batch` arguments, both
default to downloading/loading the newest data from S3, respectively. Run `python asf_welsh_energy_consultation/analysis/produce_plots.py -h` for more info.
If you don't have a local directory for ASF core data, you can create a folder called "ASF_data" in your home directory.

- You can specify which batch of EPC data to download and MCS data to load from S3 by passing the `--epc_batch` and `--mcs_batch` arguments, both
default to downloading/loading the newest data from S3, respectively. You can also specify which set of supplementary data should be used by passing
the `--supp_data` argument followed by the name of the directory, e.g. data_202310. See the `Historical analyses` section below to see which version was used for each analysis.
Run `python asf_welsh_energy_consultation/analysis/produce_plots.py -h` for more info.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will need to be changed after you merge the PR number 3, as it's now produce_plots_and_stats.py


The script should generate the following six plots which will be saved in your local repo in `outputs/figures`:

Expand All @@ -34,6 +36,16 @@ The script should generate the following six plots which will be saved in your l
- `new_build_hp_cumulative.html`
- `new_build_hp_proportion.html`

It should generate a further 10 plots, five in English and five in Welsh, saved in `outputs/figures/english` and `outputs/figures/welsh`, respectively:

- `age_prop[_welsh].png`
- `epc_all[_welsh].html`
- `epc_hp_private_retrofit[_welsh].html`
- `epc_hp_private[_welsh].html`
- `hp_tenure[_welsh].html`

An additional figure, `hp_map.html`, should be saved in `outputs/figures/english`.

## Skeleton folder structure

```
Expand All @@ -57,8 +69,18 @@ outputs/

Versions/batches of data used for previous analysis are listed below.

October 2023 analysis:

- Supplementary data: data_202310
- EPC: 2023_Q2_complete (preprocessed)
- mcs_installations_231009.csv
- mcs_installations_epc_full_231009.csv
- off-gas-live-postcodes-2022.xlsx - check [here](https://www.xoserve.com/a-to-z/) for updates
- rurality.ods - 2011 Rural Urban Classification for small area geographies, see [here](https://www.ons.gov.uk/methodology/geography/geographicalproducts/ruralurbanclassifications)

Comment on lines +72 to +80
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great! :)

April 2023 analysis:

- Supplementary data: data_202304
- EPC: 2022_Q4_complete (preprocessed)
- mcs_installations_230315.csv
- mcs_installations_epc_full_230315.csv
Expand Down
2 changes: 1 addition & 1 deletion asf_welsh_energy_consultation/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ def get_yaml_config(file_path: Path) -> Optional[dict]:

# base/global config
_base_config_path = Path(__file__).parent.resolve() / "config/base.yaml"
config = get_yaml_config(_base_config_path)
config_file = get_yaml_config(_base_config_path)
Loading