Skip to content

Commit

Permalink
Deploy preview for PR #42
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Dec 7, 2024
1 parent fa8cbb7 commit 99f2759
Show file tree
Hide file tree
Showing 10 changed files with 356 additions and 236 deletions.
34 changes: 18 additions & 16 deletions pr-previews/pr-42/benchmark_analysis/benchmark_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,43 +2,45 @@

import json
from collections import defaultdict
from typing import Dict
from typing import Any, Dict, List

import pandas as pd
import plotly.express as px


def process_benchmark_data() -> Dict[str, pd.DataFrame]:
def process_benchmark_data() -> Dict[str, Dict[str, pd.DataFrame]]:
"""Read the benchmark json and convert into a dictionary of dataframes"""
with open("../benchmark.json", "r") as f:
benchmarks = json.load(f)["benchmarks"]

records = defaultdict(list)
records: Dict[str, Dict[str, List[Dict[str, Any]]]] = defaultdict(
lambda: defaultdict(list)
)
for bench in benchmarks:
dataset = bench["extra_info"].pop("concept_config_id")
record = {
"mean_time": bench["stats"]["mean"],
"stddev": bench["stats"]["stddev"],
**bench["extra_info"],
**bench["params"],
}
record.update(bench["params"])
records[bench["group"]].append(record)
records[bench["group"]][dataset].append(record)

dfs = {
group: pd.DataFrame(records).sort_values(by="bbox_size")
for group, records in records.items()
}
dfs: Dict[str, Dict[str, pd.DataFrame]] = defaultdict(dict)
for group, dataset_records in records.items():
for dataset, _records in dataset_records.items():
df = pd.DataFrame(_records).sort_values(by="bbox_size")

for group, df in dfs.items():
bbox_dims = sorted(
df["bbox_dims"].unique(), key=lambda x: float(x.split("x")[0]) * -1
)
bbox_dims = sorted(
df["bbox_dims"].unique(), key=lambda x: float(x.split("x")[0]) * -1
)

df["bbox_dims"] = pd.Categorical(
df["bbox_dims"], categories=bbox_dims, ordered=True
)
df["bbox_dims"] = pd.Categorical(
df["bbox_dims"], categories=bbox_dims, ordered=True
)

dfs[group] = df
dfs[group][dataset] = df

return dfs

Expand Down
88 changes: 47 additions & 41 deletions pr-previews/pr-42/benchmark_analysis/index.html

Large diffs are not rendered by default.

32 changes: 16 additions & 16 deletions pr-previews/pr-42/examples/rasterio_backend_example/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1785,7 +1785,7 @@ <h2 id="display-tiles-in-an-interactive-map">Display tiles in an interactive map
&lt;meta name="viewport" content="width=device-width,
initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /&gt;
&lt;style&gt;
#map_3558b81d0539cdee3170d863bf4e0344 {
#map_e545ab43422aec582801a3da581f0515 {
position: relative;
width: 100.0%;
height: 100.0%;
Expand All @@ -1799,14 +1799,14 @@ <h2 id="display-tiles-in-an-interactive-map">Display tiles in an interactive map
&lt;body&gt;


&lt;div class="folium-map" id="map_3558b81d0539cdee3170d863bf4e0344" &gt;&lt;/div&gt;
&lt;div class="folium-map" id="map_e545ab43422aec582801a3da581f0515" &gt;&lt;/div&gt;

&lt;/body&gt;
&lt;script&gt;


var map_3558b81d0539cdee3170d863bf4e0344 = L.map(
"map_3558b81d0539cdee3170d863bf4e0344",
var map_e545ab43422aec582801a3da581f0515 = L.map(
"map_e545ab43422aec582801a3da581f0515",
{
center: [47.590266824611675, -91.03729840730689],
crs: L.CRS.EPSG3857,
Expand All @@ -1820,22 +1820,22 @@ <h2 id="display-tiles-in-an-interactive-map">Display tiles in an interactive map



var tile_layer_84a473bbe2d9925509a47bd1581d7ac1 = L.tileLayer(
var tile_layer_77dc98497dd36b5727b793595b65befe = L.tileLayer(
"https://tile.openstreetmap.org/{z}/{x}/{y}.png",
{"attribution": "\u0026copy; \u003ca href=\"https://www.openstreetmap.org/copyright\"\u003eOpenStreetMap\u003c/a\u003e contributors", "detectRetina": false, "maxNativeZoom": 19, "maxZoom": 19, "minZoom": 0, "noWrap": false, "opacity": 1, "subdomains": "abc", "tms": false}
);


tile_layer_84a473bbe2d9925509a47bd1581d7ac1.addTo(map_3558b81d0539cdee3170d863bf4e0344);
tile_layer_77dc98497dd36b5727b793595b65befe.addTo(map_e545ab43422aec582801a3da581f0515);


var tile_layer_9c2b38ec5dc8159600b1ff8b2a9e6936 = L.tileLayer(
var tile_layer_3cb11e8761eb65b202a0f0e13b48e926 = L.tileLayer(
"https://dev-titiler-cmr.delta-backend.com/tiles/WebMercatorQuad/{z}/{x}/{y}@1x?concept_id=C2021957657-LPCLOUD\u0026datetime=2024-10-01T00%3A00%3A00Z%2F2024-10-10T23%3A59%3A59Z\u0026bands_regex=B%5B0-9%5D%5B0-9%5D\u0026backend=rasterio\u0026bands=B04\u0026bands=B03\u0026bands=B02\u0026color_formula=Gamma+RGB+3.5+Saturation+1.7+Sigmoidal+RGB+15+0.35",
{"attribution": "NASA", "detectRetina": false, "maxZoom": 18, "minZoom": 0, "noWrap": false, "opacity": 1, "subdomains": "abc", "tms": false}
);


tile_layer_9c2b38ec5dc8159600b1ff8b2a9e6936.addTo(map_3558b81d0539cdee3170d863bf4e0344);
tile_layer_3cb11e8761eb65b202a0f0e13b48e926.addTo(map_e545ab43422aec582801a3da581f0515);

&lt;/script&gt;
&lt;/html&gt;' style="position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;" webkitallowfullscreen=""></iframe></div></div>
Expand Down Expand Up @@ -1997,7 +1997,7 @@ <h3 id="render-ndvi-using-the-expression-parameter">Render NDVI using the <code>
&lt;meta name="viewport" content="width=device-width,
initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /&gt;
&lt;style&gt;
#map_141b60df318dcc32c5e928053c243655 {
#map_ea6885469c58da088615f9cdb18ccd12 {
position: relative;
width: 100.0%;
height: 100.0%;
Expand All @@ -2011,14 +2011,14 @@ <h3 id="render-ndvi-using-the-expression-parameter">Render NDVI using the <code>
&lt;body&gt;


&lt;div class="folium-map" id="map_141b60df318dcc32c5e928053c243655" &gt;&lt;/div&gt;
&lt;div class="folium-map" id="map_ea6885469c58da088615f9cdb18ccd12" &gt;&lt;/div&gt;

&lt;/body&gt;
&lt;script&gt;


var map_141b60df318dcc32c5e928053c243655 = L.map(
"map_141b60df318dcc32c5e928053c243655",
var map_ea6885469c58da088615f9cdb18ccd12 = L.map(
"map_ea6885469c58da088615f9cdb18ccd12",
{
center: [47.9221313337365, -91.65432884883238],
crs: L.CRS.EPSG3857,
Expand All @@ -2032,22 +2032,22 @@ <h3 id="render-ndvi-using-the-expression-parameter">Render NDVI using the <code>



var tile_layer_7c2f4acc34632a29b7f583567329bbc8 = L.tileLayer(
var tile_layer_e3e839e87a8d69232b3e72359f9c0f5b = L.tileLayer(
"https://tile.openstreetmap.org/{z}/{x}/{y}.png",
{"attribution": "\u0026copy; \u003ca href=\"https://www.openstreetmap.org/copyright\"\u003eOpenStreetMap\u003c/a\u003e contributors", "detectRetina": false, "maxNativeZoom": 19, "maxZoom": 19, "minZoom": 0, "noWrap": false, "opacity": 1, "subdomains": "abc", "tms": false}
);


tile_layer_7c2f4acc34632a29b7f583567329bbc8.addTo(map_141b60df318dcc32c5e928053c243655);
tile_layer_e3e839e87a8d69232b3e72359f9c0f5b.addTo(map_ea6885469c58da088615f9cdb18ccd12);


var tile_layer_c67fb7c178404ffdc8b2de4855ed88ff = L.tileLayer(
var tile_layer_cd14118338d3a8858e3b57b6853bc518 = L.tileLayer(
"https://dev-titiler-cmr.delta-backend.com/tiles/WebMercatorQuad/{z}/{x}/{y}@1x?concept_id=C2021957657-LPCLOUD\u0026datetime=2024-06-20T00%3A00%3A00Z%2F2024-06-27T23%3A59%3A59Z\u0026bands_regex=B%5B0-9%5D%5B0-9%5D\u0026backend=rasterio\u0026expression=%28B05-B04%29%2F%28B05%2BB04%29\u0026bands=B05\u0026bands=B04\u0026colormap_name=viridis\u0026rescale=-1%2C1",
{"attribution": "NASA", "detectRetina": false, "maxZoom": 18, "minZoom": 0, "noWrap": false, "opacity": 1, "subdomains": "abc", "tms": false}
);


tile_layer_c67fb7c178404ffdc8b2de4855ed88ff.addTo(map_141b60df318dcc32c5e928053c243655);
tile_layer_cd14118338d3a8858e3b57b6853bc518.addTo(map_ea6885469c58da088615f9cdb18ccd12);

&lt;/script&gt;
&lt;/html&gt;' style="position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;" webkitallowfullscreen=""></iframe></div></div>
Expand Down
Loading

0 comments on commit 99f2759

Please sign in to comment.