Day: May 17, 2023💾

🗺️ Maps 🖼️ Photos 📽️ Videos
Terrain Map: New York and New England Terrian

Scraping SeeThroughNY Data using R

Here is the R code I am using to scrape SeeThroughNY.net to download state and local government employment wage data.

library(tidyverse)
library(RSelenium)
library(netstat)
library(rvest)

# Load Selenium browser. This code should automatically open a Firefox window
# from r, downloading the latest GeckoDriver if neccessary.
#
# If this doesn't work, you should delete the LICENSE.chromedriver which
# sometimes causes rSelenium to not load.
## find ~/.local/share/ -name LICENSE.chromedriver | xargs -r rm

rs <- rsDriver(
  remoteServerAddr = "localhost",
  port = free_port(random = T),
  browser = "firefox",
  verbose = F
)

rsc <- rs$client
rsc$navigate("https://seethroughny.net/payrolls")

# STOP !!!
# While you could automate this step, you should now manually choose your 
# search items on SeeThroughNY browser window that has opened. Then 
# you should execute the following lines.

# Next you want to load all of the results. We limit it to 30 attempts,
# which will pull most reasonably sized queries. Too big and you could crash
# your browser due to excessive memory needed.

for (i in seq(1,30)) {
  rsc$findElement(using='css', '#data_loader')$clickElement()
  
  if (rsc$findElement(using='css', '#data_loader')$getElementAttribute('style')[[1]] == 'display: none;')
    break;
 
  Sys.sleep(2)
}

# Next you need to pull and clean the HTML table that
# contains the data
rsc$getPageSource() %>%
  unlist() %>%
  read_html() %>%
  html_table() %>%
  .[[1]] %>% 
  janitor::clean_names() -> employees

# Some of the data is located in the (+) tab, but this is just a
# table field located every other row, which split up into the appropiate
# field values

employees %>%
  filter(row_number() %% 2 == 0) %>%
  select(name) %>%
  separate(name, sep='\n', into=c(NA,'subagency',NA,NA,NA,'title',NA,NA,NA,'rateofpay',NA,NA,NA,'payyear',NA,NA,NA,'paybasis',NA,NA,NA,'branch') ) %>%
  cbind(employees %>% filter(row_number() %% 2 != 0), .) %>%
  mutate(across(everything(), str_trim),
         total_pay = parse_number(total_pay)) %>%
  select(-x, -x_2, -subagency_type) -> employees

### Then you can pipe this data into ggplot or any other program.
### Or export it to CSV or Excel file
employees %>% write_csv('/tmp/employee_data.csv')

Its wonderful…

To be walking down the street and to run into random people who say, you’ve lost a lot of weight. Literal strangers but also long term acquaintances who are noticing.

That said, what really feels wonderful is how much better these days I feel and how I’ve learned to eat much healthier and diverse food choices, things that are interesting but not overcooked and loaded with fat, salt and sugar.

There is always more to do but I think I am making permanent changes in my life. But probably the hardest thing remains friends, colleagues and family – when you find a good way to live – others want to pull you back as they don’t understand your new way of living.

I’m reminded of these lyrics which ring true with doing so much of the right thing in your life.

My buddies tell me that I should have waited
They say I’m missing a whole world of fun
But I am happy and I sing with pride
I like the christian life

I won’t lose a friends by heeding God’s call
For what is a friend who’d want me to fall
Otheres find pleasure in things I despise
I like the christian life

My buddies shun me since I turned to Jesus
But I am happy though it burdens my soul
And I’ll try to lead them to walk in the night
I like the christian life

Terrain Map: Rensselaerville Falls LiDAR
Thematic Map: Percentage of Municipality Forested

Bog River Flow – Hitchens Pond and Lows Lakes 

Explore this page for comprehensive maps and campsite listings along the stunning Bog River Flow, also referred to as Lows and Hitchens Pond, nestled in the Adirondacks. Equipped with coordinates and interactive maps, this valuable resource aids in locating free camping spots within this scenic region. Discover more about the Lows Lake area, adjacent to Horsehoe Pond, situated off NY 3 and NY 421, approximately ten miles south of Tupper Lake.

Interactive map of campsites along Bog River Flow.

Here is a downloadable map.

Here is a list of the campsites in the Bog River Flow – Hitchens Pond and Lows Lake. You can download this on Google Sheets.

NameNotescoord
Big Deer Pond CampsiteCampsite 2 on Oswegatchie River Canoe Carry44.07066499203909,-74.83562688410296
Bog Lake CampsiteCampsite on knoll under hemlocks. No obvious privy44.04597400340542,-74.76877997265527
Bog River Primitive Campsite 1Designated campsite44.11498202693457,-74.62835933121629
Bog River Primitive Campsite 2Designated campsite44.112697282644255,-74.63814827173313
Bog River Primitive Campsite 3Designated campsite44.11709452942677,-74.6416450967812
Bog River Primitive Campsite 4Designated campsite. With short privy44.11703559376099,-74.66030250230646
Bog River Primitive Campsite 5Designated campsite. With short privy44.11438984664461,-74.66461339832713
Bog River Primitive Campsite 6Designated campsite with pit privy. Full sized privy44.11147789052526,-74.66585509269002
Bog River Primitive Campsite 7Designated campsite. With short privy44.11022932303285,-74.66826136834727
Bog River Primitive Campsite 8Designated campsite. With short privy44.10742088225655,-74.6691164912543
Bog River Primitive Campsite 9Designated campsite. With short privy44.10503371724627,-74.67884988872132
Bog River Primitive Campsite 10Designated campsite with pit privy. Full sized privy44.10140804214472,-74.69038422222768
Bog River Primitive Campsite 11Designated campsite. With short privy44.099078711392714,-74.6930712072797
Bog River Primitive Campsite 12Designated campsite. With short privy44.0978314008462,-74.69999139028391
Boone’s Landing Primitive CampsiteDeisgnated campsite with short privy. Checked 04/2016.44.07626703407614,-74.77451394551568
Clear Pond CampsitePrimitive campsite with short privy44.04310127384352,-74.76343793716421
Grass Pond Primitive Campsite 31Designated campsite with pit privy44.092147034884384,-74.79863219015742
Lows Lake Primitive Campsite 13Designated campsite. Poor condition and overused. With short privy. 44.08908245767215,-74.74258124938055
Lows Lake Primitive Campsite 14Designated campsite. Occupied. Approximate location. 44.088298730072516,-74.73907345571132
Lows Lake Primitive Campsite 15Designated campsite. With short privy. Nice site. 44.086804927298935,-74.73430814679912
Lows Lake Primitive Campsite 16Designated campsite. With short privy. 44.08697767903585,-74.7371946215598
Lows Lake Primitive Campsite 17Designated campsite. Campsite overused and in poor condition. With short privy. 44.084603924660556,-74.74423273731236
Lows Lake Primitive Campsite 18Designated campsite. With short privy. 44.08293760192738,-74.75172590438794
Lows Lake Primitive Campsite 19Designated campsite. With short privy44.08577051841745,-74.7698825245966
Lows Lake Primitive Campsite 20Designated campsite with full sized pit privy44.08458229868338,-74.76551513622299
Lows Lake Primitive Campsite 21Designated campsite with short privy44.0841067099251,-74.76714315198797
Lows Lake Primitive Campsite 22Designated campsite with short privy44.08348728892685,-74.76899882134914
Lows Lake Primitive Campsite 23Designated campsite with full sized pit privy44.08481154468211,-74.7793430089072
Lows Lake Primitive Campsite 24Designated campsite. No obvious privy44.08214123869901,-74.78372221677317
Lows Lake Primitive Campsite 25Designated campsite with short privy44.08257818694519,-74.78576220349693
Lows Lake Primitive Campsite 26Designated campsite with short privy44.08057675692337,-74.78326523593361
Lows Lake Primitive Campsite 27Designated campsite with short privy44.07770972821251,-74.78602313200635
Lows Lake Primitive Campsite 28Designated campsite with short privy44.07697932965167,-74.78767361168993
Lows Lake Primitive Campsite 29Designated campsite with pit privy44.08558854802722,-74.80275273416528
Lows Lake Primitive Campsite 30Designated campsite with pit privy44.08783925703664,-74.79962217835768
Lows Lake Primitive Campsite 32Designated campsite with pit privy44.09543594183192,-74.80460932447639
Lows Lake Primitive Campsite 33Designated campsite with pit privy44.09388897785448,-74.8066177959671
Lows Lake Primitive Campsite 34Designated campsite. With short privy.44.072702799586196,-74.81433132394646
Lows Lake Primitive Campsite 35Designated campsite. With short privy. 44.06841352774994,-74.78892997620443
Lows Lake Primitive Campsite 37Designated campsite. No obvious privy. 44.06315824239366,-74.76314230557793
Lows Lake Primitive Campsite 38Designated campsite. Approximate location. 44.06608053710454,-74.76628108137284
Lows Lake Primitive Campsite 39Designated campsite. With short privy. 44.07148851236176,-74.78169798893907
Lows Lake Primitive Campsite 40Designated campsite. With short privy.44.07841841600538,-74.7549414520306
Moose Bay Landing Primitive CampsiteDesignated campsite. Poor condition. No obvious privy. Checked 04/2016.44.06844596600476,-74.78354494035702
Oswegatchie River Canoe Carry Campsite 1Believe this is considered campsite no 1 on canoe carry and oswegatchie river route44.07397735162807,-74.82145107840337
Virgin Timber Landing Primitive CampsiteDesignated campsite. Short privy located 250 ft west on mainland.44.07175648243474,-74.80529773174713
Thematic Map: Lands of the Oneida Indian Nation
Map: Merill's Hill Trail