Notes

Show Only ...
Maps - Photos - Videos

Threads and Tidyverse

While it is true that the Census API and tidycensus only supports pulling one state at a time for anything smaller then a county, when you want to pull all Census Tracts or Block Groups in America you can run it through purrr::map.

library(tidyverse)
library(tidycensus)
library(sf)
library(purrr)

map(
  state.abb,
  \(x) get_decennial(
    geography = 'block group',
    variables = 'P1_001N',
    state = x,
    geometry = TRUE,
    cache_table = TRUE
  )
) %>%
  bind_rows() %>%
  write_sf('/tmp/blockgroup-population-of-usa.gpkg')

A better way to do this is to use furr::future_map and pull multiple states at once. You do have to be careful how many threads you pull at once to not exceed Census API limits but if you limit it to a few threads and sign up for a free Census API Key you should be okay. On Linux it’s possible to use ‘multicore’ for even slightly better performance, as uses a fork of the existing session rather then opening a separate R session as is necessary on Windows as forking isn’t supported in that operating system.

library(tidyverse)
library(tidycensus)
library(sf)
library(furrr)

plan('multisession', workers = 3)

future_map(state.abb,
           \(x) get_acs(
             'tract',
             'B19013_001',
             cache_table = TRUE,
             year = 2023,
             state = x,
             geometry = TRUE
           )) %>%
  bind_rows() %>% 
  write_sf('/tmp/median-hh-income-tract-usa.gpkg')

Cheater Glasses πŸ‘“

I was actually looking at my pictures of me wearing my glasses at that public hearing on Tuesday and thinking I kind of like the way I look with glasses when wearing the Salvation Army stripped-dress shirt. Makes me look like a real data scientist, whatever that term means. Or as they say where I work, King of the IOI (Interest-Occupation-Issue) Codes. I do dream of that day when we have a half billion data points on every New Yorker, though I’m sure database administrator will have to increase my quota before then and buy a bigger hard drive. I’m good at spending money and consuming resources like a liberal.

Going to rain today, so I think I will have to drive my big jacked up pickup truck to work, πŸ›» which really isn’t the worse thing in the world, I mean the office is only like 8 3/4 miles on the mountain bike and probably somewhat less on the motorway.Β  Don’t you know, normal people not only pay for high speed internet and garbage service, they also drive their 20-year old Honda Civics to the suburban office park every day from their vinyl and asphalt covered homes in suburbs. After all, driving a 20-year old Honda Civic and owning a vinyl-covered plywood house is considered to be a responsible thing to do unlike a mid-40 year old smoking pot and spending your weekends up in wilderness dreaming of having an off-grid hog farm somewhere in wilderness where nobody wants you to wash out the plastic before tossing it into the burn barrel. πŸ›’οΈ 🐽 Be proud of me, I did the urban recycling ♻️ thing today and washed out my milk bottle for recycling.

I keep telling myself that maybe the rain will stop and I can ride to work on my mountain bike, 🚲 but I know the forecast and that’s fucking stupid, because even if it isn’t pouring on the way in it, things will be very wet by afternoon. Plus I want to stock up on groceries before my eye surgery tomorrow. πŸ›’ I wonder how painful chopping onions will be in days directly after the big snip of my eyes? πŸ§…I guess I could take the yokel-bus downtown and spend half my day waiting for the transfer to the shuttle at Empire Plaza, walking laps in Concourse as I get yelled at by roving gangs of the homeless schizophrenic people that seem to be only ones crazy enough to be there after hours, πŸšΆπŸ‘ΉΒ  I mean Trumpster isn’t wrong on there being too many crazies in the cities. πŸ€ͺ I’ll probably do that enough once winter comes and snow is too deep to ride the rail trail to work. β˜ƒοΈ I’m not going to trash my bike so badly riding on the ice this year, I tell myself. Or at least I’ll take Delmar Bypass and Corning’s Hill to work on my mountain bike in January when it’s negative 30 degrees out.

It just was such a wet bike ride on home. 🌧️🚲  My jeans and boots were absolutely soaked, as the sky opened up 5 minutes away from the office, and Erie Boulevard became a canal once again as I headed through the old Lumber District. The rain basically stopped by the time I was home, but I was pretty damn soaked by then. But was it worth it? Well I saved on bus fare 🚍 and gas β›½ and the slowness of the yokel bus that stops at every block. But I got through more of Hunter S. Thompson’s Rum πŸ₯ƒ Diaries, and got some exercise in. I went to the Farmers Market but it’s already transitioning to winter squash, which are fine, but I like the convinence of eating a shit ton of zucchuni that I can just fry up. πŸ† It’s unfair as all hell that we are already talking about putting a fork into summer.

Last night I got reading about choosing cheater glasses πŸ‘“ after I get LASIK tomorrow. I am not sure if I will need reading glasses right away, the surgeon’s assistant doesn’t think it’s necessary for me right away for me but I now kind of like the way glasses look and I’ve started to get used to wearing them after 3 days without contact lens. πŸ‘€ Cheater glasses are so damn cheap, you can get 5 packs for $20, and it’s not like once my distant vision is fixed they are essential except maybe eventually for reading. I doubt I’ll ever need cheater glasses in the wilderness or when I’m not wearing my Salvation Army work clothes. LASIK can make your reading vision worse by pushing the focus point out, though most people when they get to my age start to need bifocals. Barry Goldwater just wore cheater glasses with a very weak magnification because he liked the look. So maybe I’ll do that too. I never liked glasses after wearing contacts for decades much until I started to wearing them before the big snip by Optometrist Edward Sissorhands. βœ‚οΈ Truth is you want to appreciate something, or really want it, they have to threaten to take it away. 🐢 πŸ”« They never did find out who shot Cheeseface up in Vermont, did they? Edward Sissorhands has my big credit card purchase πŸ’³ and I transferred in the money to reimburse the bank, and now I just got to pick up narcotics from pharmacy βš•οΈ and then catch the 12:45 PM bus. I probably need to ask for somebody to cover for me for work tomorrow, as I probably shouldn’t be reviewing shit when I’m blind and high as fuck after surgery.

And then the rain comes β˜”

Mostly because of my extreme mental illness and dislike of driving to work, I’ll ride in the rain, and probably get soaked by evening but I’ll take the risk later on as the express bus is no more and the local is so slow.

Tomorrow looks like more serious rain, 🌧️ so I’ll probably drive in tomorrow as I need to go the pharmacy to pick up those special eye drops πŸ‘€ that are supposed to make the big snip less painful and speed eye healing after LASIK on Friday. But in the mean time, I’m wearing glasses πŸ‘“ which makes me look more like a professional and less of a hillbilly πŸ§‘β€πŸŒΎ then I am. I was good, I washed out that most likely unrecycable No. 5 Cottage Cheese container so I have the option of being greenie of the year πŸ’š and recycling ♻️ that container rather then watch it melt th next time I’m in woods with the grass. Hey, at least with the rain, things won’t be such a fire risk and I can have a big fire. πŸ”₯ I was glancing at all those pallets they had along Erie Boulevard on way to work yesterday in my big jacked up truck, and I was thinking how much fun it would be to burn them as long as I don’t get any of those nails in my 35 inch tires. Went to the overpriced Market 32 in Slingerlands got fresh strawberries πŸ“ and bananas 🍌 as I could not see paying $15 for a bag of frozen fruit. Tomorrow I can stop at Walmart or Hannaford. Frozen Maine blueberries 🫐 are always good. πŸ˜‹ Less plastic then the fresh ones.

Getting used to glasses, πŸ‘“ not that I enjoy wearing them, but they work okay. I am getting used to seeing out of them. Hopefully I won’t get too soaked riding in, and if I get soaked riding home, chances are good that I won’t totally melt away, after all I am not that liberal as I own guns πŸ”« and burn more plastic and smoke more grass then those people would approve.  And I probably even voted for the Trumpster because I was annoyed that Jill Stein wasn’t on the ballot  and several other Democrats in 2024. The moron in the White’s House hasn’t done anything to protect the second amendment despite his rhetoric. πŸ”« Can’t he at least get back the real gun emoji? Especially a hunting rifle emoji? I better get in shower 🚿 and then on my bike 🚲 and head up to Menands to the Assembly Data Center World Headquarters with it’s acres of parking. πŸ…ΏοΈ And listen to more of Hunter S. Thompson’s Rum Diaries. At least now I know the inspiration for Fred Dicker’s persona, I think he’s dead now? Or at least very old and even more decrepit then it was a quarter century ago.

Last night was the big hearing over the 75-acre solar farm proposed for the Albany Pine Bush. β˜€οΈ ChatGPT really took the edge off my testimony. The developer was a nice guy, a biologist and farmer dude who had one of his solar farms burn a few months back – the one on his homestead. Said it wasn’t due to the electrical side of things, but that didn’t give the neighbors much reassurance. I thought I had a temper but did the developer. 😑 His counsel had to calm him down during the hearing when he got mad. My views have evolved on these industrial solar facilities, πŸ¦‹ they are definately a rural use as they don’t bring a lot of people on land, but they don’t belong in a full protection area of the Pine Bush. The thing is after attending these hearings, I get all jacked up on emotions, and find it hard to sleep well. πŸ›οΈ It’s all those damn urban problems, why can’t everybody have like 100 acres of land, their own cows and solar panels and burn barrel out back? πŸ›’οΈ As Trump says, “Kill All the Cows”. What a drunken moron at the United Nations yesterday. I guess it’s old timers disease, or maybe just the bitterness about the Vietnam War which ended over a half century ago. And maybe it’s a badge of honor to be seriously mentally ill. I still hate all the vinyl siding and asphalt shingles even if I’ve learned a lot about the professed virtues of no maintance materials until their landfilled from all the books πŸ“š I’ve read on building science. πŸ‘·