bluenote10 / NimData

DataFrame API written in Nim, enabling fast out-of-core data processing
MIT License
341 stars 22 forks source link

add basic plotting support for dataframes via plotly #40

Closed Vindaar closed 5 years ago

Vindaar commented 5 years ago

And here goes the final one.

Some basic plotting support for the (I guess) general cases. It's based on this PR: https://github.com/brentp/nim-plotly/pull/29 so until that is merged, this isn't ready.

Unfortunately I had to move the DataFrame definition to a new file and couldn't import plotting.nim, but had to include it, because of the definition of collect. But I didn't want to dump these into nimdata.nim directly.

All plotting templates return a Plot[T] object, which can be either stored in a variable and modified / more traces added, or the helper templates (which are also used in the definitions) can be further used. See the added examples.

bluenote10 commented 5 years ago

Oh, sorry for the delay. Do you understand why the tests are failing? Looks like there is a nimble issue, right?

Vindaar commented 5 years ago

No worries! Since I wanted to wait until the plotly PR was merged, I forgot to check back too.

Yes, it seems to be. If you look at the other travis builds, e.g. https://travis-ci.org/bluenote10/NimData/jobs/457149623 you see that the same nimble error appears. But since all modules can still be imported the actual tests pass. I'll see what I can do about it later.

Vindaar commented 5 years ago

Ok, I think I fixed the travis issue. Replaced adding the nim directory to PATH directly via nim-$BRANCH by adding the full path including /home/travis/build/bluenote10/NimData/.

The -d:travis I added to the test compilation makes sure that the plots created by plotly do not stall the build (by keeping the browser open).

bluenote10 commented 5 years ago

Thanks for fixing this general issue!