View Full Version : Most caches in a given town Version 2

09-14-2010, 04:17 PM
This is a continuation of the thread Most caches in a given town ( in which I failed miserably at producing accurate results. In this newest attempt, we are using data which is much more accurate - much of this is because it utilizes shape files of the borders of all Maine towns. Still, caches very near the borders of towns may be incorrectly listed. Then again, the cache may not be in the town you think it is after all. :)

At my current count, there are active caches in 596 Maine civil divisions, there have been caches placed in 643 civil divisions, out of a total of 916 in the state.

So anyway, here are some preliminary numbers showing the civil divisions with more than 50 active caches. The order of areas with the total number of placed caches is very similar.

Portland ----- 195
Lewiston ----- 133
Bangor ----- 115
Augusta ----- 110
Falmouth ----- 108
Kennebunk ----- 101
Freeport ----- 73
Cumberland ----- 70
Biddeford ----- 64
Yarmouth ----- 64
Moscow ----- 63
Auburn ----- 60
Saco ----- 60
Scarborough ----- 59
South Portland ----- 59
Westbrook ----- 56
Washington ----- 55
China ----- 54
Kennebunkport ----- 54
Brunswick ----- 52
Gorham ----- 52
Lyman ----- 51
Standish ----- 50

I still need to verify some of my data and make an easy to use macro for anyone wishing to list the towns in GSAK. Fins_Up is doing some tedious data entry which hopefully will allow us to add a Maine towns map to the FindStats Macro.

09-14-2010, 05:47 PM
Very impressive. Thank you for updating this list!

09-15-2010, 09:25 PM
I whipped up a macro to create an HTML table of all towns with over 25 hides. These numbers include archiveds. You can click on any column to sort the data how you'd like.

I have to give a big shout out to the town of Parkman, which has made the stats with a whopping 4.35 average terrain rating! We can thank Vic & Lacy for that! :)

09-19-2010, 12:08 PM
Attached is a macro which will primarily populate one of the user data fields in GSAK with the town name and also produce 3 interactive stats based on Maine towns.

All the town data is included with the macro in an embedded zip file, which will (hopefully) be automatically be unzipped into the proper GSAK folder the first time you run the macro.

If you run other macros that populate any of the User Data columns, Make sure you elect a column for the town data that will not interfere as the data for the selected column will be deleted. If you are unsure what columns you might be using select View - Add/Delete Columns from the GSAK menu and check the User Data, User data 2, User data 3, and User data 4 checkboxes. If you wish to keep these columns or the column you save the towns in, you can do so by choosing View - Save current view... from the GSAK menu.

You will need to update the database(s) you wish to list Maine towns when you add caches. Choosing to update only the empty records will speed the update a bit, but if you have non-town data in the column you will want to deselect that option to overwrite the old data.

The stats section of the macro will output D/T, Container(Size), or Cache Type stats, in other words how many of each is in each town. The macro will respect your current GSAK filter, so for example if you want to run towns stats on a particular hider(s), filter GSAK to list only caches hidden by that hider and then run the macro. The image below shows such a list of Ekidokai's hides. If you are running the stats on an unfiltered, large database, such as all Maine caches, you will probably want to limit the stats to towns that have over 25 number of caches, or some number that fits your need.

EDIT: I'll post the macro shortly, I didn't forget! ;-)

EDIT2: macro file is down at the bottom of the post now!

EDIT 3: Macro has been removed and moved to the GSAK web site:

09-20-2010, 03:20 PM
So has anyone tried the macro? Intimidated? Comments, criticisms, suggestions????????

09-20-2010, 06:24 PM
I installed and ran the macro. User Data updated, but the HTML list only shows one row. Did I do something wrong?

09-20-2010, 06:56 PM
I had the same results I'm afraid

09-20-2010, 07:00 PM
I installed and ran the macro. User Data updated, but the HTML list only shows one row. Did I do something wrong?

If it shows one line but does not list a town name, you probably updated your user data column and then changed databases. You will need to run the macro on any database you want town data in.

Hope that's all it is!

Incidentally, if the list shows Maine towns plus one unnamed town, the unnamed town is the total of all the caches in the unknown towns, most likely out of state caches. If you do not want that row to show, filter your database for only Maine caches first.

09-20-2010, 07:24 PM
There are 3 caches on the Western Maine border which do not show as being in Maine. I may have to edit the shape files a bit, but for now you can just enter the data in manually. The maps also show these caches across the line. :rolleyes:

Route 2 Tour-State Line ( (GCYGGA) by mainiac1957 and Quilting Mom ( (1/1.5) - which is in Gilead - Oddly enough,'s maps show this in Nh too!
S.F.R.W. Standing by peacefull waters ( (GC1X9W2) by THEHIWAYMAN & JKJEEPCHIC with IAMSURVIVORMAN & BC ( (3/3) - Which is in Lebanon
You Can't Get Here From There ( (GC2DHTW) by NH River Rats ( (1.5/1.5) - Which is in Bowmantown Twp

09-20-2010, 09:17 PM
Ok, I fixed the issue with having only one line in the html table!

MaineTowns.gsk (

09-21-2010, 07:03 PM
That fixed it!

Hmmm.... 100 towns in a day? :)

09-21-2010, 07:10 PM
That fixed it!

Hmmm.... 100 towns in a day? :)

Well, part of what inspired this idea was the fact Vermont has a challenge cache where you have to find a cache (Or prove you were in) in each of it's ~250 towns. How much harder can Maine's 915 be? :D:D:D:D

09-21-2010, 08:31 PM
That fixed it!

Hmmm.... 100 towns in a day? :)

By bike? :)

10-08-2011, 09:05 AM
I have deleted the older version of this macro from this site and officially listed it on the GSAK web site. The new version runs much the same but has a few new additions to the code to handle the few caches on the border as well as a fix in the ploygon file.

Here is an example map of my Maine Finds. I still have a few minor edits to make:

10-08-2011, 04:28 PM
Here is another map that shows cache density by town for the state (Darker areas are higher density).

10-09-2011, 09:13 AM
All the files are posted and appear to be working. For anyone that wants to add this map to their stats but are a bit lost in doing so, here are instructions. To see the actual output as it will show in your profile, look at my profile (

1. Install and run the ME_Towns ( Macro to populate one of the User Data columns with the town names. Remember which User Data column you chose. You will want to run this macro to populate the column every time you have more caches in your database and want to run the FindStats macro.

2. Download and install FindStatGen3.gsk or FindStatGen39Beta.gsk and run it or just run it if you already have it installed.

3. (Some knowledge of FindStatGen may be needed) Select the Setting Group you want to use. Click the Maps button

4. Click the Install Map Data Files from GSAK button

5. Scroll down and check Maine Towns then the Install button

6. When done loading, click the Edit Map Data Files button

7. Choose Maine Towns from the drop down list

8. Select the User Data column you chose in step 1 from the Data Source drop down list

9. You can also edit other map features like colors and shading at this time

10. In order for these custom maps to show, "Other Maps" must be enabled on the Section Order screen of the FindStats macro.

11. Run the macro like you would normally and the map should be included in the output.