Open genedan opened 2 years ago
Hey @odddkidout, I know you were asking for another issue, would you like to try this one? The heatmap is a bit slow, what it does is that it uses the beautiful soup package to extract the colors from the CSS generated from the pandas heatmap method:
I think for proof-of-concept type work it's fine, but improving the speed here will take things to the next level. My goal here is to get rid of the bs4, and possibly IPython dependencies which I think are a bit overblown for the current use case. Just let me know if this interests you.
Sounds cool. Do you mean parse html with string manipulation?
Yeah, here is how it is currently done:
I think my use case is too simple to warrant having an entire package like bs4 as a dependency. I think what's slowing things down a whole bunch is the nested loops I have at the bottom, they just search through the CSS looking for the colors.
The way the FASLR heatmap currently works is that it extracts the html representation returned from the chainladder heatmap, and then searches through the html text to find the colors applied to each cell. These colors are then applied to the view using one of its built-in methods.
I came across some string methods that can convert a string into something like a list which might end up going faster, so it could be something to look into.