Skip to content

Conversation

@karpdave
Copy link
Contributor

@karpdave karpdave commented Jun 12, 2025

UPDATE: Below has been addressed

This needs a little work to be more general, but it "works".

Next steps:

  • A little cleanup
  • Wrapper to call this sequentially for all the possible filters we care about, and concat the dfs accordingly

Once that 2nd point is done, we should have a proper reproducible dataset to work from

@karpdave karpdave requested a review from jpvelez June 13, 2025 18:25
@karpdave karpdave changed the title initial working version of class to get data from Mass Save initial working version of class to get data from Mass Save: addresses #1 Jun 13, 2025
@karpdave
Copy link
Contributor Author

This addresses #1

@karpdave karpdave changed the title initial working version of class to get data from Mass Save: addresses #1 initial working version of class to get data from Mass Save Jun 13, 2025

import json

import pandas as pd
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we use polars rather than pandas?

Copy link
Contributor

Choose a reason for hiding this comment

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

In masssave_explore.qmd as well! No pandas.

@@ -0,0 +1,237 @@
########################################################################################
## masssave_reader.py
## SwitchBox
Copy link
Contributor

Choose a reason for hiding this comment

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

Switchbox ;)

@@ -0,0 +1,237 @@
########################################################################################
Copy link
Contributor

@jpvelez jpvelez Jun 15, 2025

Choose a reason for hiding this comment

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

Let's implement our standard data download pattern from reports:

Rename tmp_data_shared to data, add an ma subdir, and move the existing dataset in tmp_data_shared to data/ma.

Then, let's move this module to data/ma/, rename it masssave_downloader.py, and move the masssave_reader calls from massave_explore.md to a if __name__ == "__main__": block in masssave_downloader.py.

Then add a Makefile task in data/ma/ that calls masssave_downloader.py. If there are any natural parameters that should be defined in masssave_downloader.py and passed via the Makefile, let's do that as well.

The output file should follow the following naming convention: <data_provider>_<topic>_<download_date in YYYMMDD.

df.xs("Total",level="municipality")["installed_hp_locations"].unstack()
```

```{python}
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's move this notebooks to notebooks/, since it doesn't need to ship with the package in hp_adoption to potential users of the model.

@karpdave karpdave requested a review from mshron July 21, 2025 15:35
@jpvelez
Copy link
Contributor

jpvelez commented Dec 11, 2025

Unclear if the Next Steps were fully completed, but I'm merging this in the spirit of cleaning up our outstanding open PRs.

@jpvelez jpvelez merged commit 724f82f into main Dec 11, 2025
7 checks passed
@jpvelez jpvelez deleted the mass_save_download branch December 11, 2025 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants