- Go to fires download page - https://firms.modaps.eosdis.nasa.gov/download/
- Zoom to Sumatra. It doesn't have to be perfect. We do some screening in EE to make sure there are no fires in Malaysia used.
- Submit the download request (2013-03-30 to present) - csv is easiest - then wait for it to complete (usually < 30 minutes)
- Upload the CSV file to Fusion Tables. Go here, then just click "new table" under the File menu and follow the instructions.
- Get the docid from the url. For example, for
docid=1SzJl73nj5IPVEOGqhGc8uv5Vkwb504uqK_YTnVGh
just grab1SzJl73nj5IPVEOGqhGc8uv5Vkwb504uqK_YTnVGh
- Update dates in this script when you run it on EE - the second date in the POST variable may need to be extended.
- Update the FIRES variable to equal to "ft:". You'll see how it is in the code.
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 sys | |
import boto | |
# based on http://www.quora.com/Amazon-S3/What-is-the-fastest-way-to-measure-the-total-size-of-an-S3-bucket | |
# assumes you've already configured your access id & secret key | |
s3 = boto.connect_s3() |
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 pyproj | |
from shapely.geometry import shape | |
from shapely.ops import transform | |
geom = {'type': 'Polygon', | |
'coordinates': [[[-122., 37.], [-125., 37.], | |
[-125., 38.], [-122., 38.], | |
[-122., 37.]]]} | |
s = shape(geom) |
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
# Compile/install GEOS. Taken from: | |
# http://grasswiki.osgeo.org/wiki/Compile_and_Install_Ubuntu#GEOS_2 | |
cd /tmp | |
wget http://download.osgeo.org/geos/geos-3.4.2.tar.bz2 | |
bunzip2 geos-3.4.2.tar.bz2 | |
tar xvf geos-3.4.2.tar | |
cd geos-3.4.2 |
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
minikube stop; minikube delete && | |
docker stop $(docker ps -aq) && | |
rm -rf ~/.kube ~/.minikube && | |
sudo rm -rf /usr/local/bin/localkube /usr/local/bin/minikube && | |
launchctl stop '*kubelet*.mount' && | |
launchctl stop localkube.service && | |
launchctl disable localkube.service && | |
sudo rm -rf /etc/kubernetes/ && | |
docker system prune -af --volumes |
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
# install dependencies | |
sudo apt-get update | |
sudo apt-get install -y build-essential | |
sudo apt-get install -y cmake | |
sudo apt-get install -y libgtk2.0-dev | |
sudo apt-get install -y pkg-config | |
sudo apt-get install -y python-numpy python-dev | |
sudo apt-get install -y libavcodec-dev libavformat-dev libswscale-dev | |
sudo apt-get install -y libjpeg-dev libpng-dev libtiff-dev libjasper-dev |
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
sudo add-apt-repository ppa:ubuntugis/ppa | |
sudo apt-get update | |
sudo apt-get install gdal-bin | |
sudo apt-get -y install python-gdal |
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
#!/usr/bin/env python | |
import argparse | |
import os | |
import requests | |
import json | |
import sys | |
import logging | |
import datetime |
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 osgeo import gdal | |
import os | |
layer_dict = {"reli":"reliability", "qual":"Quality", "ndvi":"NDVI", "evi":"EVI"} | |
def print_data(layer, data): | |
print data | |
print "data:", layer | |
print "type:", data.dtype | |
print "mean:", data.mean() |
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
"Request to deploy app with id 5c777df946e0fb0008ada92c" | |
"Deploying app with id 5c777df946e0fb0008ada92c" | |
"Deployment created: run-5c777df946e0fb0008ada92c" | |
"Pod created: run-5c777df946e0fb0008ada92c-6794d486b8-sxsp4" | |
"Scaled up replica set run-5c777df946e0fb0008ada92c-6794d486b8 to 1" | |
"Successfully assigned run-5c777df946e0fb0008ada92c-6794d486b8-sxsp4 to ip-10-0-175-133.us-west-2.compute.internal" | |
"Pod updated: run-5c777df946e0fb0008ada92c-6794d486b8-sxsp4" | |
"Deployment updated: run-5c777df946e0fb0008ada92c" | |
"Deployment updated: run-5c777df946e0fb0008ada92c" | |
"Pod updated: run-5c777df946e0fb0008ada92c-6794d486b8-sxsp4" |
NewerOlder