What version of python are you writing this for? I'm using 3.11 on my Windows computer and have changed all your .format() to fstrings, along with changing double quotted strings to alternate ' and ". I think it should be working. I've installed tkinter with 'pip install tk' and I can tkinter._test() just fine.
When I try to use the following:
FPS = 60
DURATION = 1
adf = sjvisualizer.DataHandler.DataHandler(excel_file='data/Marchtmp.xlsx', number_of_frames=FPS*DURATION*60).df
canvas = sjvisualizer.Canvas.canvas()
bar_race = sjvisualizer.BarRace.bar_race(canvas=canvas.canvas, df=adf)
canvas.add_sub_plot(bar_race)
canvas.add_title('March Top 3 Percent of Users')
canvas.add_time(df=adf, time_indicator='day=28')
canvas.play(fps=FPS)
The only thing i get back is the following and it hangs up my terminal/python so I have to close and open a new one:
loading new data frame
I've gotten this to work on my Pop OS laptop using Python 3.10 and no changes to your code but i did install tkinter with apt instead of pip. I'm not sure if that makes a difference.
If it wasn't written to work on Windows, it's no problem. I just wanted to give it a shot.
I love the concept of this! thanks for putting it together.
I don't have write access to your github repository so I created a fork with my changes. I'm still pretty new to github repository process so forgive the ignorance in that area. Sorry I used a different email to register on github. You can probably figure it out from the github link below.
Here is a write up on the computational difference between .format() and an fstring. Just skip down to the 'f-string' section.
https://www.linkedin.com/pulse/format-vs-f-string-akhilesh-singh/
Here is my fork with the changes I would like to contribute. Github desktop told me that was the proper step since I don't have write access to yours.
https://github.com/davidmacdonald80/sjvisualizer
I've figured it out. Thanks for the assist
Hi there, this was developed on windows using python 3.9, 3.10, and 3.11.
TkInter is the out of the box gui library that comes with python so you shouldn't need to install anything for that.
The issue you are encountering has to do with loading the data from the Excel file. What the data handler class does is interpolate the values for each of the frames in the animation. This is done before stating the animation to make it run faster.
It could be that there is something wrong with your Excel file, could you give it a go with one of the examples in the GitHub repo? Also, could you add a picture of your Excel file?