# put streamlit code here as needed import streamlit as st import altair as alt st.title('Homework 5.1 App') st.header("Chart 1 Square Footage and County Based on Building Count") url = 'https://raw.githubusercontent.com/UIUC-iSchool-DataViz/is445_data/main/building_inventory.csv' chart1 = alt.Chart.from_dict({ "data": {"url": url}, "mark": "rect", "height": 400, "encoding": { "x": {"bin": {"maxbins": 15}, "field": "Square Footage", "type": "quantitative"}, "y": {"field": "County", "type": "ordinal"}, "color": {"aggregate": "count", "type": "quantitative"} } }) chart1 st.markdown('This visualization emphasizes the distribution of buildings across counties by square footage, offering a clear view of where larger or smaller buildings are concentrated. By binning the Square Footage on the x-axis, the chart groups buildings into size categories, making it easier to identify size patterns within each county. Counties are placed on the y-axis in an ordinal scale to show the count distribution without implying a numerical relationship between counties. The color scale, representing building count, visually highlights the density of buildings within each square footage range, where darker colors indicate higher counts. Given more time, I would enhance the chart’s interactivity, perhaps with hover-based tooltips to display precise counts and filters to allow viewers to focus on specific counties or building statuses.') st.header("Building Acquisitions by Year") chart2 = alt.Chart.from_dict({ "data": {"url": url}, "mark": "bar", "encoding": { "x": {"field": "Year Acquired", "bin": True, "type": "quantitative", "axis": {"title": "Year Acquired"}}, "y": {"aggregate": "count", "type": "quantitative", "axis": {"title": "Building Count"}} } }) chart2 st.markdown("This visualization highlights the distribution of buildings based on the year they were acquired, giving insights into periods of significant property acquisition activity. The bar chart format is ideal for showing frequency distributions over time, with the x-axis displaying Year Acquired in binned increments, and the y-axis representing the count of buildings. A simple color scheme is used to keep focus on the distribution pattern rather than specific years. I used a quantitative scale on the y-axis to emphasize the count of buildings acquired within each time range, which helps to identify peaks in acquisition activity easily. If I had more time, I would explore using additional colors to represent different building statuses or locations (such as counties), adding depth to the analysis by revealing whether acquisition trends vary by these factors.")