%23%20%2F%2F%2F%20script%0A%23%20%5Btool.marimo.opengraph%5D%0A%23%20title%20%3D%20%22Embedding%20Geometry%20Explorer%22%0A%23%20description%20%3D%20%22Inspect%20CLAY%20and%20SatMAE%20embedding%20geometry%20on%20the%20training%20split.%22%0A%23%20%2F%2F%2F%0A%0Aimport%20marimo%0A%0A__generated_with%20%3D%20%220.23.3%22%0Aapp%20%3D%20marimo.App(width%3D%22full%22%2C%20auto_download%3D%5B%22html%22%5D)%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%20Embedding%20Geometry%20Explorer%0A%0A%20%20%20%20Inspect%20embedding%20geometry%20on%20the%20training%20split%20for%20either%3A%0A%20%20%20%20-%20%60CLAY%60%20(%60inferred%2Fsentinel2_embeddings.parquet%60)%0A%20%20%20%20-%20%60SatMAE%60%20(%60inferred%2Fsatmae_embeddings.parquet%60)%0A%0A%20%20%20%20This%20notebook%20is%20independent%20from%20benchmark%2Fmodel%20results.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20init()%3A%0A%20%20%20%20import%20altair%20as%20alt%0A%20%20%20%20from%20dataclasses%20import%20dataclass%0A%20%20%20%20import%20marimo%20as%20mo%0A%20%20%20%20import%20numpy%20as%20np%0A%20%20%20%20import%20pandas%20as%20pd%0A%20%20%20%20from%20pathlib%20import%20Path%0A%20%20%20%20import%20sys%0A%0A%20%20%20%20def%20_ensure_repo_root_on_path()%3A%0A%20%20%20%20%20%20%20%20candidates%20%3D%20%5B%5D%0A%20%20%20%20%20%20%20%20file_value%20%3D%20globals().get(%22__file__%22)%0A%20%20%20%20%20%20%20%20if%20file_value%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20candidates.append(Path(file_value).resolve())%0A%20%20%20%20%20%20%20%20candidates.append(Path.cwd().resolve())%0A%0A%20%20%20%20%20%20%20%20for%20candidate%20in%20candidates%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20current%20%3D%20candidate%20if%20candidate.is_dir()%20else%20candidate.parent%0A%20%20%20%20%20%20%20%20%20%20%20%20for%20parent%20in%20%5Bcurrent%2C%20*current.parents%5D%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20(parent%20%2F%20%22experiments%22).is_dir()%20and%20(parent%20%2F%20%22notebooks%22).is_dir()%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20parent_str%20%3D%20str(parent)%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20parent_str%20not%20in%20sys.path%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20sys.path.insert(0%2C%20parent_str)%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%20parent%0A%20%20%20%20%20%20%20%20return%20None%0A%0A%20%20%20%20_ensure_repo_root_on_path()%0A%0A%20%20%20%20from%20experiments.regression.core%20import%20EVoCClusterFeaturizer%0A%0A%20%20%20%20JOIN_KEYS%20%3D%20%5B%22location_id%22%2C%20%22timestamp%22%2C%20%22split%22%5D%0A%20%20%20%20BASE_TABLE_PATH%20%3D%20Path(%22inferred%2Fbase_table.parquet%22)%0A%20%20%20%20CLAY_EMBEDDINGS_PATH%20%3D%20Path(%22inferred%2Fsentinel2_embeddings.parquet%22)%0A%20%20%20%20SATMAE_EMBEDDINGS_PATH%20%3D%20Path(%22inferred%2Fsatmae_embeddings.parquet%22)%0A%20%20%20%20OUTPUT_DIR%20%3D%20Path(%22inferred%22)%0A%20%20%20%20DEFAULT_SEED%20%3D%2042%0A%0A%20%20%20%20%40dataclass%0A%20%20%20%20class%20EmbeddingGeometryBundle%3A%0A%20%20%20%20%20%20%20%20embedding_source%3A%20str%0A%20%20%20%20%20%20%20%20train%3A%20pd.DataFrame%0A%20%20%20%20%20%20%20%20embedding_matrix%3A%20np.ndarray%0A%20%20%20%20%20%20%20%20embedding_dim%3A%20int%0A%0A%20%20%20%20def%20_assert_unique_keys(frame%2C%20label)%3A%0A%20%20%20%20%20%20%20%20dup_count%20%3D%20int(frame.duplicated(JOIN_KEYS).sum())%0A%20%20%20%20%20%20%20%20if%20dup_count%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20raise%20ValueError(f%22%7Blabel%7D%20has%20%7Bdup_count%7D%20duplicated%20join%20keys%22)%0A%0A%20%20%20%20def%20_load_clay_bundle(base%2C%20embeddings_path%3A%20Path)%3A%0A%20%20%20%20%20%20%20%20embeddings%20%3D%20pd.read_parquet(embeddings_path).copy()%0A%20%20%20%20%20%20%20%20_assert_unique_keys(embeddings%2C%20%22sentinel2_embeddings%22)%0A%0A%20%20%20%20%20%20%20%20embedding_columns%20%3D%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20column%20for%20column%20in%20embeddings.columns%20if%20column.startswith(%22clay_embedding_%22)%0A%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%20%20full%20%3D%20(%0A%20%20%20%20%20%20%20%20%20%20%20%20base.merge(%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20embeddings%5BJOIN_KEYS%20%2B%20embedding_columns%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20on%3DJOIN_KEYS%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20how%3D%22left%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20validate%3D%22one_to_one%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20)%0A%20%20%20%20%20%20%20%20%20%20%20%20.reset_index(drop%3DTrue)%0A%20%20%20%20%20%20%20%20)%0A%20%20%20%20%20%20%20%20train%20%3D%20full%5Bfull%5B%22split%22%5D%20%3D%3D%20%22train%22%5D.reset_index(drop%3DTrue)%0A%20%20%20%20%20%20%20%20matrix%20%3D%20train%5Bembedding_columns%5D.to_numpy(dtype%3Dfloat)%0A%20%20%20%20%20%20%20%20return%20EmbeddingGeometryBundle(%0A%20%20%20%20%20%20%20%20%20%20%20%20embedding_source%3D%22clay%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20train%3Dtrain%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20embedding_matrix%3Dmatrix%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20embedding_dim%3Dint(matrix.shape%5B1%5D)%2C%0A%20%20%20%20%20%20%20%20)%0A%0A%20%20%20%20def%20_load_satmae_bundle(base%2C%20embeddings_path%3A%20Path)%3A%0A%20%20%20%20%20%20%20%20satmae%20%3D%20pd.read_parquet(embeddings_path).copy()%0A%20%20%20%20%20%20%20%20if%20satmae.duplicated(subset%3D%5B%22location_id%22%2C%20%22timestamp%22%5D).any()%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20dup_count%20%3D%20int(satmae.duplicated(subset%3D%5B%22location_id%22%2C%20%22timestamp%22%5D).sum())%0A%20%20%20%20%20%20%20%20%20%20%20%20raise%20ValueError(%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20f%22satmae_embeddings%20has%20%7Bdup_count%7D%20duplicated%20location_id%2Ftimestamp%20keys%22%0A%20%20%20%20%20%20%20%20%20%20%20%20)%0A%0A%20%20%20%20%20%20%20%20full%20%3D%20(%0A%20%20%20%20%20%20%20%20%20%20%20%20base.merge(%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20satmae%5B%5B%22location_id%22%2C%20%22timestamp%22%2C%20%22embedding%22%5D%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20on%3D%5B%22location_id%22%2C%20%22timestamp%22%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20how%3D%22left%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20validate%3D%22many_to_one%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20)%0A%20%20%20%20%20%20%20%20%20%20%20%20.reset_index(drop%3DTrue)%0A%20%20%20%20%20%20%20%20)%0A%20%20%20%20%20%20%20%20train%20%3D%20full%5Bfull%5B%22split%22%5D%20%3D%3D%20%22train%22%5D.reset_index(drop%3DTrue)%0A%0A%20%20%20%20%20%20%20%20missing%20%3D%20int(train%5B%22embedding%22%5D.isna().sum())%0A%20%20%20%20%20%20%20%20if%20missing%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20raise%20ValueError(f%22SatMAE%20train%20rows%20missing%20embeddings%3A%20%7Bmissing%7D%22)%0A%0A%20%20%20%20%20%20%20%20matrix%20%3D%20np.vstack(%0A%20%20%20%20%20%20%20%20%20%20%20%20train%5B%22embedding%22%5D.map(lambda%20x%3A%20np.asarray(x%2C%20dtype%3Dfloat)).to_numpy()%0A%20%20%20%20%20%20%20%20)%0A%20%20%20%20%20%20%20%20return%20EmbeddingGeometryBundle(%0A%20%20%20%20%20%20%20%20%20%20%20%20embedding_source%3D%22satmae%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20train%3Dtrain%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20embedding_matrix%3Dmatrix%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20embedding_dim%3Dint(matrix.shape%5B1%5D)%2C%0A%20%20%20%20%20%20%20%20)%0A%0A%20%20%20%20def%20load_embedding_geometry_bundle(%0A%20%20%20%20%20%20%20%20*%2C%0A%20%20%20%20%20%20%20%20embedding_source%3A%20str%2C%0A%20%20%20%20%20%20%20%20base_path%3DBASE_TABLE_PATH%2C%0A%20%20%20%20%20%20%20%20clay_embeddings_path%3DCLAY_EMBEDDINGS_PATH%2C%0A%20%20%20%20%20%20%20%20satmae_embeddings_path%3DSATMAE_EMBEDDINGS_PATH%2C%0A%20%20%20%20)%3A%0A%20%20%20%20%20%20%20%20base%20%3D%20pd.read_parquet(base_path).copy()%0A%20%20%20%20%20%20%20%20_assert_unique_keys(base%2C%20%22base_table%22)%0A%0A%20%20%20%20%20%20%20%20if%20embedding_source%20%3D%3D%20%22clay%22%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20_load_clay_bundle(base%2C%20clay_embeddings_path)%0A%20%20%20%20%20%20%20%20if%20embedding_source%20%3D%3D%20%22satmae%22%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20_load_satmae_bundle(base%2C%20satmae_embeddings_path)%0A%20%20%20%20%20%20%20%20raise%20ValueError(f%22Unknown%20embedding_source%3A%20%7Bembedding_source%7D%22)%0A%0A%20%20%20%20def%20preview_embedding_map(bundle%2C%20*%2C%20seed%3DDEFAULT_SEED)%3A%0A%20%20%20%20%20%20%20%20import%20umap%0A%20%20%20%20%20%20%20%20from%20sklearn.impute%20import%20SimpleImputer%0A%20%20%20%20%20%20%20%20from%20sklearn.preprocessing%20import%20StandardScaler%0A%0A%20%20%20%20%20%20%20%20train%20%3D%20bundle.train.reset_index(drop%3DTrue)%0A%20%20%20%20%20%20%20%20imputer%20%3D%20SimpleImputer(strategy%3D%22median%22)%0A%20%20%20%20%20%20%20%20scaler%20%3D%20StandardScaler()%0A%20%20%20%20%20%20%20%20scaled%20%3D%20scaler.fit_transform(imputer.fit_transform(bundle.embedding_matrix))%0A%20%20%20%20%20%20%20%20reducer%20%3D%20umap.UMAP(%0A%20%20%20%20%20%20%20%20%20%20%20%20n_neighbors%3D25%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20min_dist%3D0.15%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%23%20Parallel%20runs%20or%20deterministic%20runs%20with%20a%20warning%3F%0A%20%20%20%20%20%20%20%20%20%20%20%20%23%20random_state%3Dseed%2C%0A%20%20%20%20%20%20%20%20)%0A%20%20%20%20%20%20%20%20coordinates%20%3D%20reducer.fit_transform(scaled)%0A%20%20%20%20%20%20%20%20clusterer%20%3D%20EVoCClusterFeaturizer(random_state%3Dseed%2C%20output_dir%3DOUTPUT_DIR)%0A%20%20%20%20%20%20%20%20clusters%20%3D%20clusterer.fit_transform(bundle.embedding_matrix).ravel()%0A%20%20%20%20%20%20%20%20return%20pd.DataFrame(%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22row_id%22%3A%20train.index%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22umap_1%22%3A%20coordinates%5B%3A%2C%200%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22umap_2%22%3A%20coordinates%5B%3A%2C%201%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22country%22%3A%20train%5B%22country%22%5D.to_numpy()%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22year%22%3A%20train%5B%22year%22%5D.to_numpy()%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22construction_cost_per_m2_usd%22%3A%20train%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22construction_cost_per_m2_usd%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5D.to_numpy()%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22geolocation_name%22%3A%20train%5B%22geolocation_name%22%5D.to_numpy()%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22evoc_cluster_preview%22%3A%20clusters%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20)%0A%0A%20%20%20%20_%20%3D%20alt.data_transformers.enable(%22vegafusion%22)%0A%20%20%20%20return%20(%0A%20%20%20%20%20%20%20%20DEFAULT_SEED%2C%0A%20%20%20%20%20%20%20%20alt%2C%0A%20%20%20%20%20%20%20%20load_embedding_geometry_bundle%2C%0A%20%20%20%20%20%20%20%20mo%2C%0A%20%20%20%20%20%20%20%20preview_embedding_map%2C%0A%20%20%20%20)%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20controls(DEFAULT_SEED%2C%20mo)%3A%0A%20%20%20%20embedding_source%20%3D%20mo.ui.dropdown(%0A%20%20%20%20%20%20%20%20options%3D%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22CLAY%22%3A%20%22clay%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22SatMAE%22%3A%20%22satmae%22%2C%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20value%3D%22CLAY%22%2C%0A%20%20%20%20%20%20%20%20label%3D%22Embedding%20source%22%2C%0A%20%20%20%20)%0A%20%20%20%20seed%20%3D%20mo.ui.number(%0A%20%20%20%20%20%20%20%20start%3D0%2C%0A%20%20%20%20%20%20%20%20stop%3D10_000%2C%0A%20%20%20%20%20%20%20%20step%3D1%2C%0A%20%20%20%20%20%20%20%20value%3DDEFAULT_SEED%2C%0A%20%20%20%20%20%20%20%20label%3D%22Random%20seed%22%2C%0A%20%20%20%20)%0A%20%20%20%20embedding_color%20%3D%20mo.ui.dropdown(%0A%20%20%20%20%20%20%20%20options%3D%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Country%22%3A%20%22country%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Year%22%3A%20%22year%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Construction%20cost%22%3A%20%22construction_cost_per_m2_usd%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22Preview%20EVoC%20cluster%22%3A%20%22evoc_cluster_preview%22%2C%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20value%3D%22Country%22%2C%0A%20%20%20%20%20%20%20%20label%3D%22UMAP%20color%22%2C%0A%20%20%20%20)%0A%20%20%20%20mo.hstack(%5Bembedding_source%2C%20seed%2C%20embedding_color%5D%2C%20justify%3D%22start%22)%0A%20%20%20%20return%20embedding_color%2C%20embedding_source%2C%20seed%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20bundle_view(embedding_source%2C%20load_embedding_geometry_bundle%2C%20mo)%3A%0A%20%20%20%20try%3A%0A%20%20%20%20%20%20%20%20bundle%20%3D%20load_embedding_geometry_bundle(%0A%20%20%20%20%20%20%20%20%20%20%20%20embedding_source%3Dembedding_source.value%2C%0A%20%20%20%20%20%20%20%20)%0A%20%20%20%20%20%20%20%20source_label%20%3D%20%22CLAY%22%20if%20bundle.embedding_source%20%3D%3D%20%22clay%22%20else%20%22SatMAE%22%0A%20%20%20%20%20%20%20%20mo.callout(%0A%20%20%20%20%20%20%20%20%20%20%20%20mo.md(%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20f%22**Source%3A**%20%7Bsource_label%7D%20%20%5Cn%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20f%22**Train%20rows%3A**%20%7Blen(bundle.train)%3A%2C%7D%20%20%5Cn%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20f%22**Embedding%20dimensions%3A**%20%7Bbundle.embedding_dim%3A%2C%7D%22%0A%20%20%20%20%20%20%20%20%20%20%20%20)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20kind%3D%22info%22%2C%0A%20%20%20%20%20%20%20%20)%0A%20%20%20%20except%20Exception%20as%20exc%3A%0A%20%20%20%20%20%20%20%20bundle%20%3D%20None%0A%20%20%20%20%20%20%20%20mo.callout(%0A%20%20%20%20%20%20%20%20%20%20%20%20mo.md(f%22Could%20not%20load%20embeddings%20for%20%60%7Bembedding_source.value%7D%60%3A%20%60%7Bexc%7D%60%22)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20kind%3D%22danger%22%2C%0A%20%20%20%20%20%20%20%20)%0A%20%20%20%20return%20(bundle%2C)%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20chart(alt%2C%20bundle%2C%20embedding_color%2C%20mo%2C%20preview_embedding_map%2C%20seed)%3A%0A%20%20%20%20if%20bundle%20is%20None%3A%0A%20%20%20%20%20%20%20%20mo.stop(%0A%20%20%20%20%20%20%20%20%20%20%20%20True%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20mo.callout(mo.md(%22No%20embedding%20bundle%20available%20to%20visualize.%22)%2C%20kind%3D%22info%22)%2C%0A%20%20%20%20%20%20%20%20)%0A%0A%20%20%20%20embedding_map%20%3D%20preview_embedding_map(bundle%2C%20seed%3Dint(seed.value))%0A%20%20%20%20color_field%20%3D%20embedding_color.value%0A%20%20%20%20if%20color_field%20in%20%7B%22country%22%2C%20%22evoc_cluster_preview%22%7D%3A%0A%20%20%20%20%20%20%20%20color%20%3D%20alt.Color(f%22%7Bcolor_field%7D%3AN%22%2C%20title%3Dcolor_field.replace(%22_%22%2C%20%22%20%22))%0A%20%20%20%20else%3A%0A%20%20%20%20%20%20%20%20color%20%3D%20alt.Color(f%22%7Bcolor_field%7D%3AQ%22%2C%20title%3Dcolor_field.replace(%22_%22%2C%20%22%20%22))%0A%0A%20%20%20%20chart%20%3D%20(%0A%20%20%20%20%20%20%20%20alt.Chart(embedding_map)%0A%20%20%20%20%20%20%20%20.mark_circle(size%3D65%2C%20opacity%3D0.85)%0A%20%20%20%20%20%20%20%20.encode(%0A%20%20%20%20%20%20%20%20%20%20%20%20alt.X(%22umap_1%3AQ%22%2C%20title%3D%22UMAP-1%22)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20alt.Y(%22umap_2%3AQ%22%2C%20title%3D%22UMAP-2%22)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20color%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20tooltip%3D%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22geolocation_name%3AN%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22country%3AN%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22year%3AO%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20alt.Tooltip(%22construction_cost_per_m2_usd%3AQ%22%2C%20format%3D%22%2C.0f%22)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22evoc_cluster_preview%3AN%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%20%20)%0A%20%20%20%20%20%20%20%20.properties(%0A%20%20%20%20%20%20%20%20%20%20%20%20width%3D760%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20height%3D420%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20title%3Df%22%7B'CLAY'%20if%20bundle.embedding_source%20%3D%3D%20'clay'%20else%20'SatMAE'%7D%20embedding%20map%20colored%20by%20%7Bcolor_field.replace('_'%2C%20'%20')%7D%22%2C%0A%20%20%20%20%20%20%20%20)%0A%20%20%20%20)%0A%0A%20%20%20%20mo.vstack(%0A%20%20%20%20%20%20%20%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20mo.md(%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22UMAP%20is%20used%20here%20for%20inspection%20only.%20It%20helps%20answer%20whether%20embedding%20geometry%20aligns%20with%20country%2C%20year%2C%20and%20target%20magnitude.%22%0A%20%20%20%20%20%20%20%20%20%20%20%20)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20chart%2C%0A%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20)%0A%20%20%20%20return%0A%0A%0Aif%20__name__%20%3D%3D%20%22__main__%22%3A%0A%20%20%20%20app.run()%0A
43064ce1a248624d50b4779a66dacca0