Skip to content

Instantly share code, notes, and snippets.

View jmcbroom's full-sized avatar

Jimmy McBroom jmcbroom

View GitHub Profile
@jmcbroom
jmcbroom / print_dag_schedules.py
Created September 11, 2023 14:39
Print a list of all Airflow DAGs and their `schedule_interval`
from airflow.models.dagbag import DagBag
bag = DagBag()
for id in sorted(bag.dag_ids):
dag = bag.get_dag(id)
print(f"{id}: {dag.schedule_interval}")
@jmcbroom
jmcbroom / model_yaml_generator.sh
Created September 17, 2022 16:32
Shell script to iterate over models in a folder and `generate_model_yaml` for each
#/bin/bash
models=(
$(ls *.sql | sed 's/.sql//')
)
touch __models.txt
echo "version: 2" >> __models.txt
echo >> __models.txt
@jmcbroom
jmcbroom / ShapeInput.js
Created March 17, 2022 11:45
Sanity test input
import React, { useEffect, useState } from "react";
import PatchEvent, { set, unset } from "@sanity/form-builder";
import { FormField } from "@sanity/base/components";
import { TextInput } from '@sanity/ui';
const ShapeInput = React.forwardRef((props, ref) => {
const {
type,
value,
readOnly,
@jmcbroom
jmcbroom / buffered_aa.json
Created January 4, 2022 22:09
Ann Arbor Clip Overlay
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jmcbroom
jmcbroom / smart_shapes.geojson
Created April 15, 2021 17:39
SMART Route shapes ca. 04/21
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
title date tags
Address & geocoding primer
2018-06-06
geocoding
addresses

Let's talk about addresses, why they're important, and how we can use them to derive more information about a place.

Addresses are probably the most common method used to refer to specific places, like 2 Woodward Avenue. You may also come across:

{
"type": "FeatureCollection",
"name": "New Route",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
"features": [
{ "type": "Feature", "properties": { "Name": "Directions from 200 Larkin St, San Francisco, CA, USA to 998 Kearny St, San Francisco, CA 94133, USA", "Description": "" }, "geometry": { "type": "LineString", "coordinates": [ [ -122.41597, 37.77984, 0.0 ], [ -122.416, 37.77984, 0.0 ], [ -122.41603, 37.77983, 0.0 ], [ -122.41606, 37.77982, 0.0 ], [ -122.41609, 37.77981, 0.0 ], [ -122.41611, 37.7798, 0.0 ], [ -122.41612, 37.7798, 0.0 ], [ -122.41614, 37.77979, 0.0 ], [ -122.41616, 37.77978, 0.0 ], [ -122.41618, 37.77977, 0.0 ], [ -122.41619, 37.77975, 0.0 ], [ -122.41621, 37.77973, 0.0 ], [ -122.41623, 37.77971, 0.0 ], [ -122.41679, 37.77964, 0.0 ], [ -122.41682, 37.77975, 0.0 ], [ -122.41685, 37.77989, 0.0 ], [ -122.41686, 37.77992, 0.0 ], [ -122.41689, 37.78003, 0.0 ], [ -122.4169, 37.78018, 0.0 ], [ -122.41694, 37.78046, 0.0 ], [ -122.41695, 37.78054, 0.0 ], [ -
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCYJBSnYAf8DdJ244EoxzzSzt8pA3AGaoAhi0yO5RDQFYhx2e9Ufeff5yRUzVpHl06trrzLWiSE9OT0A2Uu9MHMQWhP0wYvieNUf72++7for9k0B4pghiWpg4xU9e2l17Y9XXavG15gmc2DjlXX/YVjwmGbZJ/bQmdnNDieQ6+XJX50KuBWQeTRThOp4OqlJp/pYSnUE0TsFX8b6jS56oltm5Ev601s+WDu3upFnNEFATkXrUUNmz/IWnZntDW/2b8ntEUkNQo7EgPL6zjS5u+gJXcFu39YLx27TzGMQ8QGdn/AaXgwcuFTQ4U61yBM83loJp0uX6Tfoc2+uT3DMOPux1VyEX1Ta71pgkybFykKae9/8JJ/CGHTi6n+TywUEWC1U+9zMXfB9BZBPRZZ+aFIjkjKRe2uLhYc6tv8qcvEBFDe6E6rGznHRf6HUukht1Zv7YpIgipFzuJQYHsrFCfpFzgHpd0hq9/L7g23YJRvhZz+Lv4P7/5khj++XR8Unl6hGMV+x3w5yHs/nvMxbqXmCi93qbigTlq/2UkgtI4llfg11ciATLWzucaYYxZLqYHSJzn/ODSq6l9G/7XHHU/5Do3nIHoEYNift5CICTzcItpeqU7gm8dYHsUSyqWiOZeB7qQSgNvnA4GOHncyh3xqsFPbDEB2oGgc5cn45bQ3oQ== james.mcbroom@gmail.com
@jmcbroom
jmcbroom / 2020-05-28-infrastructure-data-overview.md
Last active May 28, 2020 16:29
Agenda for 5/28 RoW/Base Units infrastructure & data meeting

RoW/Base Units Infrastructure/Data overview

Details

Date: May 28, 2020

Time: 12:30-2pm

Zoom meeting ID: 955 0034 4873

@jmcbroom
jmcbroom / census_reporting_views.sql
Created May 27, 2020 15:08
Census reporting views
-- View for the daily tract numbers
drop view if exists daily_tract_rates;
create view daily_tract_rates as (
select
geo_id,
right(geo_id, 6) as tract,
resp_date::date,
drrint::numeric,
drrall::numeric,