Skip to content

Instantly share code, notes, and snippets.

View mschmidty's full-sized avatar

Mike Schmidt (Schmidty) mschmidty

View GitHub Profile
library(sf)
library(arcgislayers)
con <- arc_open("https://gis.blm.gov/nlsdb/rest/services/Fluid_Minerals/Oil_Gas_Leases_Production_Status/MapServer/0")
ccng_bd <- st_read("T:\\FS\\NFS\\PSO\\MPSG\\2024_CimarronComancheNG\\1_PreAssessment\\Data\\Shapefiles\\CimarronComancheNG_AdminBdy.shp") |>
st_transform(con$sourceSpatialReference$wkid)
ccng_data <- arc_select(con, filter_geom = st_bbox(ccng_bd), page_size = 200)
@mschmidty
mschmidty / qmd_header.json
Last active January 25, 2024 01:32
VS code snippet for Quarto doc setup
"Header for .qmd" : {
"scope": "quarto, qmd",
"prefix": "qmdtomd",
"body" : [
"---",
"title: ${0}",
"date:",
"tags: [ ]",
"format:",
"\tcommonmark:",
@mschmidty
mschmidty / sde_connect.md
Created April 5, 2023 19:54
Set up ODBC Connection to SDE for TRFO tools

RODBC Connection

In order to connect to this connection you must be on a BLM computer.

To create an ODBC connection, on a Windows computer connected to a BLM network or VPN network, in the search bar search "ODBC Data Sources (32-bit)" in the windows search bar.

When the window opens:

  • Click "Add".
  • Select "SQL Server" and click "Finish".
  • Enter a name (this can be whatever you want) "COsde"
  • Enter a description "COsde"
@mschmidty
mschmidty / keybindings.json
Created February 15, 2023 19:12
VS Code keybindings for R development windows
// Place your key bindings in this file to override the defaults
[
{
"key": "ctrl+alt+i",
"command": "editor.action.insertSnippet",
"when": "editorTextFocus",
"args": {
"snippet": "```{r}\n$0\n```",
}
@mschmidty
mschmidty / get_FedData.md
Last active December 8, 2021 00:12
rOpenSci FedData

FedData github page

Makesure to download the development version. In the CRAN version downloading get_nlcd() is broken.

devtools::install_github("ropensci/FedData")
library(FedData)
library(tigris) ## to get county level data 
@mschmidty
mschmidty / .gulpfile.js
Last active December 3, 2021 23:24
My gulp setup for wordpress sites with Browsersync and svgstore
const { dest, src, series, watch, parallel } = require('gulp');
const sass = require('gulp-sass')(require('sass'));
const rename = require('gulp-rename');
const autoprefixer = require('autoprefixer')
const sourcemaps = require('gulp-sourcemaps')
const postcss = require('gulp-postcss')
const cssnano = require('cssnano');
const babel = require('gulp-babel');