Data4ALL icon indicating copy to clipboard operation
Data4ALL copied to clipboard

Suggesting Rewrite to how Datasets are Populated

Open mraguso2 opened this issue 2 years ago • 3 comments

I think it may be easier to maintain if there was one large DatasetDictionary js object that included information for every dataset {name, id, download, classification, pathname} and then were looped and populated into html elements.

Something like: Snit-it

I saw that you have some outstanding PR's that update the UI so there could be some conflicts with a change this big but it would greatly clean up you index.html file and allow for easier dataset edits

Let me know what you think - I already started the work on this if you are interested in moving to this functionality.

mraguso2 avatar Oct 25 '21 16:10 mraguso2

i wanted to keep it simple ,for people contributing for the first time also. they could drop in a dataset by copying above code and changing id in few lines.

samz5320 avatar Oct 26 '21 12:10 samz5320

I think this suggested workflow to add datasets would be pretty simple.

All the person would need to do is:

  • add the raw dataset
  • make a new dataset item in the dataset object with all those standard keys {name, id, pathname, etc}.

This allows you to easily make edits to the html structure if you ever needed to, since it is simply looping over this dataset and plugging in values for each dataset.

I can send over the PR soon to show you how it could work and if you're not interested I can close this issue

mraguso2 avatar Oct 26 '21 21:10 mraguso2

yup send a PR. tq

samz5320 avatar Oct 27 '21 04:10 samz5320