OpenBB icon indicating copy to clipboard operation
OpenBB copied to clipboard

Interactive tables using react

Open jose-donato opened this issue 2 years ago • 8 comments

demo

This PR adds the functionality to spin up a pywry window containing react (or any frontend library code).

  • sets foundation for adding more web components
  • adds interactive tables

todo:

  • add docs on how to change and how it is structured
  • move all formatting code inside print_rich_table
  • do the formatting inside (after sending the raw df to the pywry window)
  • style with our components

jose-donato avatar Mar 02 '23 18:03 jose-donato

Would it be possible to include an export button? In which you can filter and then export that sub-selection?

JerBouma avatar Mar 03 '23 10:03 JerBouma

Would it be possible to include an export button? In which you can filter and then export that sub-selection?

Yuuup for sure.

Keep those suggestions coming

jose-donato avatar Mar 03 '23 12:03 jose-donato

Another must have in my opinion is being able to filter by dates. I think this change will actually allow the limit flag to be removed. Due to how easy it is to search, we don't need that flag anymore. For a lot of functionality the limit flag is just there to reduce clutter while with this table functionality it no longer is clutter since you can filter so well.

In my opinion just nice to have not necessarily must-have:

1. It would be nice if we can have clickable URLs as seen in the screenshot below. Here it is getting cut-off (and thus not usable). We got that complaint a couple of times, also happens in stocks/fa/mgmt.

image

2. What's powerful is that you can plot a series within this table. So for example if I obtain the income statement as you see here, if I could click a row and press plot that's powerful. Then you can see revenue growth over time with ease etcetera. Probably a lot more use cases outside of this one.

image

JerBouma avatar Mar 03 '23 12:03 JerBouma

Another must have in my opinion is being able to filter by dates. I think this change will actually allow the limit flag to be removed. Due to how easy it is to search, we don't need that flag anymore. For a lot of functionality the limit flag is just there to reduce clutter while with this table functionality it no longer is clutter since you can filter so well.

In my opinion just nice to have not necessarily must-have:

1. It would be nice if we can have clickable URLs as seen in the screenshot below. Here it is getting cut-off (and thus not usable). We got that complaint a couple of times, also happens in stocks/fa/mgmt.

image

2. What's powerful is that you can plot a series within this table. So for example if I obtain the income statement as you see here, if I could click a row and press plot that's powerful. Then you can see revenue growth over time with ease etcetera. Probably a lot more use cases outside of this one.

image

yea we increase the limit to 500 for now 😃

  1. is easy peasy
  2. is very interesting. gonna try it

jose-donato avatar Mar 03 '23 13:03 jose-donato

Do limit even higher if possible, some data series are based on dates that can go all the way back to e.g. 1980 and offer daily data. Unless this would slow everything down a lot of course!

JerBouma avatar Mar 03 '23 13:03 JerBouma

Do limit even higher if possible, some data series are based on dates that can go all the way back to e.g. 1980 and offer daily data. Unless this would slow everything down a lot of course!

what limit number do you think is reasonable in the meantime?

it wouldn't be a problem because of pagination, and everything is virtualized (only rows present on the screen are rendered)

jose-donato avatar Mar 03 '23 13:03 jose-donato

I'd say go with a thousand for now. Little bit worried we might cut-off some data in due time so there needs to be a more dynamic solution at some point in time (basically no limit).

image

JerBouma avatar Mar 03 '23 13:03 JerBouma

I'd say go with a thousand for now. Little bit worried we might cut-off some data in due time so there needs to be a more dynamic solution at some point in time (basically no limit).

image

I like the no limit but have to talk with @jmaslek for the best way to do this without breaking anything

jose-donato avatar Mar 03 '23 13:03 jose-donato

Codecov Report

:exclamation: No coverage uploaded for pull request base (develop@723a395). Click here to learn what that means. Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff             @@
##             develop    #4386   +/-   ##
==========================================
  Coverage           ?   54.42%           
==========================================
  Files              ?      596           
  Lines              ?    53657           
  Branches           ?        0           
==========================================
  Hits               ?    29202           
  Misses             ?    24455           
  Partials           ?        0           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar Mar 13 '23 15:03 codecov[bot]