extended broadband, fema table, updated map
This commit is contained in:
@@ -820,16 +820,8 @@
|
||||
" from {FILES_TABLE}\n",
|
||||
" where as_of_date = %s\n",
|
||||
" and category = 'Summary'\n",
|
||||
" and subcategory in (\n",
|
||||
" 'Summary by Geography Type - Other Geographies',\n",
|
||||
" 'Summary by Geography Type - Census Place'\n",
|
||||
" )\n",
|
||||
" order by case subcategory\n",
|
||||
" when 'Summary by Geography Type - Other Geographies' then 0\n",
|
||||
" when 'Summary by Geography Type - Census Place' then 1\n",
|
||||
" else 2\n",
|
||||
" end,\n",
|
||||
" file_id\n",
|
||||
" and subcategory = 'Summary by Geography Type - Other Geographies'\n",
|
||||
" order by file_id\n",
|
||||
" \"\"\",\n",
|
||||
" (as_of_date,),\n",
|
||||
" )\n",
|
||||
@@ -1207,8 +1199,9 @@
|
||||
" when coalesce((fcc_summary_json ->> 'speed_02_02')::numeric, 0) > 0 then 0.2\n",
|
||||
" else null\n",
|
||||
" end,\n",
|
||||
" fcc_100_20_provider_count = null,\n",
|
||||
" fcc_bdc_status = case\n",
|
||||
" when fcc_bdc_status = 'fcc_summary_joined' then 'fcc_summary_joined_derived'\n",
|
||||
" when fcc_bdc_status = 'fcc_summary_joined' then 'fcc_summary_joined_county'\n",
|
||||
" else fcc_bdc_status\n",
|
||||
" end,\n",
|
||||
" updated_at = now()\n",
|
||||
@@ -1218,7 +1211,7 @@
|
||||
" )\n",
|
||||
" derived_rows = cur.rowcount\n",
|
||||
"\n",
|
||||
"print(f'Derived scalar columns for rows: {derived_rows:,}')"
|
||||
"print(f'Derived county-summary speed scalar columns for rows: {derived_rows:,}')"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -1363,10 +1356,10 @@
|
||||
" )\n",
|
||||
" update {CONNECTION_TABLE} c\n",
|
||||
" set\n",
|
||||
" fcc_provider_count = s.provider_count,\n",
|
||||
" fcc_fiber_provider_count = s.fiber_provider_count,\n",
|
||||
" fcc_cable_provider_count = s.cable_provider_count,\n",
|
||||
" fcc_fixed_wireless_provider_count = s.fixed_wireless_provider_count,\n",
|
||||
" fcc_provider_count = null,\n",
|
||||
" fcc_fiber_provider_count = null,\n",
|
||||
" fcc_cable_provider_count = null,\n",
|
||||
" fcc_fixed_wireless_provider_count = null,\n",
|
||||
" fcc_summary_json = jsonb_set(\n",
|
||||
" coalesce(c.fcc_summary_json, '{{}}'::jsonb),\n",
|
||||
" '{{provider_summary}}',\n",
|
||||
@@ -1376,7 +1369,8 @@
|
||||
" 'fiber_provider_count', s.fiber_provider_count,\n",
|
||||
" 'cable_provider_count', s.cable_provider_count,\n",
|
||||
" 'fixed_wireless_provider_count', s.fixed_wireless_provider_count,\n",
|
||||
" 'copper_provider_count', s.copper_provider_count\n",
|
||||
" 'copper_provider_count', s.copper_provider_count,\n",
|
||||
" 'scope', 'global_catalog_not_data_center_specific'\n",
|
||||
" ),\n",
|
||||
" true\n",
|
||||
" ),\n",
|
||||
@@ -1472,11 +1466,11 @@
|
||||
"source": [
|
||||
"## Phase 2B: Derive Scalar Broadband Columns from Summary JSON\n",
|
||||
"\n",
|
||||
"This step derives scalar speed columns from `fcc_summary_json` for easier SQL use.\n",
|
||||
"This step derives speed scalar columns from county-summary coverage shares and leaves provider-count columns null unless location- or tract-keyed provider data are available.\n",
|
||||
"\n",
|
||||
"Notes:\n",
|
||||
"- `fcc_max_advertised_download_mbps` / `fcc_max_advertised_upload_mbps` are estimated from the highest speed tier with non-zero availability share.\n",
|
||||
"- Provider-count columns are populated from the separate provider-summary catalog, which is global catalog context rather than geography-specific broadband coverage."
|
||||
"- `fcc_max_advertised_download_mbps` / `fcc_max_advertised_upload_mbps` are county-summary indicators derived from the highest speed tier with non-zero availability share.\n",
|
||||
"- Provider-summary aggregates are stored in `fcc_summary_json -> provider_summary` with `scope = global_catalog_not_data_center_specific`; scalar provider-count columns stay null until a location- or tract-keyed build is added."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user