Skip to content

Instantly share code, notes, and snippets.

View pdbartsch's full-sized avatar

Paul Bartsch pdbartsch

  • UC Santa Barbara
  • 93455
View GitHub Profile
@pdbartsch
pdbartsch / .gitignore
Last active April 28, 2020 22:35
U.S. National Parks TopoJSON
*.archive
*.zedstate
@pdbartsch
pdbartsch / California_urban_water_supplier_tiers_PDF_to.csv
Last active August 29, 2015 14:19
California water/ drought data converted to usable formats
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 9.
Supplier Name,Total water production 2013 (Jun - Feb),Total water production (June 2014 - Feb 2015),"Total water saved (June 2014 to Feb 2015), compared to 2013, gallons","Percent saved (June 2014 to Feb 2015), compared to 2013, gallons",Tier,Conservation standard,"Residential, gallons per capita per day (R-GPCD)"
Cambria Community Services District,"166,216,813","95,513,570","70,703,243",43%,1,10%,40.0
Vernon City of,"1,907,061,769","1,788,380,162","118,681,607",6%,1,10%,43.7
Santa Cruz City of,"2,527,700,000","1,933,400,000","594,300,000",24%,1,10%,44.9
Seal Beach City of,"905,215,264","856,337,550","48,877,714",5%,1,10%,45.3
San Francisco Public Utilities Commission,"20,365,410,000","18,717,900,000","1,647,510,000",8%,1,10%,45.7
California Water Service Company South San Francisco,"2,075,673,590","1,907,534,254","168,139,336",8%,1,10%,46.1
California Water Service Company East Los Angeles,"3,998,522,861","3,819,956,279","178,566,582",4%,1,10%,48.2
Coastside County Water District,"565,550,000","524,430,0
@pdbartsch
pdbartsch / ca_counties.geojson
Last active August 29, 2015 14:19
California Counties json formats
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pdbartsch
pdbartsch / util_export.md
Last active August 29, 2015 14:19
GIS UCSB Utility data from ArcSDE to shapefile to geojson to topojson

How I get esri gdb data ready for Leaflet maps

In my case, data source of truth lives in an ArcSDE geodatabase on PostgreSQL using EPSG:2229 projection

  • export from ArcCatalog to shapefile ... I filtered by utility type and left out the abandoned line info
  • a typical ogr2ogr command looked like this
    • ogr2ogr -f GeoJSON -t_srs EPSG:4326 ut_watr_node.geojson UT_watr_act_node.shp
  • then from geojson to topojson to reduce size and cleanup some unnecessary attributes
    • topojson -o ut_watr_link.topojson -p util_type,size,material,lat_main ut_watr_link.geojson
  • topojson -o ut_watr_node.topojson -p util_type,yr_insta,node_type,size ut_watr_node.geojson
@pdbartsch
pdbartsch / README.md
Last active August 29, 2015 14:19
Paul's Leaflet template
@pdbartsch
pdbartsch / README.md
Last active July 26, 2019 05:57
Turf.js example

Working my way through some turf.js tutorials.

starting here

@pdbartsch
pdbartsch / README.md
Last active August 29, 2015 14:19
UCSB Emergency Assembly Points - DRAFT
  • a working example from Morgan Herlocker got me started
  • pulling external GeoJSON using jQuery at the moment - I've got it setup in this weird way where the request for one data source is nested inside of the other...not real clean looking but it works to avoid async problem I was having
  • would like to integrate Omnivore eventually
  • water color map obviously not the best for a real tool used during an emergency but I like it for testing/learning
  • I'm excited about the posibilities with this seemingly simple filtering using Turf.js
We couldn’t find that file to show.
@pdbartsch
pdbartsch / .gitignore
Last active August 29, 2015 14:20
Learning d3 again/ still
# Build and Release Folders
bin/
bin-debug/
bin-release/
# Other files and folders
.settings/
# Project files, i.e. `.project`, `.actionScriptProperties` and `.flexProperties`
# should NOT be excluded as they contain compiler settings and other important
@pdbartsch
pdbartsch / index.md
Last active September 28, 2023 06:07
Locate, download and process Landsat 8 GeoTIFF images into RGB pan-sharpened JPEGs

Locate, download and process Landsat 8 GeoTIFF images into RGB pan-sharpened JPEGs

Start here

The following steps can get tedious. You're going to need to want it. Get in the mood by viewing some timelapse imagery.

Locate data for download

AWS gererously hosts Landsat imagery. This imagery can be easily searched and downloaded through Development Seed's Libra tool (You'll need to register for a free USGS account). It can be useful to see path & row graphically, so download shapefile or kml from here.

Naming

LXSPPPRRRYYYYDDDGSIVV ##L``X``S``PPP``RRR``YYYY``DDD``G``S``I``VV