Closed Castau closed 4 years ago
What are the steps to reproduce this error? @HrBjarup
The bug occurs on this branch: #13 Check out the latest commit on the branch and run flask_service.py
. Open Postman and do a POST request to the following endpoint http://localhost:5000/api/sentiment
with the following body:
{
"hashtags": [
"trump",
"biden"
],
"start_date": "2020-5-8",
"end_date": "2020-5-12",
"plot_type": "line"
}
This should result in the following plot:
The bug doesn't occur when using a bar
plot instead and I have no idea why
Trying it now.
Prøvede at putte en guard ind for at tjekke om det faktisk var datetime.date der kom med Men buggen var der stadig.
datetime.date har nemlig kun year, month, day, og ikke tid. så hvordan den viser tid er virkelig underligt
If you select too few dates, it squeezes in some time, to make sure there are at least 6 xlabels
At 5 days its bad: At 6 its fine:
POSSIBLE HACKY SOLUTION
Only allow user to select 6 days or more when doing line graphs lol
(find a real solution?)
I forbindelse med at den orange bare stopper. Ønsket behavior er at den går til 0. Men det er pga NaN i dict.
Løsning: fint, så kan man skrive df.fillna(value=0, inplace=True) så er den klaret https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.fillna.html @Runi-VN Fandt denne løsning
Gør det på denne DataFrame
Plotting is still bugged - check out this
Plotting is still bugged - check out this
This was related to the naming of the @ thing on the dict, right? I had named it differently than Runi
Fixed in #21
Something is wrong in the lineplot regarding the dates. Malte has seen this error before. Something about the expected date being converted to a datetime.