Skip to content

Commit b674871

Browse files
Update Census_ACS_5yr (#1938)
Update Census_ACS_5yr Made in [Fused Workbench](https://www.fused.io/workbench) Co-authored-by: sina@fused.io <sina@fused.io>
1 parent 2d6e421 commit b674871

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

community/sina/Census_ACS_5yr/Census_ACS_5yr.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,14 @@ def udf(
3737
lambda x: (str(x.split("|")[0]) + str(x.split("|")[-1])) if "|" in x else x
3838
)
3939
print(gdf.columns)
40-
40+
4141
# create a metric columns for the visualization
4242
if suffix == "centroid" or is_density == False:
4343
gdf["metric"] = gdf.iloc[:, 2] * scale_factor / 1000
4444
else:
4545
gdf["metric"] = np.sqrt(gdf.iloc[:, 2] / gdf.area) * scale_factor / 1000
46+
cols = [c for c in gdf.columns if c != "geometry"] + ["geometry"]
47+
gdf = gdf[cols]
4648
return gdf
4749

4850

0 commit comments

Comments
 (0)