Skip to content

Instantly share code, notes, and snippets.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jkreft-usgs
jkreft-usgs / Philly_WQP_example.json
Created April 7, 2018 02:31
WQP Geojson Examples
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jkreft-usgs
jkreft-usgs / generalDataRetrieval.R
Created March 29, 2018 21:37
Data Retrieval Example
library(dataRetrieval)
library(dplyr)
site <- "07144100"
pCode <- "00060"
service <- "uv"
this_week <- readNWISdata(siteNumbers = site,
parameterCd = pCode,
startDate = Sys.Date()-7,
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jkreft-usgs
jkreft-usgs / Dane_county_streams.json
Created January 17, 2017 15:51
Example WQP Geojson output
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jkreft-usgs
jkreft-usgs / downstream_from_silverton.html
Created November 18, 2016 21:05
Sites Downstream from Silverton, CO, scaled by result count
<html>
<head>
<title>Downstream from Silverton</title>
<!-- Load Leaflet from CDN-->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/leaflet/1.0.1/leaflet.css" />
<script src="https://cdn.jsdelivr.net/leaflet/1.0.1/leaflet.js"></script>
<script src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet-providers/1.1.7/leaflet-providers.min.js"></script>
<!-- Load Esri Leaflet from CDN -->
<script src="https://cdn.jsdelivr.net/leaflet.esri/2.0.0-beta.8/esri-leaflet.js"></script>
@jkreft-usgs
jkreft-usgs / usgs-054279465_hydrograph.r
Created September 22, 2016 18:44
pulling hydrograph data and making a NWIS-web style graph
library(dataRetrieval)
library(dplyr)
library(gsplot)
middleton_q <- readNWISuv(siteNumbers = '054279465',
parameterCd = '00060',
startDate = '2016-09-19')
middleton_q_median <- readNWISstat(siteNumbers = '054279465',
parameterCd = '00060',
statType = 'median') %>%
@jkreft-usgs
jkreft-usgs / WQP_stations.json
Last active September 9, 2016 03:10
Chapel Hill Stream Sites
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jkreft-usgs
jkreft-usgs / gist:eeffe1e7a530dc1f415c49996f8b7552
Last active August 26, 2016 19:47 — forked from dropwhile/py27.txt
python-2.7.6 centos (rpm fpm recipe)
mkdir download /tmp/installdir; cd download;
wget https://www.python.org/ftp/python/2.7.12/Python-2.7.12.tgz
tar -zxvf Python-2.7.12.tgz
cd Python-2.7.12
yum -y install openssl-devel readline-devel bzip2-devel sqlite-devel zlib-devel ncurses-devel db4-devel expat-devel
./configure --prefix=/usr/local --enable-unicode=ucs4 --enable-shared --enable-ipv6
make -j2
make install DESTDIR=/tmp/installdir
echo '/sbin/ldconfig' > /tmp/installdir/run-ldconfig.sh
fpm -s dir -t rpm -n python27 -v 2.7.12 -C /tmp/installdir \
@jkreft-usgs
jkreft-usgs / 0200010_active_nwis_streamgages.json
Last active September 14, 2016 17:25
These are a number of different views of NWIS Stream gage data
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.