감성 점수 그리기
마지막으로, 해시태그별 감성 점수를 시간에 따라 시각화해 보겠습니다. 트윗의 출현 빈도를 그렸던 방식과 거의 동일해요.
이 연습은 강의의 일부입니다
Python으로 소셜 미디어 데이터 분석하기
연습 안내
sentiment_py로#python사용량 선을 그리세요. x축은sentiment_py.index.day를 사용하세요.sentiment_r에도 동일하게 적용하세요.
실습형 인터랙티브 연습
이 예제를 이 샘플 코드를 완성하여 풀어보세요.
# Import matplotlib
import matplotlib.pyplot as plt
# Plot average #python sentiment per day
plt.plot(____, ____, color = 'green')
# Plot average #rstats sentiment per day
plt.plot(____, ____, color = 'blue')
plt.xlabel('Day')
plt.ylabel('Sentiment')
plt.title('Sentiment of data science languages')
plt.legend(('#python', '#rstats'))
plt.show()