Been thinking more about that Drive Safe and Save Program. πŸ›»

Simply requesting the beacon and installing the app saved me $60 on the September insurance renewal. That’s cool. Ten percent discount. Maybe go up to 30% but I think it will be below ten percent when I renew just because I have my phone screen on when I drive for Waze and in case I get phone calls, emails or text messages that require me to pull over and respond for work. I’m a director, I can’t be fully off grid every time I’m in automobile. I’m not going to necessarily touch or look down at my phone, it’s safely put in my phone cradle as I drive, like I’ve done for the past decade and a half.

So far I’m not thrilled by the app. I find it annoying it yells me every time I turn off the Bluetooth to disconnect my headphones, but so be it. I probably will also get dinged for inevitable smartphone use while driving — not that I frequently touch my phone while driving due to the law — but because the screen is on as use Waze to monitor traffic and specifically my speed because my speedometer is off by about 9% too low due to the 35 inch tires. Plus I need to know when a text message or call comes in from work, so if necessary I can pull over and respond. I don’t ever take calls or reply to texts while driving though occasionally I’ll report touch my phone cops on Waze, though I am certainly willing to not do that. I’m careful and rarely do that as I don’t want to get a ticket.

I’d rather pay more on insurance then risk getting a speeding ticket due to my speedometer being off. Or not hearing the warning ping when I’m speeding. I’m careful but not perfect and hearing the bell ring can remind me to slow down. I just hope the app doesn’t constantly complain and interfere with my use just because I leave Waze running and the screen on while I drive. Maybe an occasional ping or warning message ain’t the end of the world and I’m willing to forfeit that part of the discount but it’s a problem if it makes it difficult to use my phone or the annoying factor is too high.

I guess there is a risk the insurance would notice my odometer is off by 9% but it’s not like it should effect rates much as I’m already in the 7,500 plus mile class, as despite not commuting I do a fair amount of miles on weekend trips and summer and fall vacations. Then there is the issue of how the acceleration meter will read my jacked up truck going around the curves — it’s a big lifted truck — it sways and dips a lot on bumps and curves, though I probably drive slower then most because of that fact. I guess the risk is low, as your guaranteed a 5% discount and the right to cancel at any time. Yes, I guess they could use data to in theory deny a claim, but I am not sure if there is much evidence of that or the state insurance regulator allowing it.

I probably should look are more insurance companies, but the one time I had a claim it was paid and my family has done business with the Elaine Van DeCarr for 40 years now. Auto insurance has become a lot more expensive recently, both thanks to climate change, bad driving habits and the legislature mandating more coverage, and it’s across the market. When I compared plans in the past, though I found there wasn’t a big difference prices — many of the options were more expensive with my unblemished record. If anything the big savings came when new insurers tried to push you into higher deductible plans, and especially with lower coverage limits. Lower coverage limits is fine if you don’t have many assets, but I have all that money I’ve been saving to buy land and that off-grid property, and motoring is a risky activity, and I want to ensure I have good coverage limits, well above the state minimum.

Maybe I’m too willing to give up my privacy for what literally is a few bucks a month. But insurance just keeps going up and I would like to become a safer driver. Crashes are no joke, they can forever change your life. And even pennies add up after time. I don’t believe in conspiracies and I understand the protections given to me under law and what the insurance company can and can not use my data for. Plus New York State not only has expensive car insurance but also strong regulations on industry practices. But privacy advocates are not wrong and I’m enabling potentially really bad behavior for industry.

But I guess it’s worth a try.

How to access WMS Servers in R Programming Language

How to access WMS Servers in R Programming Language

I couldn’t find a good package to read WMS data into a SpatialRaster or for downloading. However I discovered that you can use sf’s built-in version of gdal_util query the WMS server’s information then use the sf built in gdal_translate to download the WMS image into a temporary file then load it into memory.

library(sf)
library(tidyverse)
library(terra)
rm(list=ls())

# obtain layer info from WMS server using sf built-in version of gdal_info
wms_url <- 'https://orthos.its.ny.gov/ArcGIS/services/wms/Latest/MapServer/WMSServer?'
ginfo <- sf::gdal_utils('info', str_c('WMS:',wms_url), quiet=T)

# extract layers and layer urls from returned layer info, 
# create a data table from this data
ldesc <- ginfo %>% str_match_all('SUBDATASET_(\\d)_DESC=(.*?)\n')
ldsc <- ldesc[[1]][,3]
lurl <- ginfo %>% str_match_all('SUBDATASET_(\\d)_NAME=(.*?)\n')
lurl <- lurl[[1]][,3]
wms_layers <- cbind(ldesc, lurl)
rm(ldesc, lurl)

# obtain from census bureau a shapefile of the Town of Cazenovia,
# then find the bounding box around it
bbx<- tigris::county_subdivisions('ny') %>% 
  filter(NAME == 'Cazenovia') %>% 
  st_transform(3857) %>% 
  st_bbox()

# Revise the WMS URL based on the above bounding box
# Web Mercator (3857) is best to use with WMS Servers as
# that is the native projection. As I wanted multiple layers
# I also revised the URL string to include all layers desired
# Seperated by a comma (explore the wms_layer table for details)
url <- wms_layers[4,2] %>%
  str_replace('LAYERS=(.*?)&', 'LAYERS=3,2,1,0&') %>%
  str_replace('SRS=(.*?)&', 'SRS=EPSG:3857&') %>%
  str_replace('BBOX=(.*?)$', str_c('BBOX=',paste(bbx, collapse=',')) ) 

# Use sf built-in gdal_utils to download the image of Cazenovia based
# on the URL, with an output size listed below. You can also download
# based on resolution by using the tr option that is commented out below.
# then load the temporary file into rast as a Spatial Raster for further 
# processing. In addition, adding -co COMPRESS=JPEG greatly reduces the size
# of aerial photography with minimal impacts on quality or loading speed.

t <- tempfile()
reso <-  c('-outsize','1920','1080','-co','COMPRESS=JPEG')
#reso <- c('-tr', '1','1','-co','COMPRESS=JPEG') # "meters" in the 3857 projection
sf::gdal_utils('translate', url, t, reso) 
r <- rast(t)

# display the spatial raster or whatever you would like to do with it
# the tiff is stored in the temporary location in the t variable
plot(r)