Spaces:
Build error
Build error
Update pages/1_Tweets_Visualization_π_.py
Browse files
pages/1_Tweets_Visualization_π_.py
CHANGED
|
@@ -44,14 +44,14 @@ try:
|
|
| 44 |
st.subheader('Sentiment Scatter Plot')
|
| 45 |
## Display negative sentence locations
|
| 46 |
ht = df.tweet.apply(lambda txt: '<br>'.join(textwrap.wrap(txt, width=70)))
|
| 47 |
-
fig = px.scatter(df, y='sentiment', x='creation_time', color='
|
| 48 |
color_discrete_map={"Bearish":"firebrick","Neutral":"navajowhite","Bullish":"darkgreen"}, \
|
| 49 |
title='Sentiment Score Distribution')
|
| 50 |
|
| 51 |
fig.update_layout(
|
| 52 |
showlegend=False,
|
| 53 |
autosize=True,
|
| 54 |
-
width=
|
| 55 |
height=500,
|
| 56 |
margin=dict(
|
| 57 |
b=5,
|
|
@@ -66,13 +66,13 @@ try:
|
|
| 66 |
st.subheader('Topic Distribution Scatter Plot')
|
| 67 |
## Display negative sentence locations
|
| 68 |
ht = df.tweet.apply(lambda txt: '<br>'.join(textwrap.wrap(txt, width=70)))
|
| 69 |
-
fig = px.scatter(df, y='topic', x='creation_time', color='sentiment', size='topic_confidence', hover_data=[ht,'
|
| 70 |
title='Topic Score Distribution')
|
| 71 |
|
| 72 |
fig.update_layout(
|
| 73 |
showlegend=False,
|
| 74 |
autosize=True,
|
| 75 |
-
width=
|
| 76 |
height=500,
|
| 77 |
margin=dict(
|
| 78 |
b=5,
|
|
|
|
| 44 |
st.subheader('Sentiment Scatter Plot')
|
| 45 |
## Display negative sentence locations
|
| 46 |
ht = df.tweet.apply(lambda txt: '<br>'.join(textwrap.wrap(txt, width=70)))
|
| 47 |
+
fig = px.scatter(df, y='sentiment', x='creation_time', color='sentiment', size='sentiment_confidence', hover_data=[ht,'topic','username'], \
|
| 48 |
color_discrete_map={"Bearish":"firebrick","Neutral":"navajowhite","Bullish":"darkgreen"}, \
|
| 49 |
title='Sentiment Score Distribution')
|
| 50 |
|
| 51 |
fig.update_layout(
|
| 52 |
showlegend=False,
|
| 53 |
autosize=True,
|
| 54 |
+
width=900,
|
| 55 |
height=500,
|
| 56 |
margin=dict(
|
| 57 |
b=5,
|
|
|
|
| 66 |
st.subheader('Topic Distribution Scatter Plot')
|
| 67 |
## Display negative sentence locations
|
| 68 |
ht = df.tweet.apply(lambda txt: '<br>'.join(textwrap.wrap(txt, width=70)))
|
| 69 |
+
fig = px.scatter(df, y='topic', x='creation_time', color='sentiment', size='topic_confidence', hover_data=[ht,'topic','username'],\
|
| 70 |
title='Topic Score Distribution')
|
| 71 |
|
| 72 |
fig.update_layout(
|
| 73 |
showlegend=False,
|
| 74 |
autosize=True,
|
| 75 |
+
width=900,
|
| 76 |
height=500,
|
| 77 |
margin=dict(
|
| 78 |
b=5,
|