Tiny sample app that provides an "at a glance" view of news article sentiments per crypto currency.
On a regular interval it does the following:
- Get top 100 coins from https://www.coinmarketcap.com
- Get news articles from https://www.cryptocompare.com
- For each article ....
- Get full HTML from article source URL
- Extract plain text (strip layout, adds, etc)
- Calculate weighting of coins from top 100 list (count occurence of coin name & symbol in plain text)
- Calculate sentiment based on AFINN words
- Store result in db
The result is visualized using D3 pack. Each article is rendered as a bubble (click to get to the original article). Negative sentiment is shown in red, positive sentiment in green. The bigger the bubble, the higher the score. The older the article, the paler the color.
Prerequisites
- Docker
Usage
- Copy
.env.sample
to.env
and set API key, DB users and passwords - Run
docker-compose build
- Run
docker-compose up
- Access app at
http://localhost:8080/