Posts by stphnlee (19)

Route for review

Related to the last post, I have added a route for the tweets that have a compound score between -0.1 and 0.1, i.e. those where the analysis failed. The route is /asset/<asset name>/review I also updated the styling of the button the create post form.

Filtering Tweets

Sometimes the tweet analysis fails and the compound score is 0. This isn't useful, so I have created a filter in the query that only shows tweets with a compound score greater than 0.1 or less than -0.1.

Minor updates

I added an "Assets" link in the header navbar. I change the "Last updated" element on the tweets page to a p instead of h2. I added a delete button to each Tweet (though it isn't hooked up yet). I was working on changing the date_posted to use the created_at property of the tweet object, but I couldn't quite get that figured out yet.

We have a function

I converted the analysis code into a function that can be called from the rest of the app. I haven't hooked it up into the app yet, but I have been testing from the command line. At first I was having a problem that it would add duplicate tweets to the database, but I added a conditional check in the function to only add the tweet from the search results if the text is unique. In the future this will need to be changed to use the tweet ID rather than the text. I updated the template that displays the tweets to show the date/time of the last time the asset tweets were updated. This needs further formatting (both HTML and string formatting). The next things I would like to do include: - Getting more info from the tweets (user, id, date, etc.) and update our model - Add filtering options to the display page - Show aggregate score for the selected range - Add the asset symbol to the database as well, and update the function to search the asset name and symbol If you are logged in, you can view the assets here: https://sentimentextract.com/assets Then click on the asset button to see the tweets currently in the database.

1 2 ... 4