Spaces:
Sleeping

dn commited on
Commit
03e4625
·
1 Parent(s): a67b6ba

minor text changes to notebook

Browse files
Files changed (2) hide show
  1. .github/workflows/ci.yml +2 -1
  2. notebooks/sb79map.py +15 -8
.github/workflows/ci.yml CHANGED
@@ -42,4 +42,5 @@ jobs:
42
  env:
43
  HF_TOKEN: ${{ secrets.HF_TOKEN }}
44
  run: |
45
- git push -f https://dom-dom:$HF_TOKEN@huggingface.co/spaces/missing-metro/notebooks main
 
 
42
  env:
43
  HF_TOKEN: ${{ secrets.HF_TOKEN }}
44
  run: |
45
+ git push -f https://dom-dom:$HF_TOKEN@huggingface.co/spaces/missing-metro/notebooks main
46
+
notebooks/sb79map.py CHANGED
@@ -171,7 +171,7 @@ def _(file_input, page, page_size):
171
  start = page.value * page_size
172
  end = start + page_size
173
  mo.md("""Only showing a subset of 4000 parcels, use the slider above to see different parcel subsets.
174
- Final calculations are done on all parcels. Grey parcels are ineligible for residential development.""")
175
  return end, start
176
 
177
 
@@ -185,7 +185,7 @@ def _(end, scag_parcels, start):
185
  def _(new_stops, scag_parcels):
186
  with mo.status.spinner(title="Calculating housing density...") as _spinner:
187
  scag_with_density = compute_scag_density(scag_parcels=scag_parcels)
188
- scag_with_dwelling_units = compute_dwelling_units(stops_gdf=new_stops, scag_density=scag_with_density) # noqa: F841
189
  return (scag_with_dwelling_units,)
190
 
191
 
@@ -195,6 +195,16 @@ def _(end, scag_with_dwelling_units, start):
195
  return
196
 
197
 
 
 
 
 
 
 
 
 
 
 
198
  @app.cell
199
  def _(end, scag_with_dwelling_units, start):
200
 
@@ -220,12 +230,9 @@ def _(file_input, scag_with_dwelling_units):
220
  mo.md(f"""
221
  Total potential dwelling units for {file_input.name()}: {int(scag_with_dwelling_units["additional_du"].sum())}
222
 
223
- Some SCAG zoning codes are non-specific and can represent a mix of residential, commercial, park, or institutional uses
224
- and it is not always possible to determine from the data alone whether a parcel is a viable housing development site.
225
- These parcels are included in the calculations and may inflate the overall estimates.
226
  Zoning is just one hurdle in the housing crisis and there are many other factors that determine
227
- whether a parcel would be developed or not, but this gives a general idea of the potential for increased density
228
- and dwelling units under SB 79.
229
  """)
230
  return
231
 
@@ -240,7 +247,7 @@ def _():
240
  @app.cell(hide_code=True)
241
  def _(scag_with_dwelling_units, stops):
242
  mo.stop(scag_with_dwelling_units is None)
243
- m = folium.Map(location=[34.0617140033952, -118.314146442073], tiles="CartoDB Positron", zoom_start=5)
244
 
245
  VectorGridProtobuf(PARCEL_TILES_URL, "folium_layer_name").add_to(m)
246
  cluster = MarkerCluster(disable_clustering_at_zoom=10).add_to(m)
 
171
  start = page.value * page_size
172
  end = start + page_size
173
  mo.md("""Only showing a subset of 4000 parcels, use the slider above to see different parcel subsets.
174
+ Final calculations are done on all parcels.""")
175
  return end, start
176
 
177
 
 
185
  def _(new_stops, scag_parcels):
186
  with mo.status.spinner(title="Calculating housing density...") as _spinner:
187
  scag_with_density = compute_scag_density(scag_parcels=scag_parcels)
188
+ scag_with_dwelling_units = compute_dwelling_units(stops_gdf=new_stops, scag_density=scag_with_density)
189
  return (scag_with_dwelling_units,)
190
 
191
 
 
195
  return
196
 
197
 
198
+ @app.cell
199
+ def _(scag_with_dwelling_units):
200
+ mo.stop(scag_with_dwelling_units is None)
201
+ mo.md("""
202
+ 1. Grey parcels are ineligible for residential development.
203
+ 2. du_per_ac is dwelling units per acre.
204
+ """)
205
+ return
206
+
207
+
208
  @app.cell
209
  def _(end, scag_with_dwelling_units, start):
210
 
 
230
  mo.md(f"""
231
  Total potential dwelling units for {file_input.name()}: {int(scag_with_dwelling_units["additional_du"].sum())}
232
 
 
 
 
233
  Zoning is just one hurdle in the housing crisis and there are many other factors that determine
234
+ whether a parcel would be developed or not, but this gives a general idea of the potential for
235
+ increased housing development under SB 79.
236
  """)
237
  return
238
 
 
247
  @app.cell(hide_code=True)
248
  def _(scag_with_dwelling_units, stops):
249
  mo.stop(scag_with_dwelling_units is None)
250
+ m = folium.Map(location=[35.6617140033952, -118.314146442073], tiles="CartoDB Positron", zoom_start=6)
251
 
252
  VectorGridProtobuf(PARCEL_TILES_URL, "folium_layer_name").add_to(m)
253
  cluster = MarkerCluster(disable_clustering_at_zoom=10).add_to(m)