Skip to content

Instantly share code, notes, and snippets.

@joeyoun9
joeyoun9 / index.sh
Last active December 28, 2015 21:29
Get SynopticLabs API data with CURL
curl "http://api.mesowest.net/v2/stations/metadata?&token={YourToken}&stids=WBB,MTMET"
{
"STATION":[
{
"WXZONE":"AKZ224",
"code":"GDPA2",
"hourly":{
"relativeHumidityPercent":[
87,
94,
95,
@joeyoun9
joeyoun9 / daily.json
Last active September 24, 2015 13:53
Alaska Fire & Fuels API Output Examples
{
"STATION":[
{
"WXZONE":"AKZ224",
"code":"GDPA2",
"hourly":{
"relativeHumidityPercent":[
87,
94,
95,
@joeyoun9
joeyoun9 / index.html
Last active August 31, 2017 15:56
API Station Display
<!DOCTYPE HTML>
<!-- Bootstrap, because why not. -->
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<style>
/*
* Define a couple styles to sit on top of bootstrap and color/size tables,
* temperatures, and winds properly
*/
body {text-align:center;}
@joeyoun9
joeyoun9 / map.js
Created November 8, 2013 19:51
Super-basic map/metadata station location request and plot
map = L.map('mapdiv',{minZoom:8}).setView([40.6,-111.5], 10);
// add an OpenStreetMap tile layer
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
attribution: '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
}).addTo(map);
// add a circle demonstrating where we are looking
L.circle([40.5, -111.5], 32187, {
@joeyoun9
joeyoun9 / helloworld2.js
Last active March 23, 2021 09:41
Read through a returned list of stations from a range parameter request on the Synoptic Mesonet API
$.getJSON('http://api.synopticdata.com/stations?callback=?',
{
// specify the request parameters here
state:'ut',
status:'active',
radius:'40.75,-111.8833,10',
token:tkn
},
function (data)
{
@joeyoun9
joeyoun9 / helloworld.js
Last active December 27, 2015 18:59
MesoWest API HelloWorld
$.getJSON('http://api.mesowest.net/stations?callback=?',
{
// specify the request parameters here
stid:stn,
latestobs:1,
token:tkn
},
function (data)
{
/*
@joeyoun9
joeyoun9 / gist:5477678
Created April 28, 2013 17:41
As opposed to all the silly methods of creating non-symmetric plots in matplolib, i just found that this works!
#!/usr/bin/env python
import matplotlib.pyplot as plt
import numpy as np
x = np.arange(3)
y = x
plt.subplot(211)
plt.plot(x,x)
plt.subplot(223)