Skip to content

Instantly share code, notes, and snippets.

@zross
zross / spatial_example.R
Last active April 6, 2025 11:55
Spatial analysis with R
# An example of spatial analysis with R that involves grabbing data
# from a PostGIS database, joining to tabular data, projecting
# simplifying and creating an interactive map.
# This data is publicly available but requires some processing
# if you want the county boundaries you can find them here:
# cftp://ftp2.census.gov/geo/tiger/TIGER2016/COUNTY/
# The tabular data requires some processing but the raw data
@jenseickmeyer
jenseickmeyer / invalidate.sh
Created January 31, 2018 07:22
Script for invalidation a CloudFront Distribution
#!/bin/bash
DISTRIBUTION_ID=
#Invalidate the CloudFront Distribution
invalidation_id=$(aws cloudfront create-invalidation --distribution-id $DISTRIBUTION_ID --paths "/*" --query Invalidation.Id)
length=${#invalidation_id}
# Wait for invalidation to finish
aws cloudfront wait invalidation-completed --distribution-id $DISTRIBUTION_ID --id ${invalidation_id:1:$length-2}