Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import multiprocessing | |
from datetime import datetime | |
ALERT_URL = 'http://forma-cs-validation.elasticbeanstalk.com/api/alerts' | |
def _screener(x): | |
try: | |
not_cached = x['cached'] is not True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import scipy | |
from scipy import ndimage | |
import copy | |
import matplotlib | |
matplotlib.use('Agg') # Must be before importing matplotlib.pyplot or pylab! | |
import matplotlib.pyplot as plt | |
import numpy as np | |
from spaceknow.horik import tools | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from bs4 import BeautifulSoup | |
import requests | |
import urllib | |
import pandas | |
import json | |
import itertools | |
import os | |
BASE = "https://2014.spaceappschallenge.org/awards/#globalnom" | |
GOOGLE_GEOCODE_URL = 'https://maps.googleapis.com/maps/api/geocode/json' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
from StringIO import StringIO | |
from pprint import pprint | |
from PIL import Image | |
from numpy import array | |
base = "https://api.data.gov/nasa/planetary/earth" | |
payload = { | |
"lon": -122.066133, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import urllib | |
BASE = "http://beta.gfw-apis.appspot.com/forest-change/forma-alerts" | |
period = "2008-01-01,2012-09-24" | |
sample_area = { | |
"geometry": { | |
"type": "Polygon", | |
"coordinates": [ |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Sample code to demonstrate the vegetation extraction from satellite imagery. | |
# The example region is a small plot in the central valley: | |
# https://gist.github.com/danhammer/47590518ece27c2ef0ab | |
# Specifically, this reports the mean and standard deviation EVI score for all | |
# 30m pixels within the supplied polygon. To install the requests package on a | |
# Mac, type `sudo pip install requests` or visit this page for more comprehensive | |
# install instructions: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Sample code to identify buildings withing a supplied bounding box. | |
import requests | |
def grabber(bbox, residential=True): | |
BASE = "http://wolak.enviro-service.appspot.com/buildings" | |
payload = bbox | |
payload['residential'] = residential | |
res = requests.get(BASE, params=payload).json() | |
return res |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.