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 lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Proxy Intercept Fetch Example</title> | |
</head> | |
<body> | |
<h1>Proxy Intercept Fetch Example</h1> | |
<button id="make-fetch">Make Fetch Call</button> |
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 rasterio | |
from rasterio.mask import mask | |
import rio_cogeo | |
from shapely.geometry import box | |
def region(src, output_path, geom, geom_crs): | |
region_geom = rasterio.warp.transform_geom(geom_crs, src.crs, geom) | |
# Read the raster data within the region |
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 warnings | |
def CallableValue(value): | |
typ = type(value) | |
if typ is bool: | |
# For bools, we must subclass int | |
# https://stackoverflow.com/questions/2172189/why-i-cant-extend-bool-in-python | |
_typ = int |
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
<GDAL_WMS> | |
<service name="TMS"> | |
<ServerUrl>https://s3.amazonaws.com/elevation-tiles-prod/geotiff/${z}/${x}/${y}.tif</ServerUrl> | |
</service> | |
<DataWindow> | |
<UpperLeftX>-20037508.34</UpperLeftX> | |
<UpperLeftY>20037508.34</UpperLeftY> | |
<LowerRightX>20037508.34</LowerRightX> | |
<LowerRightY>-20037508.34</LowerRightY> | |
<TileLevel>14</TileLevel> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<!-- Include the CesiumJS JavaScript and CSS files --> | |
<script src="https://cesium.com/downloads/cesiumjs/releases/1.87.1/Build/Cesium/Cesium.js"></script> | |
<link href="https://cesium.com/downloads/cesiumjs/releases/1.87.1/Build/Cesium/Widgets/widgets.css" rel="stylesheet"> | |
</head> |
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 unyt as u | |
import numpy as np | |
# The following data were collected at a snow station | |
station = np.array([1,2,3,4,5]) | |
# Collected data | |
depth = np.array([92,94,105,93,96]) * u.cm | |
water_eq = np.array([29,30,33,29,32]) * u.cm | |
temp = np.array([-6, -5, -6, -6, -6]) * u.celcius |
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 pandas as pd | |
# Load pandas data frame | |
df = pd.read_csv('z-group-by-data.csv') | |
# Split every well into its own dataframe | |
# Assumes we have many wells in the same table | |
# and we want to have a table for each of those | |
# wells individually. | |
well_dfs = dict(tuple(df.groupby('well_id'))) |
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 numpy as np | |
# The function for computing distances | |
compute = lambda a, b: np.sqrt(np.sum((b - a)**2, axis=1)) |
NewerOlder