International-Soil-Radiocarbon-Database / ISRaD

Repository for the development and release of ISRaD data and tools
https://international-soil-radiocarbon-database.github.io/ISRaD/
24 stars 15 forks source link

flat file links to html raw page on website #168

Closed greymonroe closed 5 years ago

greymonroe commented 5 years ago

the links on the webpage currently do not initiate a download. rather they go to textview of the csv file in the web browser.

greymonroe commented 5 years ago

a solution to this problem is here

https://stackoverflow.com/questions/45069794/can-i-link-to-a-file-for-downloading-other-than-pdf-in-a-github-wiki

I have to say its a pretty lame solution. Basically, we could zip the flat files together and users can download that. I guess github pages doesnt allow you to specify that files are to be downloaded when you create a link. It is up to the browser to determine whether the file type is downloaded or displayed as text. This must be why the Excel version of the data is downloaded (Im on chrome) but csv is displayed as text. A .zip file of the flattened .csv should be downloaded.

Need to add a line of code to ISRaD.build that zips the flat files then.

greymonroe commented 5 years ago

@aahoyt @jb388

we have the database files in a zip folder now. they are also individually named according to the version number. Can I overhaul the Database page to reflect this change? Users will download the entire zip file with all of the data. It means removing all of the individual dataset download links. We can talk about the details as well

jb388 commented 5 years ago

Nice, good work. Sure, I don't see any reason not to overhaul the Database page.

aahoyt commented 5 years ago

Excellent & fine with me! It would be good to keep a description of what every file is on the website, but other than that anything is good with me.

alkalifly commented 5 years ago

@greymonroe Are you just zipping the flattened csv files, and still allowing the Excel files to be downloaded individually?

greymonroe commented 5 years ago

The best option is to zip all including the excel files. In this way, we can include the version number in the name of the files which I think people will find useful.

On Mar 28, 2019, at 6:14 PM, Paul Levine notifications@github.com wrote:

Are you just zipping the flattened csv files, and still allowing the Excel files to be downloaded individually?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/International-Soil-Radiocarbon-Database/ISRaD/issues/168#issuecomment-477804668, or mute the thread https://github.com/notifications/unsubscribe-auth/AP5w_JkSdrUoMijMdUEWszXUF44gpQGaks5vbUzIgaJpZM4a_tN8.

alkalifly commented 5 years ago

The best option is to zip all including the excel files. In this way, we can include the version number in the name of the files which I think people will find useful.

Okay, I don't feel super strongly about this, but I will go ahead and advocate for maintaining the ability to download files individually as well. From an end user perspective, I am going to want either the plain Excel file OR the extra excel file OR the R object OR a zipped set of flattened CSV files, but I am never going to want more than one of those things. I know everything zips down nice and small, so file size is not an issue, but it streamlines the workflow if I can just get the one file I need without 13 others that I don't.

Again, it's not something I feel strongly about, but I just wanted to provide that end-user perspective.

greymonroe commented 5 years ago

Ok, yeah I thought about that, but unfortunately you can’t download the csv files individually and also can’t include the version number in file names (unless you change the link every time you change update the database).

On Mar 28, 2019, at 6:23 PM, Paul Levine notifications@github.com wrote:

The best option is to zip all including the excel files. In this way, we can include the version number in the name of the files which I think people will find useful.

Okay, I don't feel super strongly about this, but I will go ahead and advocate for maintaining the ability to download files individually as well. From an end user perspective, I am going to want either the plain Excel file OR the extra excel file OR the R object OR a zipped set of flattened CSV files, but I am never going to want more than one of those things. I know everything zips down nice and small, so file size is not an issue, but it streamlines the workflow if I can just get the one file I need without 13 others that I don't.

Again, it's not something I feel strongly about, but I just wanted to provide that end-user perspective.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/International-Soil-Radiocarbon-Database/ISRaD/issues/168#issuecomment-477806776, or mute the thread https://github.com/notifications/unsubscribe-auth/AP5w_HuwEqjMRWgeB58zV6gY4x5vQeBRks5vbU8FgaJpZM4a_tN8.

alkalifly commented 5 years ago

Ok, yeah I thought about that, but unfortunately you can’t download the csv files individually and also can’t include the version number in file names (unless you change the link every time you change update the database).

Gotcha. I knew that the CSV files have to be zipped to actually download, and I was thinking that we could have links for each Excel file and each zipped bundle of CSV files. But I see how the file naming creates an issue.

greymonroe commented 5 years ago

fixed. https://international-soil-radiocarbon-database.github.io/ISRaD/database/