Skip to content

Commit 0c8e613

Browse files
Update bins (#306)
* update bins * rerun ci
1 parent 1bef2c9 commit 0c8e613

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

ocr/pipeline/fire_wind_risk_regional_aggregator.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def custom_histogram_query(
5858
con: duckdb.DuckDBPyConnection,
5959
geo_table_name: str,
6060
summary_stats_path: UPath,
61-
hist_bins: list[int] | None = [0.01, 0.1, 1, 2, 3, 5, 7, 10, 15, 20, 100],
61+
hist_bins: list[int] | None = [0.003, 0.015, 0.02, 0.03, 0.04, 0.06, 0.1, 0.15, 0.3, 0.6, 100],
6262
):
6363
# optional add if geo_table_name is county, we add a county Name to select.
6464
name_column = 'b.NAME as NAME,' if geo_table_name == 'county' else ''
@@ -109,8 +109,7 @@ def compute_regional_fire_wind_risk_statistics(config: OCRConfig):
109109
block_path = UPath(f's3://{dataset.bucket}/{dataset.prefix}')
110110

111111
# The histogram syntax is kind of strange in duckdb, but since it's left-open, the first bin is values up to 0.01.
112-
hist_bins = [0.01, 0.1, 1, 2, 3, 5, 7, 10, 15, 20, 100]
113-
112+
hist_bins = [0.003, 0.015, 0.02, 0.03, 0.04, 0.06, 0.1, 0.15, 0.3, 0.6, 100]
114113
if config.debug:
115114
console.log(f'Using buildings path: {buildings_path_glob}')
116115

ocr/pipeline/write_aggregated_region_analysis_files.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def write_stats_table(
1515
config: OCRConfig,
1616
region_path: UPath,
1717
stats_table_name: str,
18-
hist_bins: list | None = [0.01, 0.1, 1, 2, 3, 5, 7, 10, 15, 20, 100],
18+
hist_bins: list | None = [0.003, 0.015, 0.02, 0.03, 0.04, 0.06, 0.1, 0.15, 0.3, 0.6, 100],
1919
):
2020
region_analysis_path = config.vector.aggregated_region_analysis_uri
2121
buildings_path = f'{config.vector.region_geoparquet_uri}/*.parquet'
@@ -76,7 +76,7 @@ def write_stats_table(
7676

7777

7878
def write_aggregated_region_analysis_files(config: OCRConfig):
79-
hist_bins = [0.01, 0.1, 1, 2, 3, 5, 7, 10, 15, 20, 100]
79+
hist_bins = [0.003, 0.015, 0.02, 0.03, 0.04, 0.06, 0.1, 0.15, 0.3, 0.6, 100]
8080

8181
counties_dataset = catalog.get_dataset('us-census-counties')
8282
counties_path = UPath(f's3://{counties_dataset.bucket}/{counties_dataset.prefix}')

0 commit comments

Comments
 (0)