This file contains hidden or 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
| { | |
| "timestamp": "Wed Feb 11 16:10:24 EST 2015", | |
| "goalie": [ | |
| { | |
| "position": "Goalie", | |
| "id": 8475883, | |
| "twitterURL": "https:\/\/twitter.com\/f_andersen30", | |
| "weight": 236, | |
| "height": "6' 3\"", | |
| "imageUrl": "http:\/\/3.cdn.nhle.com\/photos\/mugs\/8475883.jpg", |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset=utf-8 /> | |
| <title>Tiles as Canvas Images in Leaflet</title> | |
| <meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' /> | |
| <!-- Load Leaflet from CDN--> | |
| <link rel="stylesheet" href="https://cdn.jsdelivr.net/leaflet/0.7.7/leaflet.css" /> |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset=utf-8 /> | |
| <title>Tiles as Canvas Images in Leaflet</title> | |
| <meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' /> | |
| <!-- Load Leaflet from CDN--> | |
| <link rel="stylesheet" href="https://cdn.jsdelivr.net/leaflet/0.7.7/leaflet.css" /> |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset=utf-8 /> | |
| <title>Filtering Pixels in Leaflet</title> | |
| <meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' /> | |
| <!-- Load Leaflet from CDN--> |
This file contains hidden or 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
| var decode_date = function(rgba) { | |
| // find the total days of the pixel by | |
| // multiplying the red band by 255 and adding | |
| // the green band to that | |
| var total_days = rgba[0] * 255 + rgba[1]; | |
| // take the total days value and divide by 365 to | |
| // get the year_offset. Add 15 to this (i.e 0 + 15 = 2015) | |
| // or 1 + 15 = 2016 |
This file contains hidden or 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 random | |
| import time | |
| from Queue import Queue | |
| from threading import Thread | |
| print 'Starting script!' | |
| q = Queue() |
This file contains hidden or 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
| entity_id | ksm_ref | Mill Name | Longitude | Latitude | |
|---|---|---|---|---|---|
| 1499 | KSM1439 | Murini Sam-Sam 2 (Pelintung) | 101.593 | 1.5848 | |
| 1429 | KSM1008 | PT MUSTIKA AGUNG SAWIT SEJAHTERA Jl | 101.2424 | 1.29 | |
| 1473 | KSM1380 | Sawit Anugrah Sejahtera | 101.2767 | 1.1517 |
This file contains hidden or 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 geopandas as gpd | |
| import pandas as pd | |
| shp = gpd.GeoDataFrame.from_file('lossdata_footprint/lossdata_footprint.shp') | |
| # BBox order | |
| # minimum latitude, minimum longitude, maximum latitude, maximum longitude | |
| # (or South-West-North-East). | |
| bbox_dict = {} |
This file contains hidden or 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 overpass | |
| import csv | |
| import sys | |
| api = overpass.API(timeout=900) | |
| coords = [] | |
| with open('bbox.csv') as theFile: | |
| csvReader = csv.reader(theFile) | |
| csvReader.next() |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset=utf-8 /> | |
| <title>Filtering Pixels in Leaflet</title> | |
| <meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' /> | |
| <!-- Load Leaflet from CDN--> | |
| <link rel="stylesheet" href="https://cdn.jsdelivr.net/leaflet/0.7.7/leaflet.css" /> |
OlderNewer