Notes

Show Only ...
Maps - Photos - Videos

R remains my secret weapon πŸ–₯️

For so much I do every day at work, for Save the Pine Bush and for the blog, R remains the tool I use most. R with the tidyverse packages along a few other – namely sf, tigris, tidycensus provide many excellent tools, when tied together with pipes to build amazing data streams.

I think what I like so much about R is it’s an interpretive language at it’s core and the ability to chain commands together with maggitr pipes. You can try something, one line at a time in R, without recompiling, inspect the output, adjust it, and then when you are ready, assign it to a variable. The tidyverse provides several utilities for manipulating data frames, and with tigris and sf, you have the ability to preform all kinds of spatial queries on the data. R makes it easy to do something like pull every record that is within 30 miles of a specific point – or falls in a Census tract where the median income is under $50,000.

So much of what I do at work, for fun or as a volunteer involves joining records together. While such things can be done with SQL and similar languages, there is something so simple and beautiful about the tidyverse, chaining long lists of commands together, keeping each step of the process separate. SQL instead forces you to put everything in one line, and know what you are doing, before you start writing out the command.

As a cherry on the pie, R has the wonderful option of a right-handed assignment. Often when I am writing a command, I am not sure when I want to assign the output to the variable until most of the command is written out. With Python and most other langagues you have to always preform the assignment on the left, which can be hard to do, if you don’t know when you finally want to assign the output variable. Often

The heat and humidity hit me like a brick wall this morning 🧱

Still wating to hear the news on Big Red. I have confidence that the mechanic will figure out what is looose on the rear axle, and hopefully it’s not too expensive on a truck that has a planned retirement next year. I checked my credit card balance to make sure I have money available, and that should be good, but it still gives me something to wait and worry about. Steve is good, he’ll figure it out.

I felt like I wanted to die as I wandered out into the swamp this morning, πŸ›Œ stumbling out of my bed into what felt like 180 degree moisture bath. Sliced up an onion, dumped a bunch of stevia, cornmeal, whole wheat flower, and mixed up with the mixer, and fried up pancakes. Took a shower, missed the earlier bus downtown, put some more contact solution in my eyes, rubbed them a bit more, and I could see. Still achy and sore with the stress, my mind is playing games with me 🧠 between the heat and stress of not having a good answer on what is broke on Red. I know it’s not my job to guess what the mechanic is thinking. πŸ”§

Maybe I’ll have my truck back tomorrow but I’m not betting on it. 😎 Going to be another real hot day. I was hoping to go out to Schoharie to swim and farm stands but without the truck that isn’t going to be possible. πŸ›» Hammock is in the truck so unless I swing by the shop to pick it up I won’t have that this weekend. Don’t think the Nature Bus is doing Thacher Park this weekend either, it’s Five Rivers. 🐦 I might go out to Five Rivers but it seems like it might be too hot even for that. πŸ˜… Maybe it’s a good day to just spend by the fan reading. πŸ“– Then Sunday looks increasingly wet, with the forecast man calling for another half inch of rain come Sunday. 🌧

Truth is I will get beyond these tough times. 🚴 I wasn’t going to ride out being so soaking wet with the humidity, but the ride in felt good on the bike. The breeze on my face felt good coming down the hill. I was going to catch the later bus and shuttle downtown but while I was walking down to the express bus, I saw a mountain bike on a car and said, hell I need to burn some energy off. Hopefully I won’t get soaked heading downtown to my meeting, or riding out to hopefully pick up my truck this afternoon. If it’s too wet or humid, 🚌 I can always throw my bike on the bus.

Totally get why I’m so fustrated about everything. 😑 I was supposed to be on the road to the Finger Lakes today, by mid-morning I had hoped to make it to Ithaca and be setting up. And I knew about the problems in my truck for a while – since at least Memorial Day – but I was in complete denial. Over time, they just seemed to go away. Until last Friday on the way home when it became super-wobbly. πŸ›  I know it will get straightened out or replaced, somehow. I still have hope to do summer vacation 🏊 by the end of August. πŸ”₯ I wish I could have a fire up in the woods with some beer and grass, some of those burnables are starting to smell πŸ‘ƒ – but whatever. I know I’ll figure out my transportation situation at some point, Red will either fixed, or scrapped and replaced.

Organic 🚜 🌽

Words that come to mind when I hear organic – scam, woke, silly, waste of money.

Organic food comes about around the idea that traditional agriculture, based on science and other principals does a bad job of caring for the land, that it uses too many chemicals and toxins that get into food. Not that there is a whole lot of truth to that, but the marketers certainly want you to believe it.

Truth is there is very little nutriental differences between organic and non-organic food. If anything, the high price of organic foods can discourage people from eating healthy foods. Indeed, it seems that often the organic label these days is used to market junk food, and other items that are unhealthy for a wide variety of reasons – to much saturated fat or added sugars. Or not enough fiber or protein to be healthy. That said, if somebody avoids buying too much of unhealthy things like organic red meat, because of the price in favor of lower cost vegatables, then I guess organic food becomes healthier.

In many cases, it’s pretty hard to tell a organic and non-organic farm from a photo or even driving by. People think organic agriculture doesn’t use pesticides or chemicals, but instead they use a different set of pesticides and chemicals. So much of what is organic is just a label – something quickly tossed in the trash and turned into smoke and flame. I do sometimes buy organic tofu, but that’s only because that’s what’s avalaible at the grocery store, not because I have a strong desire to pay extra.

More baited breath.

So the shop wants to the shop owner Steve to look at my truck when he’s back in tomorrow to confirm that the wheel bearing is bad on my truck and there isn’t another issue with the rear axle. I’m thinking it could be the u-bolts again or spacers on the axle again. I do worry about the rot on the frame brace where the shock absorbers attach, I know that can be a problem on the Chevys. I haven’t noticed anything completely worn out, but I know from watching a Facebook video they can rot out under the bed where visibility is limited. Or something bigger but I don’t know, I ain’t a mechanic.

Another day of baited breath, feeding my anxiety. It’s fine, it’s not the end of world. Worst comes to worse, I junk the truck this summer and get a new one – but I really want through at least the end of the year – but I would rather keep the truck on road longer as I like Big Red and new trucks are real expensive and winters are salty and awful even if I’ve been planning for a replacement for a few years now and want something new for next summer’s road trip to Upper Michigan.

Unix Jobs Control

Apparently, I didn’t know before I borrowed the book from work that if you forget to run a Unix process in the background with an &, you can pause it with Control-Z and put it in the background with ‘bg’.

It’s so simple and obvious but I was not as good at the bash shell ot managing processes as I’m now that I use it every day at work. I use all kinds of job control and sub-shells to run processes in paralell and manage the processes I’m running.

This webpage has some good info on Unix jobs control


Job control is used to run more than one command at a time. You can only have one command at a time running in the foreground, but you may have multiple commands running at the same time in the background. To run a command in the background, place an ampersand (&) at the end of your Unix command.

To find out what jobs/processes you currently have in the background, type jobs -l at the prompt and it will list the jobs and their statuses:

z123456@turing:~$ jobs -l
[1]  14971 Running                 ./loop &
[2]- 14972 Stopped (signal)        nano prog1.cpp
[3]+ 14978 Stopped                 ./loop2
z123456@turing:~$

The number inside the [ ] is the job number. The next number is the process identification number (PID) of the job. The next column tells us about the state of the job, and the last column is the name of the process. The + stands for the current job and the - stands for the previous job.

As you can see jobs 2 and 3 are stopped in the background and job 1, the program loop, is running in the background.

  • To stop a job running in the foreground and move it into the background, use ^Z (Ctrl-z)
  • You can use ^C (Ctrl-c)to kill a foreground job.
  • To bring job 2 into the foreground, type: fg %2
  • To start job 3 running in the background, type: bg %3
  • To kill job 1 type: kill -KILL %1 (or) kill -KILL 14971
  • To kill the current job, type: kill -KILL %