Dataframe input recommendations

Hi, I’m writing a constraint solver over tabular data. Ultimately, I’d like this to be a website where users upload their own datasets. What’s a good way of doing that, expecting most uploaded data to originate from R, Python or STATA?

There’s of course the CSV solution for non-nested datasets. I thought about accepting JSON to allow nested data. R and Python libs use the Arrow file format, but I wasn’t able to find a pack for it, and I’m clearly not up to writing a parser.

Any pointers? Thanks!

For the Arrow format, if the C/C++ libraries have a reasonable API, it should be possible to write a foreign function interface (probably it’s easier to use SWI-Prolog’s C++ interface, even if you’re wrapping the C library).

I just stumbled on SWISH -- SWI-Prolog for SHaring showing a full-screen app, and other examples showing interaction with R with file upload allowed.

SWISH is a bit nebulous to me and I’m a total newbie website builder, so forgive me for asking: how complex of a custom user interface does SWISH support ? Is the set of widgets limited to what’s shown in the tutorials ?

I’m now wondering whether a SWISH instance on my university server might actually be the easiest path.

If you have control over the server you can anything that your browser can support. Without, you can still do a lot. As some of the demos illustrates you can write JavaScript that interacts with server side Prolog code.

Possibly. It depends what you want. You can do a lot on the public instance and you can quite easily run a version locally. You can also deploy that on a server. swish.swi-prolog.org exploits that horizontal scaling of SWISH, which makes setting it up quite a bit harder. You probably do not need that.

1 Like