Jump to content

Guk Rankings In Gsak


Followers 1

Recommended Posts

Has anyone found a way of getting the GUK star ratings into GSAK? Maybe not for all caches, but if I could put them in for caches near where we are staying in February (near Banbury - any tips?) for a week, then it could help decide which of the many to do. I know of a few by reputation, but don't want to miss any good ones!

 

I don't expect Clyde to be able to manage this, as its small market, and the info obviously isn't in pocket queries!!! A macro to strip it from the GUK page though?? Is this allowed Ian and Brian??? :unsure:

 

Cheers

 

Dave

Link to comment

If you go to here you get the top thousand rated caches.

A quick copy and paste and i can create a CSV file via excel to show the rating.

 

Something like the county update for GSAK for the ratings would be a nice addition.

 

Edit to add just email me mark dot davis at culina dot co dot united kingdom asking for the csv file if you want it. Im working on getting more than the top 1000 in it at the moment.

Edited by markandlynn
Link to comment
Not for us numpties it isn't P&T!! :D

 

I have a nice clean CSV file with the ratings in it, but I can't see how to import a CSV file.... probably being thick or somehting!!

 

Any help gratefully appreciated!

 

Dave

Sorry - I did mean easy to put together when you know how. I'll see if I can find some time to put something together. In the meantime, any chance you could send me your CSV file?

 

T

Link to comment

If you have a CSV then you should be able to convert it to tab-separated. GSAK can then import this directly into the User Notes field. The file format needs to be two-column, one row per waypoint, of the form:

GCxxxx<tab>Note

Use File|Notes|Import to put this into GSAK.

I use this technique frequently to get notes from GPXSonar to GSAK.

 

You can filter on User Notes, though you'd probably be wise to have a unique string to search for as well as the rating. Perhaps:

G:UK rating 5

then filter on "rating".

 

Another way of doing this would be to use User Data (remember that 6.5 adds a User Data 2 field, so there's a bit more flexibility here). To get this into GSAK automatically would require a GPX file containing just the waypoint and rating using GSAK namespace tags. Perhaps G:UK could provide such an export? Note that I haven't tried this.

Link to comment
Perhaps G:UK could provide such an export? Note that I haven't tried this.

I'm trying to put the format together. Once put an example file together tha works, I'll send the format to Barry (pretty please!) who may be able to list it as a download format, just as he did with the counties update I put together a while ago.

 

T

Link to comment

after some trial and error, I changed the csv to a tab delimited text file and imported that into the notes field. However, what I would like to do is see the ratings and sort on them, rather than filter, which it doesn't look like I can do on the notes field.

 

If I were to filter on the notes field, It would probably be for >4.00 or something, and then it still wouldn't sort on the results correctly I think.

 

Discuss!! :D

Link to comment
However, what I would like to do is see the ratings and sort on them, rather than filter, which it doesn't look like I can do on the notes field.

Yes, this sort of thing does require structured data, which is why I suggested using UserData or UD2. Of course, you've only two options there, and if you're using them for something else then you've a problem.

 

Unless/until the GPX file I suggested is available, you could use a GSAK macro to copy the data from Notes to UD1/2, subject to the proviso above and the length of the data.

 

What does your file look like? And are you using UD1/2 for other things?

Link to comment
Yes, this sort of thing does require structured data, which is why I suggested using UserData or UD2. Of course, you've only two options there, and if you're using them for something else then you've a problem.

 

Unless/until the GPX file I suggested is available, you could use a GSAK macro to copy the data from Notes to UD1/2, subject to the proviso above and the length of the data.

 

What does your file look like? And are you using UD1/2 for other things?

I thought that might be the case. Macroing from Notes to UD1 or 2 shouldn't be a problem, although at the moment it only contains the number, not the word rating. Neith UD1 or 2 are in use at the moment... I have three files - a CSV containing all the columns from the top 1000 list, one with the code an average rating, and a text tabe delimited file with just those two...

 

If any of you want them, just e-mail me through the profile and I'll drop them back in reply

 

I think I may wait until a GPX type file is available, as this would solve these issues for a relative newbie! (compared to you guys). As you say, somehting similar to the county update, but updating the UD2 field would be great. Lets hope those in the know at GUK are listening.... Certainly several more pints I would owe them at a meet... Maybe we could even persuade Clyde to put a rating column in, if this would be useful in other countries...!

 

Cheers Alan and P&T

Link to comment

Can anybody (registered users of G:UK) tell me if this generates a valid and useful GPX file.

 

Please consider this alpha quality as I can't test it, but it follows P&T's format, so should work, please keep a backup before attempting to use it.

 

If all goes correctly it should add a percentage to your User2 field in gsak, this is the 'Percentile' and denotes 'this cache is in the top XX% caches' so Low is Good!

 

I choose percentile as thats what I think has been desided as the main format for G:UK as being most representive, but if needby we could produce the rank out of 5.

 

If it works and you can't wait to update GSAK with the full db, then remove the limit= part of the url! (otherwise wait until its a proper feature!)

Link to comment

it certainly loaded a data gpx file into gsak that had 50 waypoints in it and loaded what looked like percentiles into the UD2 column. Unfortunately, i already had some data from P&T in this column, so I would like to clear the contents of the whole lot and reload - anyone know how I can do that?

 

But yes, it certainly seemed to work!

 

I'm now trying to modify it to download more - it seems to want to d\l as an xml file though - but I'm about to retry!

 

Dave

Link to comment

ok, downloaded from the original link anyway, as I was trying that. Took out the limit+50, and downloaded as an xml file. I then told gsak to import a folder (GSAK is registered user of GPX files) and it quite happily picked up what I htought was an xml file and updated 8902 caches...

 

I then checked the folder, and it has the files as GPX files.

 

So, the download dialogue thinks its an xml, but when downloaded, it becomes a gpx file... all works fine then!

 

All seems fine

 

The only (and its trivial) point is that to sort on that column with the 1& caches at the top puts the empty cells first - a simple filter deals with that though!

 

Many thanks for this useful function!!

 

Dave

 

edited to say it sorts the cell as a text cell - ie 1, then 11, 12, 13 etc, THEN 2, 21, 22 and so on... do we need clyde's input on this?

Edited by purple_pineapple
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Followers 1
×
×
  • Create New...