Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSV previews #4

Open
timwis opened this issue Feb 18, 2016 · 7 comments
Open

CSV previews #4

timwis opened this issue Feb 18, 2016 · 7 comments

Comments

@timwis
Copy link
Owner

timwis commented Feb 18, 2016

Options

A. Use recline.js (like CKAN)
B. Roll something new using PapaParse and a grid library that handles large datasets
C. Build a website like geojson.io for CSVs

Considerations

  • Should load files even if CORS not available or different protocol (http on https). Perhaps a proxy like YQL?
@timwis
Copy link
Owner Author

timwis commented Mar 23, 2016

See first comment in #15

@eeeschwartz
Copy link

eeeschwartz commented Apr 17, 2016

@timwis perhaps the frontmatter could include an iframe preview url with sensible defaults to geojson.io (#15) or a recline service. But it could also allow a maintainer to point at the previewer of their choice.

To test out possibilities, I created a rough recline example that takes a dataset param like geojson does.

The idea that a maintainer could plug in their own previewer service could help JKAN to be extended nicely.

(And big high fives or this project. It's fantastic.)

@timwis
Copy link
Owner Author

timwis commented Apr 17, 2016

Thanks @eeeschwartz! And that's an interesting idea. It may not be necessary to do it on a per-dataset level; rather, we could make the "csv previewer" and "geojson previewer" configurable at the site level. The key, I imagine, is to make it easier to plug in your own.

@eeeschwartz
Copy link

@timwis it's a good question. Not sure if people would always want different viewers or just in certain cases where the dataset is too big (maps) or hosted differently (google docs versus CKAN or whatever).

I was picturing that people would use the standard viewer 99% of the time until that especially squirrelly dataset comes along. Next step they create and inject the perfect viewer and they're giving toasts at the international IT awards 🏆

But it's mostly speculation on my end. I'll get closer to my various use cases and see where that leads. Cheers

@keeganmcbride
Copy link
Collaborator

Hey @timwis have you had any other thoughts on how to approach this? We will start implementing the CSV previews this week on our end.

@timwis
Copy link
Owner Author

timwis commented Oct 10, 2018

@keeganmcbride I have had some preliminary thoughts about this but not quite settled on a concrete idea. I was thinking it may be worth it to build a service similar to geojson.io but for CSV files which provides an embeddable table. The primary reason for the service would be to add CORS headers. Alternatively, if the JKAN site hosts the CSV files on the same origin or on one that already has CORS headers, we could fetch the data directly. I reckon something like papa parse's streaming method would be good for pulling in large files without crashing the browser tab. What were you thinking about?

@keeganmcbride
Copy link
Collaborator

@timwis We decided to just go with a super simple solution (could definitely be improved) that basically just uses OKFN's datapipes for the preview functionality. See, for example, here: https://opendata.riik.ee/andmehulgad/avaliku-korra-vastased-ja-avalikus-kohas-toime-pandud-syyteod/ shout out to the San Diego OGD portal for inspiration for some of the UI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants