Join DiveBuddy.com

Meet new scuba divers, maintain a virtual dive log, participate in our forum, share underwater photos, research dive sites and more. Members login here.

#212
Dive Log - Upload Feature Request
wbjoe - 10/14/2014 1:03 PM
Category: Web Site Help
Replies: 10

would be a nice add if not only could we download my dive log but if we upload our logs from PC/mac or my dive computer like the divemate usb app for android would be a great add on to the site. seeing as some new members to dive buddy have a lot of dives under there belt to manual input them in would be a great deal of time taken.
maybe there is an option but i dont see it.
thanks
#212
Subscribed
wbjoe - 10/15/2014 9:59 AM
ahhh i see.
#6196
Eric_R - 10/15/2014 6:21 PM
There would have to be a set format to make this happen. I think a csv file would be the easiest. I’m not sure how many dive computers support exporting to csv. You would still have to ,make sure the csv fields matched that of the site you were uploading to. As Greg stated this would require a lot of back end work
#50591
Subscribed
Greg - 10/16/2014 6:13 AM
Here is one way I could do it... during upload, I could display a grid of the records just uploaded and allow the user to pick the dive site from a drop down menu that the log applies to. The drop down menu would be populated with dive sites that you’ve been to or subscribed to.

Are your dive logs available in Excel or CSV format?
#212
Subscribed
wbjoe - 10/16/2014 6:21 AM
yes oceanic has a excel format ill have to check if it is also in CSV
#50591
Subscribed
Greg - 10/16/2014 6:33 AM
If it has an Excel option, then you can always convert the data to CSV using "Save As", then changing the file type to Comma Separate Value.

The other "complication" would be the format of the CSV file. In a perfect world, the import/upload option would provide a smart feature that allows you to assign columns to certain data elements of the dive log...rather than requiring you to have the columns in a specific order.
#212
Subscribed
wbjoe - 10/16/2014 6:40 AM
nice. i think this fetcher would be a great add on to this site.
#50591
Subscribed
Greg - 10/17/2014 2:12 PM
So I’m taking a stab at developing this feature...just to see if it’s feasible for us. I’ve determined that it will be difficult to allow exposure suit, tank type, air type, etc. to be imported because of the way I support those data elements in our dive log. They are drop down options with limited choices. So it would be too much work to support that type of data during the import process. However, I do think I could support basic dive log data like date, bottom time, depth, viz, temp, weight, etc.

Here is my prototype so far...it doesn’t go further than reading the first line of the CSV file and providing you with a mapping table. What do you think so far?

divebuddy.com/divelog_upload.aspx

And any data that doesn’t have a field to map to, I can append that data to the Comments field in the dive log...so the data isn’t lost.
#50591
Subscribed
Greg - 10/18/2014 11:54 AM
This has probably been one of the most fun parts for me to create on the site so far...there are so many challenges and so much complicated code to write. I’m trying to make it as "user friendly" as possible. I’m also trying to make it accommodate as many variations of a CSV log as possible. Someone may use a different date format. Some may use metric vs. imperial. Someone may have data elements they want to keep that we don’t have on our dive log.

So far, here is what I’ve done...

The upload page initially uploads the CSV file. Then it reads the first line in the CSV file to allow you to map the columns to the data elements of our dive log. At this point, I need to ensure someone doesn’t choose the same data element more than once. Then it uses your custom mapping to read through the rest of the CSV file to pull in the data and allow you to assign a dive site to each record. At this point, I have to check the data in each column to make sure it matches my required format. For example, I only need numbers for Depth, Time, etc...I don’t need "10 feet" or "55 mins". So my upload process needs to strip the data of "feet" and "mins".

I also need to allow a dive log to be uploaded without the assignment of a dive site. Because if someone is importing a lot of data, I doubt they are going to sit there and select dive sites all day.

I also have to figure out a way to save the data mid-page, because it would suck to work through a bunch of logs, only to loose the data because of a session timeout.

These are just some of the fun challenges of this project! Hopefully I’m up for the task :)
#50591
Subscribed
Greg - 10/23/2014 8:19 PM
I just tweaked the dive log section so that "other" is a choice in the dive site drop down. Now a user can enter free-form data into a text field for the dive site/location. That way, when I complete the dive log upload feature, I will import the location information so it’s not lost during upload. The user can still pick a dive site to link to.