• New Project

    I’m coming to a close on the Trail Amenities project — rather, I’m running out of things to do with it — and I’ve been feeling a bit tired of all things GIS lately, so I’ve been looking for a new project, something that will teach me some new software or skill.

    My first thought was to get a better grasp of R, especially R graphics, and to do that I’d work with CDC COVID data. Early in the pandemic I was doing a lot of downloading, analyzing and graphing of case and death data, in a sort of “play along at home” mode. In a way it helped me get an emotional handle on things, in analyzing it myself I felt I regained a bit of control over the situation. At the time I was using the LibreOffice Calc spreadsheet.

    Anyway, when things started getting bad again I returned to looking at the data, and I used it to explore R, but I found I didn’t have the motivation or focus, though I did manage to get more of a handle on graphics. Part of my loss of focus was that the data magic was gone — I had COVID fatigue — but part was also that I constantly bumped up against realizing that the data manipulation would have been easier for me in SQL.

    I switched from the COVID data back to working with my trail amenities data, which gave me a chance to practice accessing my database from R, but in the end I realized I’d rather play with PostgreSQL than R so I decided that my new project would be to really learn how to work with PostgreSQL.

    And that’s what I’m doing. I found a series of free online courses on databases and SQL, from Stanford via EdX, and I’m working my way through them — I’m currently on the second course. This should give me a good handle on using SQL; the other half of what I want is database administration, which so far I’ve just been able to pick up in pieces here and there.


  • Seven The Hard Way

    About two weeks ago, I managed to lose seven pounds in a week…

    It all started with the donuts. On our D&L ride, we stopped for a bite in Jim Thorpe, but every place was packed so we just grabbed some junk food at a convenience store. I got some chocolate milk, which I almost never drink, and a bag of those small chocolate donuts you can only get at gas stations, with the plastic “chocolate” icing, one step up from Twinkies. We ate our “lunch” near the new bridge — I ate most of the bag and a a whole lot of chocolate milk — and continued on our way home.

    I felt fine, if a little stuffed, when we got home, but by the next day I had serious GI issues: bloating, constipation, abdominal pain, and it never let up. I looked online for possible causes — big mistake. I went to the doctor, who questioned and examined and prodded me, gave me an antibiotic (for what looked to her like an ear infection — no connection to the stomach), and advised Metamucil. So OK, Metamucil and an antibiotic.

    My GI situation kept up like that for more than a week afterward. I was in extreme discomfort, and with food going in but nothing going out I expected my weight to be ballooning up, but I actually lost seven or eight pounds over the course of the week.

    Then one morning, all of a sudden I felt like myself again. My body returned to its normal function over the course of the day, and the bloating and pain went away. I guess that whatever it was had worked its way through my system. I’m still taking the Metamucil “just in case,” and I am never, ever eating those donuts again…

    My weight has bounced back a little, but it’s now stabilized at about five pounds lower than it was. I’ll take it, but I wouldn’t recommend this as a weight-loss regimen to anyone.


  • Stop. Cthulhu Time!

    So we heard a few weeks ago that The Strand Bookstore was in trouble because they weren’t getting the foot traffic anymore, so — like thousands of others, apparently — we came to their rescue and ordered some books online. Dealing with their website, I can see why they were having trouble. But that’s another story…

    I ordered two books, which came in separate packages. The first, which arrived just over a week ago and which I just finished, was Other Minds, a book about octopus behavior and consciousness by science philosopher Peter Godfrey-Smith. He mixes his own experiences as a diver, scientific results from behavioral studies, and the natural and evolutionary history of cephalopods, using these as a springboard to talk about consciousness and its origins, the awesomeness and mystery of cephalopods, and, towards the end, the wonder and fragility of the world’s oceans.

    The second book came Monday. This one is Her Body and Other Parties, a collection of short stories by Carmen Maria Machado. I’ve already read the first three stories, and they are really good: clever and creepy, pure “weird fiction.” I think she’s one of my new favorite authors.

    Last night we watched “My Octopus Teacher” on Netflix.


  • Breathe

    What a week this was! The election was stressful enough but the follow-up was no better…

    We were worried about COVID so we applied for mail-in ballots back in August, but they took so long to come that when they finally arrived we dropped them off in person at the courthouse in Allentown. That was maybe 2-3 weeks before the election.

    Then on election day and after, there was a lot of talk about not counting those kinds of votes, so Anne made signs and we went to the courthouse to make our voices heard. We did that Wednesday and Thursday, and on Thursday we met others who also wanted every vote counted, and we joined them for another demonstration in Bethlehem. Friday looked much calmer, vote counting was moving forward, so we stayed home.

    On Saturday we did a bike ride up to Jim Thorpe from Slatington, and just before we arrived at the trailhead we heard that Pennsylvania, and therefore the election, had just been called for Biden. The ride would have been good “nature therapy” for recent stress anyway, but it was such a relief to have that burden removed.

    Things aren’t over yet, and a lot of damage has been done (with more possibly to come) which might never be undone, but I think the end is in sight.


  • Clean Bill of Health

    I got my colonoscopy today, a rite of passage I’d delayed for years. Fast and purge yesterday, then into the hospital for about two hours. I was pretty nervous, but the whole procedure was painless, even the “purge” part yesterday wasn’t as bad as people joke (though I wasn’t happy about the “fasting” part), and now I’m good for another 10 years.

    I just pounded down a turkey & cheese sub, and I think I’ll go take a nap.


  • Book Report

    Jonathan Strange and Mr. Norrell by Susanna Clarke

    I saw an extremely positive review in Vox of Susanna Clarke’s new novel (Piranesi) which made me want to read it, but I though I’d check out her original novel — for free, from the library — first.

    Jonathan Strange and Mr. Norrell is a honker of a book, weighing in at 782 pages, and tells the tale, set in an alternate-history version of early 1800’s England, of the two men who revived the practice of English magic. It’s written, perhaps somewhat ironically, in the style of the novels from that era — think Jane Austen or the Brontë sisters — which was fun and clever for the first half of the book, but that whole stilted “British landed gentry politeness” thing wears me down after a while (I sometimes joke that the one improvement Pride and Prejudice really needed was a guillotine), and it makes the story, which actually has a very active plot, seem like nothing ever happens.

    So the book rolled along just fine until the midpoint and then became a chore, but then it became interesting and readable again in the last hundred pages or so. I suspect that this is a result of my COVID anxiety: several longish books I read recently had the same effect on me — I liked them at first, they became tiresome as my attention span struggled, and then I enjoyed them again by the end. Like those other books, I am actually glad I read this one to the end.

    Since Piranesi is only about 200 pages, I’ll be adding it to my list.


  • Another Way To Look At It

    In my database of towpath-accessible amenities, my original definition of “accessible” was simply “within a half mile, by paths available to a cyclist, of an access point.” This seemed pretty reasonable — people don’t really want to travel more than a few hundred yards off the trail to get a bite or whatever, and beyond that point an amenity isn’t really part of the trail ecosystem anymore. This break-off point is more or less arbitrary, so I chose a half mile as a nice, round and fairly inclusive distance.

    As an example of what this might look like, here is a view of the Sand Island trailhead, with accessible amenities selected using this simple definition:

    map of bethlehem
    Amenities within a half mile of Sand Island

    You can see that there is not much available immediately near the trailhead, and then further north there’s a hotel (blue square) and a bunch of food/drink amenities (yellow circles) on Main Street’s “restaurant row.”

    I saw two issues with this. One is that people will probably be willing to go a bit further from the trail to get to lodging or a bike store, but these places are not shown, and the other issue is that the arbitrary break-off point comes in the middle of a dense clump of amenities — this is the case with “restaurant row” — and it seems silly to include one restaurant just under the half-mile cutoff while excluding the four next door, just beyond it.

    So (to address the second issue) I expanded my definition to include clusters: if there is a dense group of amenities, and at least one of the amenities in the group is within a half mile of the trailhead, all of them in the group are considered accessible.

    I also included any lodging or bike store within a full mile of the trailhead (to deal with the first issue), and now the map looks like this:

    map of bethlehem
    Amenities with a more expansive (ie “clustered”) definition of accessible.

    The map now includes the rest of the tourist/nightlife area near Broad and Main Streets, as well as several more hotels and two bike stores (the orange diamonds). This is the version of “accessible” my amenities map uses.

    But should I be even more expansive in my definition? What if someone wants to find a restaurant near their hotel, or near a bike shop, and the hotel or bike shop is one of the outliers, nowhere near the other “accessible amenities” even if there might be places nearby? (This actually happens in Bethlehem, where there is a separate business district on the south side of the river.) I decided to explore this possibility.

    My first approach to a more expansive definition of accessibility was to expand my definition of an accessible cluster: if a group of amenities contains anything considered accessible, like an amenity within a half mile of the trailhead, or a hotel or bike shop within a mile of the trailhead, then all amenities in the group are accessible. The new amenities can be seen in this map:

    map of bethlehem
    Sand Island amenities, including clusters near hotels and bike shops

    This was easy to implement, it just meant a tweak or two to the function I used for the original cluster definition. Now the Southside downtown is pretty well represented. By the way, here is the same map, but with clusters (accessible and inaccessible) shown:

    map of bethlehem
    Amenities near Sand Island, with cluster regions shown.

    The colored polygons in this map are the regions where clusters of amenities can be found. (Note the yellow polygon in the northeast corner. That represents a cluster where no amenity met any of my criteria, and no amenities are shown.)

    I worked out this definition of accessibility about the same time as the original clustered version, but didn’t use this definition for my map because it seemed a bit too expansive, with these second-order amenities — accessible not to the trailhead per se, but to other places that someone may want to visit — making the whole map too busy without adding much more value. After all, if someone wants dinner recommendations near their hotel, they can always ask at the front desk…

    But lately I’ve been thinking about a different approach to expanding my definition: what about the routes from the trailhead to the hotel (or bike shop), would it be useful to show the amenities along the way? Here is a map, just of the amenities that are within 50 yards of the shortest path to the accessible hotels and bike shops:

    map of bethlehem
    Amenities along the routes to hotels and bike shops.

    This seems to strike a happy medium, inclusive but not too inclusive. Here are those amenities along the hotel/bike shop routes, with the more expansive version of the clustered amenities superimposed:

    map of bethlehem
    Amenities near Sand Island, including those in clusters near, or along routes to, lodging and bike shops

    I kind of like this approach, though I wonder if it’s more a CYA reflex: I don’t want hungry people to pass restaurants on the way to the bike shop, and not see them on my map. After all, this is still a second-order set of amenities, and even if it’s not quite as busy as my first attempt at a more expansive definition, there is a lot of overlap. I’ll be thinking about this a bit more…


  • A Ride Up The Trail

    We did our semi-official, annual Fall Bike Camping Trip last weekend: up to Jim Thorpe via the D&L on Friday, exploring the Lehigh Gorge on Saturday, and home on Sunday. We had a pretty big crowd, and had three campsites reserved at Mauch Chunk Lake, and since some of us drove to Jim Thorpe we were able to have much of our camping gear carted up rather than bikepacking all of it — sweet! Except for some early morning sprinkles on Friday, we enjoyed perfect fall weather the whole trip. Here is our story in words, pictures and maps.

    Day One


    We started from Sand Island a little after 9:00 AM: Anne & me, Ed, Scott & Kellyn, and Julie, and picked up Rick and Shari at the prearranged location just north of Allentown. The day started with showers, but (as the weatherman had predicted) the rain stopped just as we got going, and the sky was clear by noon. We moved at a leisurely pace, with many stops along the way including a lunch break in Slatington. We got into town around 3:00, and were at the campsite by about 4:30. (We also bumped into Anne’s Aunt Kay at the supermarket, which was a pleasant surprise.)

    Day Two


    We didn’t exactly get up early on Saturday, but we managed to eat breakfast and hit the road by about 9:00. We met Rick & Shari in town — they’d stayed at the hotel — and picked up the day-tripper contingent of our crew at the Glen Onoko trailhead. After that it was north up into the Gorge.

    The day was really beautiful, though the leaves were only just starting to change. It was another perfect day, and we had plenty of company on the trail. We had a snack break (which turned into lunch) at Penn Haven Junction, then another feed stop at the Rockport trailhead. Most turned around there, but a few of us went just a little further, to check out Buttermilk Falls, another half mile or so up the trail.

    Day Three

    I didn’t take any pictures on Sunday, and since I forgot to stop the GPS before the ride’s end I managed to record some location data I don’t feel like sharing, so this section is a little sparse…

    We managed to have another great day on the trail, though it started a bit overcast compared to Saturday. We were a bit tired though, and maybe a bit sore in the nether regions, and our pace was definitely set at “mosey.” Still, before we knew it we were back in Slatington where I got the scrapple & egg sandwich — I got chili dogs from the same food truck on Friday, only to spot the breakfast sandwich menu immediately afterward, and I vowed to return someday…

    We had another nice surprise: I saw Chain Gangster Greg M at Slatington; he was doing a gravel bike ride and we all spotted the old team jersey he was wearing: bright yellow and still in good shape though it must be about 30 years old… I caught his attention and we had a nice chat before he continued on his way.

    Another few hours and we were home.


  • Infrastructure Fun

    I got in a few rides these past few weeks, and some good cello time too, but my major focus has been on “infrastructure” projects:

    Bike

    The Santa Cruz, after four years of that “new bike feeling,” is starting to show some signs of age. Nothing bad, just things like shifting problems in the highest gears, so I might need new cables and maybe housing, and some trouble with the tire valves: I’ve got a slow leak in the rear tire caused by a torn o-ring, and a gummed up valve up front.

    For the tires I got a “valve repair kit” from Saucon Valley Bikes. The tubeless tire valves are pretty easy to take apart and work with, so I was able to replace the rear o-ring — I can’t be sure if it worked perfectly, but it’s working enough for now — and have new valve innards on deck if the front tire becomes too annoying. The shifting seems sort of OK for the moment after I did some serious derailleur cleaning, but I can tell I’ll have to deal with those cables sooner rather than later.

    Meantime, I noticed a slight creak coming from the bottom bracket…

    SSL

    For my website I’ve been using an SSL/TLS certificate from Let’s Encrypt, which I obtained using SSLForFree, since Let’s Encrypt is pretty difficult on its own. These certificates need to be renewed every 90 days, but when I went to do it the next-to-last time, I found that SSLForFree had been bought out by ZeroSSL, who use their own certificates and who intend to charge for anything beyond a limited number of free ones. I used them that time, but spent the next three months looking into a better option.

    The ZeroSSL certificate expired a few days ago, but I had already replaced it with one from Let’s Encrypt, using a rather laborious process on yet another website. It’s very doable, but I think I’ll continue looking for a better method.

    Towpath Amenities

    This is a bit of old news, but I’ve added the amenities and access points along the towpath between New Hope and Morrisville. I have about 10 miles left to add, the section from Morrisville to Bristol, and I have all access points and amenities I could find added to my database. All that’s left is to ground-truth some of the info, then I can update the map. This last addition will make the map complete, but that won’t make the job done — this job will never be done

    I started thinking about my method of routing the other day: the routine finds the point on the road network closest to my access point (the start) and the point on the network closest to my amenity (the endpoint), then finds the shortest path through the network between start and end points. But what if the start and end points on the network are not particularly close to their respective access or amenity points?

    I originally assumed that this would not be an issue: access points were basically intersections of the D&L with the road network, and almost all amenities should be very near some road or path that customers use to get there. Then I figured out a way to check…

    Most amenities were within about 25 yards of their route’s endpoint, the distance being mostly open space like a parking lot or driveway. I figured that this was acceptable, but I also found a few amenities that were more than that distance, between say 25 and 50 yards from their endpoints. Again they were on the far sides of parking lots and such from the ends of their routes, but these distances seemed a bit too large to leave be, so I added service lanes and driveways as necessary — I’m not sure why these weren’t already a part of the network, but they are there now; I updated the routes to the offending amenities and all was well.

    There was a third group of amenities that I found, and these were the ones I had been worrying about: the ones where the database has a route, but in real life the route’s endpoint is nowhere near the amenity, and maybe the amenity isn’t even accessible from the endpoint. (One example could be a store along a roadway I’d deliberately excluded from the route network, such as a fast food place along a highway. The routing program would find a path to the closest point still on the allowed roads, and leave the cyclist to connect the endpoint and the amenity “as the crow flies,” crossing freeways or God-know-what, and I’m back to square one.)

    Luckily, I only found a few of these, and they all were total outliers: places that were in the database, but were too distant and isolated to be considered “accessible.” For now I’m leaving them in the database, but I guess I’ll eventually have to remove them. I’ll have to look more carefully at the relationship between new amenities and the road network in the future if I add any more, to make sure they actually connect.

    Network (the other kind)

    One last piece of infrastructure activity: we are switching our internet provider, from DSL on Verizon to RCN cable. I bought a cable modem and a wifi router, and called RCN the other day; the cable installers should be here this afternoon.

    I got us the slowest package, 10 Mbps, which is about four times faster than what we have now and costs about $20/mo less, before even considering the cost of the landline we’ll be abandoning when we get rid of Verizon. (If we need it we can upgrade our package, but we’ve been making do with DSL for so long that 10 Mbps will probably seem blazing fast.)