fixing text format
Browse files
app.py
CHANGED
@@ -4,12 +4,12 @@ import pandas as pd
|
|
4 |
import streamlit as st
|
5 |
import altair as alt
|
6 |
|
7 |
-
st.title('
|
8 |
-
|
9 |
-
st.
|
10 |
|
11 |
ufo_url = "https://github.com/UIUC-iSchool-DataViz/is445_data/raw/main/ufo-scrubbed-geocoded-time-standardized-00.csv"
|
12 |
-
st.
|
13 |
column_names = ['Date', 'City', 'State', 'Country', 'Shape', 'Duration(s)', 'Duration Time', 'Description', 'Report Date', 'Latitude', 'Longitude']
|
14 |
df = pd.read_csv(ufo_url, header=None, names=column_names)
|
15 |
|
@@ -51,7 +51,14 @@ chart = alt.vconcat(line, scatter).resolve_legend(color='independent', size='ind
|
|
51 |
|
52 |
st.altair_chart(chart, theme="streamlit", use_container_width=True)
|
53 |
|
54 |
-
st.markdown("For the first visualization, plot 1 'Monthly UFO Sightings after 2010', \
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
|
56 |
st.markdown("In the second visualization, the geographical distribution, shape, and duration time of these UFO sightings in Illinois after 2010 are shown. \
|
57 |
I chose scatter plot since the longitude and latitude can be clearly visualized within Illinois coordinates. (The scales for x axis and y axis are selected according to Illinois coordinates.)\
|
|
|
4 |
import streamlit as st
|
5 |
import altair as alt
|
6 |
|
7 |
+
st.title('UFO Sightings in Illinois after 2010')
|
8 |
+
st.text('My Streamlit App for IS 445 Data Viz Homework 6')
|
9 |
+
st.markdown("The URL for this app is: https://huggingface.co/spaces/Chloecky/is445_hw6")
|
10 |
|
11 |
ufo_url = "https://github.com/UIUC-iSchool-DataViz/is445_data/raw/main/ufo-scrubbed-geocoded-time-standardized-00.csv"
|
12 |
+
st.markdown(f"The URL for the raw UFO data is: {ufo_url}")
|
13 |
column_names = ['Date', 'City', 'State', 'Country', 'Shape', 'Duration(s)', 'Duration Time', 'Description', 'Report Date', 'Latitude', 'Longitude']
|
14 |
df = pd.read_csv(ufo_url, header=None, names=column_names)
|
15 |
|
|
|
51 |
|
52 |
st.altair_chart(chart, theme="streamlit", use_container_width=True)
|
53 |
|
54 |
+
st.markdown("For the first visualization, plot 1 'Monthly UFO Sightings after 2010', \
|
55 |
+
I created a line chart highlighting the changes in UFO sightings in Illinois State over time. \
|
56 |
+
The temporal data 'Year-Month' was chosen as x-axis to help understand the monthly fluctuations. \
|
57 |
+
Points on the line and tooltips help audiences identify specifc monthly counts easily. \
|
58 |
+
For colors and marks, I employed standard line and markers without additional distracting color encodings to keep it clean. \
|
59 |
+
A brush selection is applied to this graph, letting user to choose the time interval and then update the corresponding data in plot 2 to display only the sightings reported within the chosen period. \
|
60 |
+
If I had more time, I would consider adding dropdowns to let users select the year and state they are interested in, allowing them to explore more on the UFO dataset. \
|
61 |
+
There is no overlap with the analysis done for HW5 in this plot.")
|
62 |
|
63 |
st.markdown("In the second visualization, the geographical distribution, shape, and duration time of these UFO sightings in Illinois after 2010 are shown. \
|
64 |
I chose scatter plot since the longitude and latitude can be clearly visualized within Illinois coordinates. (The scales for x axis and y axis are selected according to Illinois coordinates.)\
|