Update app.py
Browse files
app.py
CHANGED
@@ -35,7 +35,13 @@ def plot_land_distribution():
|
|
35 |
# Function to generate the population by county plot
|
36 |
def plot_population_by_county():
|
37 |
county_data = cbg_geographic_data[cbg_geographic_data['pop10'] > 2900].sort_values(by="pop10", ascending=False)
|
38 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
return fig
|
40 |
|
41 |
# Function to create a Folium map with county boundaries
|
|
|
35 |
# Function to generate the population by county plot
|
36 |
def plot_population_by_county():
|
37 |
county_data = cbg_geographic_data[cbg_geographic_data['pop10'] > 2900].sort_values(by="pop10", ascending=False)
|
38 |
+
|
39 |
+
fig = px.bar(county_data,
|
40 |
+
x="cntyname",
|
41 |
+
y="pop10",
|
42 |
+
title="2010 Population by County",
|
43 |
+
orientation='v',
|
44 |
+
labels={"cntyname": "County Name", "pop10": "2010 Population"})
|
45 |
return fig
|
46 |
|
47 |
# Function to create a Folium map with county boundaries
|