diff --git a/nbs/08_context_layer_rag.ipynb b/nbs/08_context_layer_rag.ipynb
index b497c6c..3024723 100644
--- a/nbs/08_context_layer_rag.ipynb
+++ b/nbs/08_context_layer_rag.ipynb
@@ -85,15 +85,37 @@
"metadata": {},
"outputs": [],
"source": [
+ "# Done\n",
"glad_global_land_cover = [\n",
" {\n",
- " \"name\": f\"Annual global land cover and land use (2000-2020)\",\n",
+ " \"name\": f\"Annual global land cover and land use {year}\",\n",
" \"dataset\": f\"projects/glad/GLCLU2020/v2/LCLUC_{year}\",\n",
" \"resolution\": 30,\n",
" \"description\": \"Global map with continuous measures of bare ground and tree height inside and outside of wetlands, seasonal water percent, and binary labels of built-up, permanent snow/ice, and cropland.\",\n",
" \"year\": year,\n",
" \"band\": \"b1\",\n",
" \"type\": \"Image\",\n",
+ " \"visualization_parameters\": {\"min\":0,\"max\":255,\"palette\":[\"FEFECC\",\"FAFAC3\",\"F7F7BB\",\"F4F4B3\",\"F1F1AB\",\"EDEDA2\",\"EAEA9A\",\"E7E792\",\"E4E48A\",\n",
+ "\"E0E081\",\"DDDD79\",\"DADA71\",\"D7D769\",\"D3D360\",\"D0D058\",\"CDCD50\",\"CACA48\",\"C6C63F\",\"C3C337\",\"C0C02F\",\"BDBD27\",\"B9B91E\",\"B6B616\",\n",
+ "\"B3B30E\",\"B0B006\",\"609C60\",\"5C985C\",\"589558\",\"549254\",\"508E50\",\"4C8B4C\",\"488848\",\"448544\",\"408140\",\"3C7E3C\",\"387B38\",\"347834\",\n",
+ "\"317431\",\"2D712D\",\"296E29\",\"256B25\",\"216721\",\"1D641D\",\"196119\",\"155E15\",\"115A11\",\"0D570D\",\"095409\",\"065106\",\"643700\",\"643a00\",\n",
+ "\"643d00\",\"644000\",\"644300\",\"644600\",\"644900\",\"654c00\",\"654f00\",\"655200\",\"655500\",\"655800\",\"655a00\",\"655d00\",\"656000\",\"656300\",\n",
+ "\"666600\",\"666900\",\"666c00\",\"666f00\",\"667200\",\"667500\",\"667800\",\"667b00\",\"ff99ff\",\"FC92FC\",\"F98BF9\",\"F685F6\",\"F37EF3\",\"F077F0\",\n",
+ "\"ED71ED\",\"EA6AEA\",\"E763E7\",\"E45DE4\",\"E156E1\",\"DE4FDE\",\"DB49DB\",\"D842D8\",\"D53BD5\",\"D235D2\",\"CF2ECF\",\"CC27CC\",\"C921C9\",\"C61AC6\",\n",
+ "\"C313C3\",\"C00DC0\",\"BD06BD\",\"bb00bb\",\"000003\",\"000004\",\"000005\",\"BFC0C0\",\"B7BDC2\",\"AFBBC4\",\"A8B8C6\",\"A0B6C9\",\"99B3CB\",\"91B1CD\",\n",
+ "\"89AFD0\",\"82ACD2\",\"7AAAD4\",\"73A7D6\",\"6BA5D9\",\"64A3DB\",\"5CA0DD\",\"549EE0\",\"4D9BE2\",\"4599E4\",\"3E96E6\",\"3694E9\",\"2E92EB\",\"278FED\",\n",
+ "\"1F8DF0\",\"188AF2\",\"1088F4\",\"0986F7\",\"55A5A5\",\"53A1A2\",\"519E9F\",\"4F9B9C\",\"4D989A\",\"4B9597\",\"499294\",\"478F91\",\"458B8F\",\"43888C\",\n",
+ "\"418589\",\"3F8286\",\"3D7F84\",\"3B7C81\",\"39797E\",\"37767B\",\"357279\",\"336F76\",\"316C73\",\"2F6970\",\"2D666E\",\"2B636B\",\"296068\",\"285D66\",\n",
+ "\"bb93b0\",\"B78FAC\",\"B48CA9\",\"B189A6\",\"AE85A2\",\"AA829F\",\"A77F9C\",\"A47B99\",\"A17895\",\"9E7592\",\"9A718F\",\"976E8C\",\"946B88\",\"916885\",\n",
+ "\"8D6482\",\"8A617F\",\"875E7B\",\"845A78\",\"815775\",\"7D5472\",\"7A506E\",\"774D6B\",\"744A68\",\"714765\",\"de7cbb\",\"DA77B7\",\"D772B3\",\"D46EAF\",\n",
+ "\"D169AB\",\"CE64A8\",\"CB60A4\",\"C85BA0\",\"C4579C\",\"C15298\",\"BE4D95\",\"BB4991\",\"B8448D\",\"B54089\",\"B23B86\",\"AF3682\",\"AB327E\",\"A82D7A\",\n",
+ "\"A52976\",\"A22473\",\"9F1F6F\",\"9C1B6B\",\"991667\",\"961264\",\"000000\",\"000000\",\"000000\",\n",
+ "\"1964EB\",\"1555E4\",\"1147DD\",\"0E39D6\",\"0A2ACF\",\"071CC8\",\"030EC1\",\"0000BA\",\n",
+ "\"0000BA\",\"040464\",\"0000FF\",\"3051cf\",\"000000\",\"000000\",\"000000\",\"000000\",\n",
+ "\"000000\",\"000000\",\"000000\",\"000000\",\"000000\",\"000000\",\"000000\",\"000000\",\n",
+ "\"000000\",\"000000\",\"000000\",\"000000\",\"000000\",\"000000\",\"000000\",\"000000\",\n",
+ "\"547FC4\",\"4D77BA\",\"466FB1\",\"4067A7\",\"395F9E\",\"335895\",\"335896\",\"335897\",\"ff2828\",\"ffffff\",\"d0ffff\",\"ffe0d0\",\"ff7d00\",\"fac800\",\"c86400\",\n",
+ "\"fff000\",\"afcd96\",\"afcd96\",\"64dcdc\",\"00ffff\",\"00ffff\",\"00ffff\",\"111133\",\"000000\"]},\n",
" \"metadata\": {\n",
" \"layer_type\": \"categorial\", \n",
" \"value_mappings\": [\n",
@@ -125,7 +147,28 @@
" \"value_mappings\": [\n",
" {\"value\": 0, \"description\": \"\"} # TODO: fetch pixel value mappings once access to document is granted\n",
" ]\n",
- " }\n",
+ " }, \n",
+ " \"visualization_parameters\": {\"min\":0,\"max\":255,\"palette\":[\"FEFECC\",\"FAFAC3\",\"F7F7BB\",\"F4F4B3\",\"F1F1AB\",\"EDEDA2\",\"EAEA9A\",\"E7E792\",\"E4E48A\",\n",
+ "\"E0E081\",\"DDDD79\",\"DADA71\",\"D7D769\",\"D3D360\",\"D0D058\",\"CDCD50\",\"CACA48\",\"C6C63F\",\"C3C337\",\"C0C02F\",\"BDBD27\",\"B9B91E\",\"B6B616\",\n",
+ "\"B3B30E\",\"B0B006\",\"609C60\",\"5C985C\",\"589558\",\"549254\",\"508E50\",\"4C8B4C\",\"488848\",\"448544\",\"408140\",\"3C7E3C\",\"387B38\",\"347834\",\n",
+ "\"317431\",\"2D712D\",\"296E29\",\"256B25\",\"216721\",\"1D641D\",\"196119\",\"155E15\",\"115A11\",\"0D570D\",\"095409\",\"065106\",\"643700\",\"643a00\",\n",
+ "\"643d00\",\"644000\",\"644300\",\"644600\",\"644900\",\"654c00\",\"654f00\",\"655200\",\"655500\",\"655800\",\"655a00\",\"655d00\",\"656000\",\"656300\",\n",
+ "\"666600\",\"666900\",\"666c00\",\"666f00\",\"667200\",\"667500\",\"667800\",\"667b00\",\"ff99ff\",\"FC92FC\",\"F98BF9\",\"F685F6\",\"F37EF3\",\"F077F0\",\n",
+ "\"ED71ED\",\"EA6AEA\",\"E763E7\",\"E45DE4\",\"E156E1\",\"DE4FDE\",\"DB49DB\",\"D842D8\",\"D53BD5\",\"D235D2\",\"CF2ECF\",\"CC27CC\",\"C921C9\",\"C61AC6\",\n",
+ "\"C313C3\",\"C00DC0\",\"BD06BD\",\"bb00bb\",\"000003\",\"000004\",\"000005\",\"BFC0C0\",\"B7BDC2\",\"AFBBC4\",\"A8B8C6\",\"A0B6C9\",\"99B3CB\",\"91B1CD\",\n",
+ "\"89AFD0\",\"82ACD2\",\"7AAAD4\",\"73A7D6\",\"6BA5D9\",\"64A3DB\",\"5CA0DD\",\"549EE0\",\"4D9BE2\",\"4599E4\",\"3E96E6\",\"3694E9\",\"2E92EB\",\"278FED\",\n",
+ "\"1F8DF0\",\"188AF2\",\"1088F4\",\"0986F7\",\"55A5A5\",\"53A1A2\",\"519E9F\",\"4F9B9C\",\"4D989A\",\"4B9597\",\"499294\",\"478F91\",\"458B8F\",\"43888C\",\n",
+ "\"418589\",\"3F8286\",\"3D7F84\",\"3B7C81\",\"39797E\",\"37767B\",\"357279\",\"336F76\",\"316C73\",\"2F6970\",\"2D666E\",\"2B636B\",\"296068\",\"285D66\",\n",
+ "\"bb93b0\",\"B78FAC\",\"B48CA9\",\"B189A6\",\"AE85A2\",\"AA829F\",\"A77F9C\",\"A47B99\",\"A17895\",\"9E7592\",\"9A718F\",\"976E8C\",\"946B88\",\"916885\",\n",
+ "\"8D6482\",\"8A617F\",\"875E7B\",\"845A78\",\"815775\",\"7D5472\",\"7A506E\",\"774D6B\",\"744A68\",\"714765\",\"de7cbb\",\"DA77B7\",\"D772B3\",\"D46EAF\",\n",
+ "\"D169AB\",\"CE64A8\",\"CB60A4\",\"C85BA0\",\"C4579C\",\"C15298\",\"BE4D95\",\"BB4991\",\"B8448D\",\"B54089\",\"B23B86\",\"AF3682\",\"AB327E\",\"A82D7A\",\n",
+ "\"A52976\",\"A22473\",\"9F1F6F\",\"9C1B6B\",\"991667\",\"961264\",\"000000\",\"000000\",\"000000\",\n",
+ "\"1964EB\",\"1555E4\",\"1147DD\",\"0E39D6\",\"0A2ACF\",\"071CC8\",\"030EC1\",\"0000BA\",\n",
+ "\"0000BA\",\"040464\",\"0000FF\",\"3051cf\",\"000000\",\"000000\",\"000000\",\"000000\",\n",
+ "\"000000\",\"000000\",\"000000\",\"000000\",\"000000\",\"000000\",\"000000\",\"000000\",\n",
+ "\"000000\",\"000000\",\"000000\",\"000000\",\"000000\",\"000000\",\"000000\",\"000000\",\n",
+ "\"547FC4\",\"4D77BA\",\"466FB1\",\"4067A7\",\"395F9E\",\"335895\",\"335896\",\"335897\",\"ff2828\",\"ffffff\",\"d0ffff\",\"ffe0d0\",\"ff7d00\",\"fac800\",\"c86400\",\n",
+ "\"fff000\",\"afcd96\",\"afcd96\",\"64dcdc\",\"00ffff\",\"00ffff\",\"00ffff\",\"111133\",\"000000\"]}\n",
" }\n",
"]\n",
"layers.extend(glad_global_land_cover_change)"
@@ -218,6 +261,7 @@
"metadata": {},
"outputs": [],
"source": [
+ "# Done\n",
"natural_lands_map = [\n",
" {\n",
" \"name\": \"Natural Lands Map\",\n",
@@ -225,10 +269,134 @@
" \"resolution\": 30,\n",
" \"description\": \"The SBTN Natural Lands Map v1 is a 2020 baseline map of natural and non-natural land covers intended for use by companies setting science-based targets for nature, specifically the SBTN Land target #1: no conversion of natural ecosystems. 'Natural' and 'non-natural' definitions were adapted from the Accountability Framework initiative's definition of a natural ecosystem as \\\"one that substantially resembles - in terms of species composition, structure, and ecological function - what would be found in a given area in the absence of major human impacts\\\" and can include managed ecosystems as well as degraded ecosystems that are expected to regenerate either naturally or through management (AFi 2024). The SBTN Natural Lands Map operationalizes this definition by using proxies based on available data that align with AFi guidance to the extent possible.\",\n",
" \"year\": 2020,\n",
- " \"band\": band,\n",
+ " \"band\": \"natural\",\n",
" \"type\": \"Image\",\n",
- " \"metadata\": {},\n",
- " } for band in [\"classification\", \"natural\"]\n",
+ " \"metadata\": {\n",
+ " \"layer_type\": \"categorical\", \n",
+ " \"value_mappings\": [\n",
+ " {\n",
+ " \"value\": 0, \"color_hexcode\": \"#969696\", \"description\": \"Non-natural land\"\n",
+ " }, \n",
+ " {\n",
+ " \"value\": 1, \"color_hexcode\": \"#a8ddb5\", \"description\": \"Natural land\"\n",
+ " }\n",
+ " ]\n",
+ " },\n",
+ " }, \n",
+ " {\n",
+ " \"name\": \"Natural Lands - Classification\",\n",
+ " \"dataset\": \"WRI/SBTN/naturalLands/v1/2020\",\n",
+ " \"resolution\": 30,\n",
+ " \"description\": \"The 'Natural Lands - Classification' layer shows the natural areas labeled by land cover. The SBTN Natural Lands Map v1 is a 2020 baseline map of natural and non-natural land covers intended for use by companies setting science-based targets for nature, specifically the SBTN Land target #1: no conversion of natural ecosystems.\",\n",
+ " \"year\": 2020,\n",
+ " \"band\": \"classification\",\n",
+ " \"type\": \"Image\",\n",
+ " \"metadata\": {\n",
+ " \"layer_type\": \"categorical\", \n",
+ " \"value_mappings\": [\n",
+ " {\n",
+ " \"value\": 2,\n",
+ " \"color_hexcode\": \"#246E24\",\n",
+ " \"description\": \"natural forests\"\n",
+ " },\n",
+ " {\n",
+ " \"value\": 3,\n",
+ " \"color_hexcode\": \"#B9B91E\",\n",
+ " \"description\": \"natural short vegetation\"\n",
+ " },\n",
+ " {\n",
+ " \"value\": 4,\n",
+ " \"color_hexcode\": \"#6BAED6\",\n",
+ " \"description\": \"natural water\"\n",
+ " },\n",
+ " {\n",
+ " \"value\": 5,\n",
+ " \"color_hexcode\": \"#06A285\",\n",
+ " \"description\": \"mangroves\"\n",
+ " },\n",
+ " {\n",
+ " \"value\": 6,\n",
+ " \"color_hexcode\": \"#FEFECC\",\n",
+ " \"description\": \"bare\"\n",
+ " },\n",
+ " {\n",
+ " \"value\": 7,\n",
+ " \"color_hexcode\": \"#ACD1E8\",\n",
+ " \"description\": \"snow\"\n",
+ " },\n",
+ " {\n",
+ " \"value\": 8,\n",
+ " \"color_hexcode\": \"#589558\",\n",
+ " \"description\": \"wet natural forests\"\n",
+ " },\n",
+ " {\n",
+ " \"value\": 9,\n",
+ " \"color_hexcode\": \"#093D09\",\n",
+ " \"description\": \"natural peat forests\"\n",
+ " },\n",
+ " {\n",
+ " \"value\": 10,\n",
+ " \"color_hexcode\": \"#DBDB7B\",\n",
+ " \"description\": \"wet natural short vegetation\"\n",
+ " },\n",
+ " {\n",
+ " \"value\": 11,\n",
+ " \"color_hexcode\": \"#99991A\",\n",
+ " \"description\": \"natural peat short vegetation\"\n",
+ " },\n",
+ " {\n",
+ " \"value\": 12,\n",
+ " \"color_hexcode\": \"#D3D3D3\",\n",
+ " \"description\": \"crop\"\n",
+ " },\n",
+ " {\n",
+ " \"value\": 13,\n",
+ " \"color_hexcode\": \"#D3D3D3\",\n",
+ " \"description\": \"built\"\n",
+ " },\n",
+ " {\n",
+ " \"value\": 14,\n",
+ " \"color_hexcode\": \"#D3D3D3\",\n",
+ " \"description\": \"non-natural tree cover\"\n",
+ " },\n",
+ " {\n",
+ " \"value\": 15,\n",
+ " \"color_hexcode\": \"#D3D3D3\",\n",
+ " \"description\": \"non-natural short vegetation\"\n",
+ " },\n",
+ " {\n",
+ " \"value\": 16,\n",
+ " \"color_hexcode\": \"#D3D3D3\",\n",
+ " \"description\": \"non-natural water\"\n",
+ " },\n",
+ " {\n",
+ " \"value\": 17,\n",
+ " \"color_hexcode\": \"#D3D3D3\",\n",
+ " \"description\": \"wet non-natural tree cover\"\n",
+ " },\n",
+ " {\n",
+ " \"value\": 18,\n",
+ " \"color_hexcode\": \"#D3D3D3\",\n",
+ " \"description\": \"non-natural peat tree cover\"\n",
+ " },\n",
+ " {\n",
+ " \"value\": 19,\n",
+ " \"color_hexcode\": \"#D3D3D3\",\n",
+ " \"description\": \"wet non-natural short vegetation\"\n",
+ " },\n",
+ " {\n",
+ " \"value\": 20,\n",
+ " \"color_hexcode\": \"#D3D3D3\",\n",
+ " \"description\": \"non-natural peat short vegetation\"\n",
+ " },\n",
+ " {\n",
+ " \"value\": 21,\n",
+ " \"color_hexcode\": \"#D3D3D3\",\n",
+ " \"description\": \"non-natural bare\"\n",
+ " }\n",
+ " ]\n",
+ " }\n",
+ " },\n",
"]\n",
"layers.extend(natural_lands_map)"
]
@@ -284,7 +452,13 @@
" {\"value\": 1, \"color_hexcode\": \"#ff9916\", \"description\": \"Cultivated grassland\"},\n",
" {\"value\": 2, \"color_hexcode\": \"#ffcd73\", \"description\": \"Natural/Semi-natural grassland\"}, \n",
" ]\n",
- " }\n",
+ " }, \n",
+ " \"visualization_parameters\":{\n",
+ " \"opacity\":1, \n",
+ " \"min\":1,\n",
+ " \"max\":2,\n",
+ " \"palette\":[\"ff9916\",\"ffcd73\"]\n",
+ " },\n",
" } for year in range(2001, 2023)\n",
"]\n",
"layers.extend(dominant_grasslands)"
@@ -317,6 +491,9 @@
"metadata": {},
"outputs": [],
"source": [
+ "# Done\n",
+ "rgb = lambda r,g,b: '#%02x%02x%02x' % (r,g,b)\n",
+ "\n",
"global_map_of_forest_types = [\n",
" {\n",
" \"name\": \"Global map of forest types 2020\",\n",
@@ -333,7 +510,15 @@
" {\"value\": 10, \"color_hexcode\": \"#006837\", \"description\": \"Primary forest\"},\n",
" {\"value\": 20, \"color_hexcode\": \"#cc6600\", \"description\": \"Planted/Plantation forest\"}, \n",
" ]\n",
- " }\n",
+ " }, \n",
+ " \"visualization_parameters\": {\"min\": 0, \"max\": 20, \"palette\": [\n",
+ " rgb(255, 255, 255), rgb(120, 198, 121), rgb(0, 0, 0), rgb(0, 0, 0),\n",
+ " rgb(0, 0, 0), rgb(0, 0, 0), rgb(0, 0, 0), rgb(0, 0, 0),\n",
+ " rgb(0, 0, 0), rgb(0, 0, 0), rgb(0, 104, 55), rgb(0, 0, 0),\n",
+ " rgb(0, 0, 0), rgb(0, 0, 0), rgb(0, 0, 0), rgb(0, 0, 0),\n",
+ " rgb(0, 0, 0), rgb(0, 0, 0), rgb(0, 0, 0), rgb(0, 0, 0),\n",
+ " rgb(204, 102, 0)\n",
+ " ]}\n",
" }\n",
"]\n",
"layers.extend(global_map_of_forest_types)\n"
@@ -345,6 +530,7 @@
"metadata": {},
"outputs": [],
"source": [
+ "# Done\n",
"dynamic_world_landcover = [\n",
" {\n",
" \"name\": \"Dynamic World\",\n",
@@ -367,7 +553,10 @@
" {\"value\": 7, \"color_hexcode\": \"#a59b8f\", \"description\": \"bare\"}, \n",
" {\"value\": 8, \"color_hexcode\": \"#b39fe1\", \"description\": \"snow_and_ice\"}, \n",
" ] \n",
- " }\n",
+ " }, \n",
+ " \"visualization_parameters\": {\"min\":1, \"max\":8, \"palette\":[\n",
+ " '419bdf', '397d49', '88b053', '7a87c6', 'e49635', 'dfc35a', 'c4281b',\n",
+ " 'a59b8f', 'b39fe1']}\n",
" }\n",
"]\n",
"layers.extend(dynamic_world_landcover)"
@@ -388,7 +577,8 @@
" \"year\": year,\n",
" \"band\": band,\n",
" \"type\": \"ImageCollection\",\n",
- " \"metadata\": {}\n",
+ " \"metadata\":{} , \n",
+ " \"visualization_parameters\": {\"min\":1, \"max\":450, \"palette\": [\"#C6ECAE\",\"#A1D490\",\"#7CB970\",\"#57A751\",\"#348E32\", \"#267A29\",\"#176520\",\"#0C4E15\",\"#07320D\",\"#031807\"]}\n",
" } for year in [2010, 2020] for band in [\"AGB\", \"SD\"]\n",
"]\n",
"layers.extend(global_forest_above_ground_biomass)"
@@ -440,12 +630,12 @@
"metadata": {},
"outputs": [],
"source": [
- "for layer in layers: \n",
- " if not layer.get(\"metadata\"): \n",
- " layer[\"metadata\"] = {}\n",
- " layer[\"metadata\"] = json.dumps(layer[\"metadata\"])\n",
- "\n",
- "layers = [{**layer, \"metadata\": json.dumps(layer[\"metadata\"] if layer.get(\"metadata\") else json.dumps({}))} for layer in layers]"
+ "layers = [{\n",
+ " **layer, \n",
+ " \"metadata\": json.dumps(layer.get(\"metadata\", {})), \n",
+ " \"visualization_parameters\": json.dumps(layer.get(\"visualization_parameters\", {}))\n",
+ " } for layer in layers\n",
+ "]"
]
},
{
@@ -493,6 +683,7 @@
"
band | \n",
" type | \n",
" metadata | \n",
+ " visualization_parameters | \n",
" \n",
" \n",
" \n",
@@ -505,7 +696,8 @@
" 2021 | \n",
" Map | \n",
" ImageCollection | \n",
- " \"{}\" | \n",
+ " {} | \n",
+ " {} | \n",
" \n",
" \n",
" 1 | \n",
@@ -516,7 +708,8 @@
" 2024 | \n",
" label | \n",
" ImageCollection | \n",
- " \"{}\" | \n",
+ " {} | \n",
+ " {} | \n",
"
\n",
" \n",
" 2 | \n",
@@ -527,7 +720,8 @@
" 2018 | \n",
" fnf | \n",
" ImageCollection | \n",
- " \"{}\" | \n",
+ " {} | \n",
+ " {} | \n",
"
\n",
" \n",
" 3 | \n",
@@ -538,7 +732,8 @@
" 2023 | \n",
" LC_Type1 | \n",
" ImageCollection | \n",
- " \"{}\" | \n",
+ " {} | \n",
+ " {} | \n",
"
\n",
" \n",
" 4 | \n",
@@ -549,7 +744,8 @@
" 2021 | \n",
" classification | \n",
" ImageCollection | \n",
- " \"{}\" | \n",
+ " {} | \n",
+ " {} | \n",
"
\n",
" \n",
" ... | \n",
@@ -561,6 +757,7 @@
" ... | \n",
" ... | \n",
" ... | \n",
+ " ... | \n",
"
\n",
" \n",
" 237 | \n",
@@ -571,7 +768,8 @@
" 2020 | \n",
" b1 | \n",
" Image | \n",
- " \"{\\\"units\\\": \\\"Mt\\\", \\\"layer\\\": \\\"production\\\"... | \n",
+ " {\"units\": \"Mt\", \"layer\": \"production\", \"crop_n... | \n",
+ " {} | \n",
"
\n",
" \n",
" 238 | \n",
@@ -582,7 +780,8 @@
" 2020 | \n",
" b1 | \n",
" Image | \n",
- " \"{\\\"units\\\": \\\"Mt\\\", \\\"layer\\\": \\\"production\\\"... | \n",
+ " {\"units\": \"Mt\", \"layer\": \"production\", \"crop_n... | \n",
+ " {} | \n",
"
\n",
" \n",
" 239 | \n",
@@ -593,7 +792,8 @@
" 2020 | \n",
" b1 | \n",
" Image | \n",
- " \"{\\\"units\\\": \\\"Mt\\\", \\\"layer\\\": \\\"production\\\"... | \n",
+ " {\"units\": \"Mt\", \"layer\": \"production\", \"crop_n... | \n",
+ " {} | \n",
"
\n",
" \n",
" 240 | \n",
@@ -604,7 +804,8 @@
" 2020 | \n",
" b1 | \n",
" Image | \n",
- " \"{\\\"units\\\": \\\"Mt\\\", \\\"layer\\\": \\\"production\\\"... | \n",
+ " {\"units\": \"Mt\", \"layer\": \"production\", \"crop_n... | \n",
+ " {} | \n",
"
\n",
" \n",
" 241 | \n",
@@ -615,11 +816,12 @@
" 2020 | \n",
" b1 | \n",
" Image | \n",
- " \"{\\\"units\\\": \\\"Mt\\\", \\\"layer\\\": \\\"production\\\"... | \n",
+ " {\"units\": \"Mt\", \"layer\": \"production\", \"crop_n... | \n",
+ " {} | \n",
"
\n",
" \n",
"\n",
- "242 rows × 8 columns
\n",
+ "242 rows × 9 columns
\n",
""
],
"text/plain": [
@@ -675,20 +877,33 @@
"240 b1 Image \n",
"241 b1 Image \n",
"\n",
- " metadata \n",
- "0 \"{}\" \n",
- "1 \"{}\" \n",
- "2 \"{}\" \n",
- "3 \"{}\" \n",
- "4 \"{}\" \n",
- ".. ... \n",
- "237 \"{\\\"units\\\": \\\"Mt\\\", \\\"layer\\\": \\\"production\\\"... \n",
- "238 \"{\\\"units\\\": \\\"Mt\\\", \\\"layer\\\": \\\"production\\\"... \n",
- "239 \"{\\\"units\\\": \\\"Mt\\\", \\\"layer\\\": \\\"production\\\"... \n",
- "240 \"{\\\"units\\\": \\\"Mt\\\", \\\"layer\\\": \\\"production\\\"... \n",
- "241 \"{\\\"units\\\": \\\"Mt\\\", \\\"layer\\\": \\\"production\\\"... \n",
+ " metadata \\\n",
+ "0 {} \n",
+ "1 {} \n",
+ "2 {} \n",
+ "3 {} \n",
+ "4 {} \n",
+ ".. ... \n",
+ "237 {\"units\": \"Mt\", \"layer\": \"production\", \"crop_n... \n",
+ "238 {\"units\": \"Mt\", \"layer\": \"production\", \"crop_n... \n",
+ "239 {\"units\": \"Mt\", \"layer\": \"production\", \"crop_n... \n",
+ "240 {\"units\": \"Mt\", \"layer\": \"production\", \"crop_n... \n",
+ "241 {\"units\": \"Mt\", \"layer\": \"production\", \"crop_n... \n",
+ "\n",
+ " visualization_parameters \n",
+ "0 {} \n",
+ "1 {} \n",
+ "2 {} \n",
+ "3 {} \n",
+ "4 {} \n",
+ ".. ... \n",
+ "237 {} \n",
+ "238 {} \n",
+ "239 {} \n",
+ "240 {} \n",
+ "241 {} \n",
"\n",
- "[242 rows x 8 columns]"
+ "[242 rows x 9 columns]"
]
},
"execution_count": 18,
@@ -737,6 +952,7 @@
" band | \n",
" type | \n",
" metadata | \n",
+ " visualization_parameters | \n",
" vector | \n",
" \n",
" \n",
@@ -750,7 +966,8 @@
" 2021 | \n",
" Map | \n",
" ImageCollection | \n",
- " \"{}\" | \n",
+ " {} | \n",
+ " {} | \n",
" [0.011387724, -0.001863103, -0.2042005, -0.050... | \n",
" \n",
" \n",
@@ -762,7 +979,8 @@
" 2024 | \n",
" label | \n",
" ImageCollection | \n",
- " \"{}\" | \n",
+ " {} | \n",
+ " {} | \n",
" [0.03720288, -0.009078087, -0.23145294, 0.0087... | \n",
"
\n",
" \n",
@@ -774,7 +992,8 @@
" 2018 | \n",
" fnf | \n",
" ImageCollection | \n",
- " \"{}\" | \n",
+ " {} | \n",
+ " {} | \n",
" [0.045273844, 0.0012465789, -0.17780587, -0.01... | \n",
"
\n",
" \n",
@@ -786,7 +1005,8 @@
" 2023 | \n",
" LC_Type1 | \n",
" ImageCollection | \n",
- " \"{}\" | \n",
+ " {} | \n",
+ " {} | \n",
" [0.03600016, 0.013895035, -0.19835362, -0.0338... | \n",
"
\n",
" \n",
@@ -798,7 +1018,8 @@
" 2021 | \n",
" classification | \n",
" ImageCollection | \n",
- " \"{}\" | \n",
+ " {} | \n",
+ " {} | \n",
" [-0.0036287361, 0.026090976, -0.2038154, 0.007... | \n",
"
\n",
" \n",
@@ -827,12 +1048,12 @@
"3 The Terra and Aqua combined Moderate Resolutio... 500 2023 \n",
"4 The European Space Agency (ESA) WorldCereal 10... 10 2021 \n",
"\n",
- " band type metadata \\\n",
- "0 Map ImageCollection \"{}\" \n",
- "1 label ImageCollection \"{}\" \n",
- "2 fnf ImageCollection \"{}\" \n",
- "3 LC_Type1 ImageCollection \"{}\" \n",
- "4 classification ImageCollection \"{}\" \n",
+ " band type metadata visualization_parameters \\\n",
+ "0 Map ImageCollection {} {} \n",
+ "1 label ImageCollection {} {} \n",
+ "2 fnf ImageCollection {} {} \n",
+ "3 LC_Type1 ImageCollection {} {} \n",
+ "4 classification ImageCollection {} {} \n",
"\n",
" vector \n",
"0 [0.011387724, -0.001863103, -0.2042005, -0.050... \n",
@@ -865,13 +1086,13 @@
"name": "stderr",
"output_type": "stream",
"text": [
- "[2024-12-19T16:20:31Z WARN lance_table::io::commit] Using unsafe commit handler. Concurrent writes may result in data loss. Consider providing a commit handler that prevents conflicting writes.\n"
+ "[2025-01-14T15:03:21Z WARN lance_table::io::commit] Using unsafe commit handler. Concurrent writes may result in data loss. Consider providing a commit handler that prevents conflicting writes.\n"
]
}
],
"source": [
"db = lancedb.connect(\"s3://zeno-static-data/layers-context\")\n",
- "table = db.create_table(\"zeno-layers-context\", mode=\"overwrite\", data=df)"
+ "table = db.create_table(\"zeno-layers-context-v1.1\", mode=\"overwrite\", data=df)"
]
},
{
@@ -917,6 +1138,7 @@
" band | \n",
" type | \n",
" metadata | \n",
+ " visualization_parameters | \n",
" vector | \n",
" _distance | \n",
" \n",
@@ -931,7 +1153,8 @@
" 2006 | \n",
" dominant_class | \n",
" ImageCollection | \n",
- " \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... | \n",
+ " {\"layer_type\": \"categorical\", \"value_mappings\"... | \n",
+ " {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... | \n",
" [0.057723086, 0.0040142275, -0.22560917, 0.000... | \n",
" 0.671497 | \n",
" \n",
@@ -944,7 +1167,8 @@
" 2005 | \n",
" dominant_class | \n",
" ImageCollection | \n",
- " \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... | \n",
+ " {\"layer_type\": \"categorical\", \"value_mappings\"... | \n",
+ " {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... | \n",
" [0.05711652, 0.0043431735, -0.22533567, -0.001... | \n",
" 0.674311 | \n",
" \n",
@@ -957,7 +1181,8 @@
" 2011 | \n",
" dominant_class | \n",
" ImageCollection | \n",
- " \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... | \n",
+ " {\"layer_type\": \"categorical\", \"value_mappings\"... | \n",
+ " {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... | \n",
" [0.05348556, 0.0036516907, -0.22355503, 0.0015... | \n",
" 0.674318 | \n",
" \n",
@@ -970,7 +1195,8 @@
" 2004 | \n",
" dominant_class | \n",
" ImageCollection | \n",
- " \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... | \n",
+ " {\"layer_type\": \"categorical\", \"value_mappings\"... | \n",
+ " {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... | \n",
" [0.05662974, 0.0032411597, -0.22615424, 0.0003... | \n",
" 0.674625 | \n",
" \n",
@@ -983,7 +1209,8 @@
" 2003 | \n",
" dominant_class | \n",
" ImageCollection | \n",
- " \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... | \n",
+ " {\"layer_type\": \"categorical\", \"value_mappings\"... | \n",
+ " {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... | \n",
" [0.05611936, 0.0032223125, -0.22531708, 0.0001... | \n",
" 0.675060 | \n",
" \n",
@@ -996,7 +1223,8 @@
" 2001 | \n",
" dominant_class | \n",
" ImageCollection | \n",
- " \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... | \n",
+ " {\"layer_type\": \"categorical\", \"value_mappings\"... | \n",
+ " {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... | \n",
" [0.055874716, 0.0032470312, -0.22464111, 0.001... | \n",
" 0.675357 | \n",
" \n",
@@ -1009,7 +1237,8 @@
" 2002 | \n",
" dominant_class | \n",
" ImageCollection | \n",
- " \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... | \n",
+ " {\"layer_type\": \"categorical\", \"value_mappings\"... | \n",
+ " {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... | \n",
" [0.055449624, 0.0018201179, -0.22524701, 0.000... | \n",
" 0.675945 | \n",
" \n",
@@ -1022,7 +1251,8 @@
" 2013 | \n",
" dominant_class | \n",
" ImageCollection | \n",
- " \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... | \n",
+ " {\"layer_type\": \"categorical\", \"value_mappings\"... | \n",
+ " {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... | \n",
" [0.051458344, 0.004883893, -0.22452874, 0.0013... | \n",
" 0.677118 | \n",
" \n",
@@ -1035,7 +1265,8 @@
" 2007 | \n",
" dominant_class | \n",
" ImageCollection | \n",
- " \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... | \n",
+ " {\"layer_type\": \"categorical\", \"value_mappings\"... | \n",
+ " {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... | \n",
" [0.057227712, 0.0046041245, -0.22369905, 0.000... | \n",
" 0.677169 | \n",
" \n",
@@ -1048,7 +1279,8 @@
" 2008 | \n",
" dominant_class | \n",
" ImageCollection | \n",
- " \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... | \n",
+ " {\"layer_type\": \"categorical\", \"value_mappings\"... | \n",
+ " {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... | \n",
" [0.055125456, 0.0020664048, -0.22447293, 0.001... | \n",
" 0.677831 | \n",
" \n",
@@ -1061,7 +1293,8 @@
" 2018 | \n",
" dominant_class | \n",
" ImageCollection | \n",
- " \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... | \n",
+ " {\"layer_type\": \"categorical\", \"value_mappings\"... | \n",
+ " {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... | \n",
" [0.05347201, 0.0020619736, -0.22571883, -0.000... | \n",
" 0.678156 | \n",
" \n",
@@ -1074,7 +1307,8 @@
" 2014 | \n",
" dominant_class | \n",
" ImageCollection | \n",
- " \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... | \n",
+ " {\"layer_type\": \"categorical\", \"value_mappings\"... | \n",
+ " {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... | \n",
" [0.052718777, 0.004731725, -0.22522543, -0.001... | \n",
" 0.678202 | \n",
" \n",
@@ -1087,7 +1321,8 @@
" 2010 | \n",
" dominant_class | \n",
" ImageCollection | \n",
- " \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... | \n",
+ " {\"layer_type\": \"categorical\", \"value_mappings\"... | \n",
+ " {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... | \n",
" [0.055251963, 0.004269747, -0.22510484, -0.001... | \n",
" 0.679139 | \n",
" \n",
@@ -1100,7 +1335,8 @@
" 2009 | \n",
" dominant_class | \n",
" ImageCollection | \n",
- " \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... | \n",
+ " {\"layer_type\": \"categorical\", \"value_mappings\"... | \n",
+ " {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... | \n",
" [0.05629859, 0.0049231225, -0.22519985, -0.000... | \n",
" 0.679461 | \n",
" \n",
@@ -1113,7 +1349,8 @@
" 2012 | \n",
" dominant_class | \n",
" ImageCollection | \n",
- " \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... | \n",
+ " {\"layer_type\": \"categorical\", \"value_mappings\"... | \n",
+ " {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... | \n",
" [0.053797204, 0.003474659, -0.22503819, -0.000... | \n",
" 0.679794 | \n",
" \n",
@@ -1126,7 +1363,8 @@
" 2021 | \n",
" dominant_class | \n",
" ImageCollection | \n",
- " \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... | \n",
+ " {\"layer_type\": \"categorical\", \"value_mappings\"... | \n",
+ " {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... | \n",
" [0.052892424, 0.004018473, -0.22422945, 8.2696... | \n",
" 0.679878 | \n",
" \n",
@@ -1139,7 +1377,8 @@
" 2015 | \n",
" dominant_class | \n",
" ImageCollection | \n",
- " \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... | \n",
+ " {\"layer_type\": \"categorical\", \"value_mappings\"... | \n",
+ " {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... | \n",
" [0.053070407, 0.004392163, -0.22446574, -0.003... | \n",
" 0.680043 | \n",
" \n",
@@ -1152,7 +1391,8 @@
" 2022 | \n",
" dominant_class | \n",
" ImageCollection | \n",
- " \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... | \n",
+ " {\"layer_type\": \"categorical\", \"value_mappings\"... | \n",
+ " {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... | \n",
" [0.0532208, 0.002815616, -0.22412607, -0.00199... | \n",
" 0.680654 | \n",
" \n",
@@ -1165,7 +1405,8 @@
" 2017 | \n",
" dominant_class | \n",
" ImageCollection | \n",
- " \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... | \n",
+ " {\"layer_type\": \"categorical\", \"value_mappings\"... | \n",
+ " {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... | \n",
" [0.05388417, 0.0035654795, -0.22717339, -0.002... | \n",
" 0.680844 | \n",
" \n",
@@ -1178,7 +1419,8 @@
" 2016 | \n",
" dominant_class | \n",
" ImageCollection | \n",
- " \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... | \n",
+ " {\"layer_type\": \"categorical\", \"value_mappings\"... | \n",
+ " {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... | \n",
" [0.055234984, 0.0035729045, -0.22603473, -0.00... | \n",
" 0.680939 | \n",
" \n",
@@ -1191,7 +1433,8 @@
" 2019 | \n",
" dominant_class | \n",
" ImageCollection | \n",
- " \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... | \n",
+ " {\"layer_type\": \"categorical\", \"value_mappings\"... | \n",
+ " {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... | \n",
" [0.056566644, 0.0027942855, -0.22534496, -0.00... | \n",
" 0.682095 | \n",
" \n",
@@ -1204,7 +1447,8 @@
" 2020 | \n",
" dominant_class | \n",
" ImageCollection | \n",
- " \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... | \n",
+ " {\"layer_type\": \"categorical\", \"value_mappings\"... | \n",
+ " {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... | \n",
" [0.052811123, 0.003465781, -0.22363867, -0.001... | \n",
" 0.684511 | \n",
" \n",
@@ -1217,7 +1461,8 @@
" 2011 | \n",
" b1 | \n",
" Image | \n",
- " \"{\\\"layer_type\\\": \\\"categorial\\\", \\\"value_mapp... | \n",
+ " {\"layer_type\": \"categorial\", \"value_mappings\":... | \n",
+ " {} | \n",
" [0.06280664, 0.027786024, -0.21150677, -0.0203... | \n",
" 0.845057 | \n",
" \n",
@@ -1230,7 +1475,8 @@
" 2003 | \n",
" b1 | \n",
" Image | \n",
- " \"{\\\"layer_type\\\": \\\"categorial\\\", \\\"value_mapp... | \n",
+ " {\"layer_type\": \"categorial\", \"value_mappings\":... | \n",
+ " {} | \n",
" [0.06432893, 0.027880505, -0.21269685, -0.0241... | \n",
" 0.851481 | \n",
" \n",
@@ -1243,7 +1489,8 @@
" 2007 | \n",
" b1 | \n",
" Image | \n",
- " \"{\\\"layer_type\\\": \\\"categorial\\\", \\\"value_mapp... | \n",
+ " {\"layer_type\": \"categorial\", \"value_mappings\":... | \n",
+ " {} | \n",
" [0.06616405, 0.030537885, -0.21032402, -0.0206... | \n",
" 0.852167 | \n",
" \n",
@@ -1256,7 +1503,8 @@
" 2015 | \n",
" b1 | \n",
" Image | \n",
- " \"{\\\"layer_type\\\": \\\"categorial\\\", \\\"value_mapp... | \n",
+ " {\"layer_type\": \"categorial\", \"value_mappings\":... | \n",
+ " {} | \n",
" [0.060457963, 0.029531527, -0.21025069, -0.025... | \n",
" 0.855041 | \n",
" \n",
@@ -1269,12 +1517,27 @@
" 2019 | \n",
" b1 | \n",
" Image | \n",
- " \"{\\\"layer_type\\\": \\\"categorial\\\", \\\"value_mapp... | \n",
+ " {\"layer_type\": \"categorial\", \"value_mappings\":... | \n",
+ " {} | \n",
" [0.064794786, 0.027768757, -0.21008149, -0.023... | \n",
" 0.859439 | \n",
" \n",
" \n",
" 27 | \n",
+ " Natural Lands - Classification | \n",
+ " WRI/SBTN/naturalLands/v1/2020 | \n",
+ " The 'Natural Lands - Classification' layer sho... | \n",
+ " 30 | \n",
+ " 2020 | \n",
+ " classification | \n",
+ " Image | \n",
+ " {\"layer_type\": \"categorical\", \"value_mappings\"... | \n",
+ " {} | \n",
+ " [0.015649244, 0.0022550165, -0.21761675, -0.01... | \n",
+ " 0.876485 | \n",
+ "
\n",
+ " \n",
+ " 28 | \n",
" Global Cropland Yield and Area (harvest_area:R... | \n",
" users/cgiardata/spam_data/2020/harvest_area/rc... | \n",
" A global dataset providing fine spatial resolu... | \n",
@@ -1282,33 +1545,22 @@
" 2020 | \n",
" b1 | \n",
" Image | \n",
- " \"{\\\"units\\\": \\\"ha\\\", \\\"layer\\\": \\\"harvest_area... | \n",
+ " {\"units\": \"ha\", \"layer\": \"harvest_area\", \"crop... | \n",
+ " {} | \n",
" [0.054469686, 0.026924035, -0.23216055, -0.025... | \n",
" 0.892606 | \n",
"
\n",
" \n",
- " 28 | \n",
- " Global cropland loss (2003-2019) | \n",
- " projects/glad/GLCLU2020/Cropland_loss | \n",
- " Global cropland loss between 2000 and 2019. | \n",
- " 30 | \n",
- " 2003 | \n",
- " b1 | \n",
- " Image | \n",
- " \"{\\\"layer_type\\\": \\\"categorial\\\", \\\"value_mapp... | \n",
- " [0.085900135, -0.015248731, -0.19879405, -0.03... | \n",
- " 0.898142 | \n",
- "
\n",
- " \n",
" 29 | \n",
" Global cropland loss (2003-2019) | \n",
" projects/glad/GLCLU2020/Cropland_loss | \n",
" Global cropland loss between 2000 and 2019. | \n",
" 30 | \n",
- " 2007 | \n",
+ " 2003 | \n",
" b1 | \n",
" Image | \n",
- " \"{\\\"layer_type\\\": \\\"categorial\\\", \\\"value_mapp... | \n",
+ " {\"layer_type\": \"categorial\", \"value_mappings\":... | \n",
+ " {} | \n",
" [0.085900135, -0.015248731, -0.19879405, -0.03... | \n",
" 0.898142 | \n",
"
\n",
@@ -1345,8 +1597,8 @@
"24 Global cropland extent(2003-2019) \n",
"25 Global cropland extent(2003-2019) \n",
"26 Global cropland extent(2003-2019) \n",
- "27 Global Cropland Yield and Area (harvest_area:R... \n",
- "28 Global cropland loss (2003-2019) \n",
+ "27 Natural Lands - Classification \n",
+ "28 Global Cropland Yield and Area (harvest_area:R... \n",
"29 Global cropland loss (2003-2019) \n",
"\n",
" dataset \\\n",
@@ -1377,8 +1629,8 @@
"24 projects/glad/GLCLU2020/Cropland_2007 \n",
"25 projects/glad/GLCLU2020/Cropland_2015 \n",
"26 projects/glad/GLCLU2020/Cropland_2019 \n",
- "27 users/cgiardata/spam_data/2020/harvest_area/rc... \n",
- "28 projects/glad/GLCLU2020/Cropland_loss \n",
+ "27 WRI/SBTN/naturalLands/v1/2020 \n",
+ "28 users/cgiardata/spam_data/2020/harvest_area/rc... \n",
"29 projects/glad/GLCLU2020/Cropland_loss \n",
"\n",
" description resolution year \\\n",
@@ -1409,9 +1661,9 @@
"24 The 2000-2019 globally consistent cropland ext... 30 2007 \n",
"25 The 2000-2019 globally consistent cropland ext... 30 2015 \n",
"26 The 2000-2019 globally consistent cropland ext... 30 2019 \n",
- "27 A global dataset providing fine spatial resolu... 10000 2020 \n",
- "28 Global cropland loss between 2000 and 2019. 30 2003 \n",
- "29 Global cropland loss between 2000 and 2019. 30 2007 \n",
+ "27 The 'Natural Lands - Classification' layer sho... 30 2020 \n",
+ "28 A global dataset providing fine spatial resolu... 10000 2020 \n",
+ "29 Global cropland loss between 2000 and 2019. 30 2003 \n",
"\n",
" band type \\\n",
"0 dominant_class ImageCollection \n",
@@ -1441,41 +1693,73 @@
"24 b1 Image \n",
"25 b1 Image \n",
"26 b1 Image \n",
- "27 b1 Image \n",
+ "27 classification Image \n",
"28 b1 Image \n",
"29 b1 Image \n",
"\n",
" metadata \\\n",
- "0 \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... \n",
- "1 \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... \n",
- "2 \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... \n",
- "3 \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... \n",
- "4 \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... \n",
- "5 \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... \n",
- "6 \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... \n",
- "7 \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... \n",
- "8 \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... \n",
- "9 \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... \n",
- "10 \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... \n",
- "11 \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... \n",
- "12 \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... \n",
- "13 \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... \n",
- "14 \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... \n",
- "15 \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... \n",
- "16 \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... \n",
- "17 \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... \n",
- "18 \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... \n",
- "19 \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... \n",
- "20 \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... \n",
- "21 \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... \n",
- "22 \"{\\\"layer_type\\\": \\\"categorial\\\", \\\"value_mapp... \n",
- "23 \"{\\\"layer_type\\\": \\\"categorial\\\", \\\"value_mapp... \n",
- "24 \"{\\\"layer_type\\\": \\\"categorial\\\", \\\"value_mapp... \n",
- "25 \"{\\\"layer_type\\\": \\\"categorial\\\", \\\"value_mapp... \n",
- "26 \"{\\\"layer_type\\\": \\\"categorial\\\", \\\"value_mapp... \n",
- "27 \"{\\\"units\\\": \\\"ha\\\", \\\"layer\\\": \\\"harvest_area... \n",
- "28 \"{\\\"layer_type\\\": \\\"categorial\\\", \\\"value_mapp... \n",
- "29 \"{\\\"layer_type\\\": \\\"categorial\\\", \\\"value_mapp... \n",
+ "0 {\"layer_type\": \"categorical\", \"value_mappings\"... \n",
+ "1 {\"layer_type\": \"categorical\", \"value_mappings\"... \n",
+ "2 {\"layer_type\": \"categorical\", \"value_mappings\"... \n",
+ "3 {\"layer_type\": \"categorical\", \"value_mappings\"... \n",
+ "4 {\"layer_type\": \"categorical\", \"value_mappings\"... \n",
+ "5 {\"layer_type\": \"categorical\", \"value_mappings\"... \n",
+ "6 {\"layer_type\": \"categorical\", \"value_mappings\"... \n",
+ "7 {\"layer_type\": \"categorical\", \"value_mappings\"... \n",
+ "8 {\"layer_type\": \"categorical\", \"value_mappings\"... \n",
+ "9 {\"layer_type\": \"categorical\", \"value_mappings\"... \n",
+ "10 {\"layer_type\": \"categorical\", \"value_mappings\"... \n",
+ "11 {\"layer_type\": \"categorical\", \"value_mappings\"... \n",
+ "12 {\"layer_type\": \"categorical\", \"value_mappings\"... \n",
+ "13 {\"layer_type\": \"categorical\", \"value_mappings\"... \n",
+ "14 {\"layer_type\": \"categorical\", \"value_mappings\"... \n",
+ "15 {\"layer_type\": \"categorical\", \"value_mappings\"... \n",
+ "16 {\"layer_type\": \"categorical\", \"value_mappings\"... \n",
+ "17 {\"layer_type\": \"categorical\", \"value_mappings\"... \n",
+ "18 {\"layer_type\": \"categorical\", \"value_mappings\"... \n",
+ "19 {\"layer_type\": \"categorical\", \"value_mappings\"... \n",
+ "20 {\"layer_type\": \"categorical\", \"value_mappings\"... \n",
+ "21 {\"layer_type\": \"categorical\", \"value_mappings\"... \n",
+ "22 {\"layer_type\": \"categorial\", \"value_mappings\":... \n",
+ "23 {\"layer_type\": \"categorial\", \"value_mappings\":... \n",
+ "24 {\"layer_type\": \"categorial\", \"value_mappings\":... \n",
+ "25 {\"layer_type\": \"categorial\", \"value_mappings\":... \n",
+ "26 {\"layer_type\": \"categorial\", \"value_mappings\":... \n",
+ "27 {\"layer_type\": \"categorical\", \"value_mappings\"... \n",
+ "28 {\"units\": \"ha\", \"layer\": \"harvest_area\", \"crop... \n",
+ "29 {\"layer_type\": \"categorial\", \"value_mappings\":... \n",
+ "\n",
+ " visualization_parameters \\\n",
+ "0 {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... \n",
+ "1 {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... \n",
+ "2 {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... \n",
+ "3 {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... \n",
+ "4 {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... \n",
+ "5 {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... \n",
+ "6 {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... \n",
+ "7 {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... \n",
+ "8 {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... \n",
+ "9 {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... \n",
+ "10 {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... \n",
+ "11 {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... \n",
+ "12 {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... \n",
+ "13 {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... \n",
+ "14 {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... \n",
+ "15 {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... \n",
+ "16 {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... \n",
+ "17 {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... \n",
+ "18 {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... \n",
+ "19 {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... \n",
+ "20 {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... \n",
+ "21 {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... \n",
+ "22 {} \n",
+ "23 {} \n",
+ "24 {} \n",
+ "25 {} \n",
+ "26 {} \n",
+ "27 {} \n",
+ "28 {} \n",
+ "29 {} \n",
"\n",
" vector _distance \n",
"0 [0.057723086, 0.0040142275, -0.22560917, 0.000... 0.671497 \n",
@@ -1505,8 +1789,8 @@
"24 [0.06616405, 0.030537885, -0.21032402, -0.0206... 0.852167 \n",
"25 [0.060457963, 0.029531527, -0.21025069, -0.025... 0.855041 \n",
"26 [0.064794786, 0.027768757, -0.21008149, -0.023... 0.859439 \n",
- "27 [0.054469686, 0.026924035, -0.23216055, -0.025... 0.892606 \n",
- "28 [0.085900135, -0.015248731, -0.19879405, -0.03... 0.898142 \n",
+ "27 [0.015649244, 0.0022550165, -0.21761675, -0.01... 0.876485 \n",
+ "28 [0.054469686, 0.026924035, -0.23216055, -0.025... 0.892606 \n",
"29 [0.085900135, -0.015248731, -0.19879405, -0.03... 0.898142 "
]
},
@@ -1556,6 +1840,7 @@
" band | \n",
" type | \n",
" metadata | \n",
+ " visualization_parameters | \n",
" vector | \n",
" _distance | \n",
" \n",
@@ -1570,7 +1855,8 @@
" 2006 | \n",
" dominant_class | \n",
" ImageCollection | \n",
- " \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... | \n",
+ " {\"layer_type\": \"categorical\", \"value_mappings\"... | \n",
+ " {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... | \n",
" [0.057723086, 0.0040142275, -0.22560917, 0.000... | \n",
" 0.671497 | \n",
" \n",
@@ -1583,7 +1869,8 @@
" 2005 | \n",
" dominant_class | \n",
" ImageCollection | \n",
- " \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... | \n",
+ " {\"layer_type\": \"categorical\", \"value_mappings\"... | \n",
+ " {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... | \n",
" [0.05711652, 0.0043431735, -0.22533567, -0.001... | \n",
" 0.674311 | \n",
" \n",
@@ -1596,7 +1883,8 @@
" 2011 | \n",
" dominant_class | \n",
" ImageCollection | \n",
- " \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... | \n",
+ " {\"layer_type\": \"categorical\", \"value_mappings\"... | \n",
+ " {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... | \n",
" [0.05348556, 0.0036516907, -0.22355503, 0.0015... | \n",
" 0.674318 | \n",
" \n",
@@ -1609,7 +1897,8 @@
" 2004 | \n",
" dominant_class | \n",
" ImageCollection | \n",
- " \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... | \n",
+ " {\"layer_type\": \"categorical\", \"value_mappings\"... | \n",
+ " {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... | \n",
" [0.05662974, 0.0032411597, -0.22615424, 0.0003... | \n",
" 0.674625 | \n",
" \n",
@@ -1622,7 +1911,8 @@
" 2003 | \n",
" dominant_class | \n",
" ImageCollection | \n",
- " \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... | \n",
+ " {\"layer_type\": \"categorical\", \"value_mappings\"... | \n",
+ " {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... | \n",
" [0.05611936, 0.0032223125, -0.22531708, 0.0001... | \n",
" 0.675060 | \n",
" \n",
@@ -1635,7 +1925,8 @@
" 2001 | \n",
" dominant_class | \n",
" ImageCollection | \n",
- " \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... | \n",
+ " {\"layer_type\": \"categorical\", \"value_mappings\"... | \n",
+ " {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... | \n",
" [0.055874716, 0.0032470312, -0.22464111, 0.001... | \n",
" 0.675357 | \n",
" \n",
@@ -1648,7 +1939,8 @@
" 2002 | \n",
" dominant_class | \n",
" ImageCollection | \n",
- " \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... | \n",
+ " {\"layer_type\": \"categorical\", \"value_mappings\"... | \n",
+ " {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... | \n",
" [0.055449624, 0.0018201179, -0.22524701, 0.000... | \n",
" 0.675945 | \n",
" \n",
@@ -1661,7 +1953,8 @@
" 2013 | \n",
" dominant_class | \n",
" ImageCollection | \n",
- " \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... | \n",
+ " {\"layer_type\": \"categorical\", \"value_mappings\"... | \n",
+ " {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... | \n",
" [0.051458344, 0.004883893, -0.22452874, 0.0013... | \n",
" 0.677118 | \n",
" \n",
@@ -1674,7 +1967,8 @@
" 2007 | \n",
" dominant_class | \n",
" ImageCollection | \n",
- " \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... | \n",
+ " {\"layer_type\": \"categorical\", \"value_mappings\"... | \n",
+ " {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... | \n",
" [0.057227712, 0.0046041245, -0.22369905, 0.000... | \n",
" 0.677169 | \n",
" \n",
@@ -1687,7 +1981,8 @@
" 2008 | \n",
" dominant_class | \n",
" ImageCollection | \n",
- " \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... | \n",
+ " {\"layer_type\": \"categorical\", \"value_mappings\"... | \n",
+ " {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... | \n",
" [0.055125456, 0.0020664048, -0.22447293, 0.001... | \n",
" 0.677831 | \n",
" \n",
@@ -1700,7 +1995,8 @@
" 2018 | \n",
" dominant_class | \n",
" ImageCollection | \n",
- " \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... | \n",
+ " {\"layer_type\": \"categorical\", \"value_mappings\"... | \n",
+ " {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... | \n",
" [0.05347201, 0.0020619736, -0.22571883, -0.000... | \n",
" 0.678156 | \n",
" \n",
@@ -1713,7 +2009,8 @@
" 2014 | \n",
" dominant_class | \n",
" ImageCollection | \n",
- " \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... | \n",
+ " {\"layer_type\": \"categorical\", \"value_mappings\"... | \n",
+ " {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... | \n",
" [0.052718777, 0.004731725, -0.22522543, -0.001... | \n",
" 0.678202 | \n",
" \n",
@@ -1726,7 +2023,8 @@
" 2010 | \n",
" dominant_class | \n",
" ImageCollection | \n",
- " \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... | \n",
+ " {\"layer_type\": \"categorical\", \"value_mappings\"... | \n",
+ " {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... | \n",
" [0.055251963, 0.004269747, -0.22510484, -0.001... | \n",
" 0.679139 | \n",
" \n",
@@ -1739,7 +2037,8 @@
" 2009 | \n",
" dominant_class | \n",
" ImageCollection | \n",
- " \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... | \n",
+ " {\"layer_type\": \"categorical\", \"value_mappings\"... | \n",
+ " {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... | \n",
" [0.05629859, 0.0049231225, -0.22519985, -0.000... | \n",
" 0.679461 | \n",
" \n",
@@ -1752,7 +2051,8 @@
" 2012 | \n",
" dominant_class | \n",
" ImageCollection | \n",
- " \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... | \n",
+ " {\"layer_type\": \"categorical\", \"value_mappings\"... | \n",
+ " {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... | \n",
" [0.053797204, 0.003474659, -0.22503819, -0.000... | \n",
" 0.679794 | \n",
" \n",
@@ -1765,7 +2065,8 @@
" 2021 | \n",
" dominant_class | \n",
" ImageCollection | \n",
- " \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... | \n",
+ " {\"layer_type\": \"categorical\", \"value_mappings\"... | \n",
+ " {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... | \n",
" [0.052892424, 0.004018473, -0.22422945, 8.2696... | \n",
" 0.679878 | \n",
" \n",
@@ -1778,7 +2079,8 @@
" 2015 | \n",
" dominant_class | \n",
" ImageCollection | \n",
- " \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... | \n",
+ " {\"layer_type\": \"categorical\", \"value_mappings\"... | \n",
+ " {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... | \n",
" [0.053070407, 0.004392163, -0.22446574, -0.003... | \n",
" 0.680043 | \n",
" \n",
@@ -1791,7 +2093,8 @@
" 2022 | \n",
" dominant_class | \n",
" ImageCollection | \n",
- " \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... | \n",
+ " {\"layer_type\": \"categorical\", \"value_mappings\"... | \n",
+ " {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... | \n",
" [0.0532208, 0.002815616, -0.22412607, -0.00199... | \n",
" 0.680654 | \n",
" \n",
@@ -1804,7 +2107,8 @@
" 2017 | \n",
" dominant_class | \n",
" ImageCollection | \n",
- " \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... | \n",
+ " {\"layer_type\": \"categorical\", \"value_mappings\"... | \n",
+ " {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... | \n",
" [0.05388417, 0.0035654795, -0.22717339, -0.002... | \n",
" 0.680844 | \n",
" \n",
@@ -1817,7 +2121,8 @@
" 2016 | \n",
" dominant_class | \n",
" ImageCollection | \n",
- " \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... | \n",
+ " {\"layer_type\": \"categorical\", \"value_mappings\"... | \n",
+ " {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... | \n",
" [0.055234984, 0.0035729045, -0.22603473, -0.00... | \n",
" 0.680939 | \n",
" \n",
@@ -1830,7 +2135,8 @@
" 2019 | \n",
" dominant_class | \n",
" ImageCollection | \n",
- " \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... | \n",
+ " {\"layer_type\": \"categorical\", \"value_mappings\"... | \n",
+ " {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... | \n",
" [0.056566644, 0.0027942855, -0.22534496, -0.00... | \n",
" 0.682095 | \n",
" \n",
@@ -1843,38 +2149,79 @@
" 2020 | \n",
" dominant_class | \n",
" ImageCollection | \n",
- " \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... | \n",
+ " {\"layer_type\": \"categorical\", \"value_mappings\"... | \n",
+ " {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... | \n",
" [0.052811123, 0.003465781, -0.22363867, -0.001... | \n",
" 0.684511 | \n",
" \n",
+ " \n",
+ " 22 | \n",
+ " Natural Lands - Classification | \n",
+ " WRI/SBTN/naturalLands/v1/2020 | \n",
+ " The 'Natural Lands - Classification' layer sho... | \n",
+ " 30 | \n",
+ " 2020 | \n",
+ " classification | \n",
+ " Image | \n",
+ " {\"layer_type\": \"categorical\", \"value_mappings\"... | \n",
+ " {} | \n",
+ " [0.015649244, 0.0022550165, -0.21761675, -0.01... | \n",
+ " 0.876485 | \n",
+ "
\n",
" \n",
"\n",
""
],
"text/plain": [
- " name dataset \\\n",
- "0 Dominant Grasslands projects/global-pasture-watch/assets/ggc-30m/v... \n",
- "1 Dominant Grasslands projects/global-pasture-watch/assets/ggc-30m/v... \n",
- "2 Dominant Grasslands projects/global-pasture-watch/assets/ggc-30m/v... \n",
- "3 Dominant Grasslands projects/global-pasture-watch/assets/ggc-30m/v... \n",
- "4 Dominant Grasslands projects/global-pasture-watch/assets/ggc-30m/v... \n",
- "5 Dominant Grasslands projects/global-pasture-watch/assets/ggc-30m/v... \n",
- "6 Dominant Grasslands projects/global-pasture-watch/assets/ggc-30m/v... \n",
- "7 Dominant Grasslands projects/global-pasture-watch/assets/ggc-30m/v... \n",
- "8 Dominant Grasslands projects/global-pasture-watch/assets/ggc-30m/v... \n",
- "9 Dominant Grasslands projects/global-pasture-watch/assets/ggc-30m/v... \n",
- "10 Dominant Grasslands projects/global-pasture-watch/assets/ggc-30m/v... \n",
- "11 Dominant Grasslands projects/global-pasture-watch/assets/ggc-30m/v... \n",
- "12 Dominant Grasslands projects/global-pasture-watch/assets/ggc-30m/v... \n",
- "13 Dominant Grasslands projects/global-pasture-watch/assets/ggc-30m/v... \n",
- "14 Dominant Grasslands projects/global-pasture-watch/assets/ggc-30m/v... \n",
- "15 Dominant Grasslands projects/global-pasture-watch/assets/ggc-30m/v... \n",
- "16 Dominant Grasslands projects/global-pasture-watch/assets/ggc-30m/v... \n",
- "17 Dominant Grasslands projects/global-pasture-watch/assets/ggc-30m/v... \n",
- "18 Dominant Grasslands projects/global-pasture-watch/assets/ggc-30m/v... \n",
- "19 Dominant Grasslands projects/global-pasture-watch/assets/ggc-30m/v... \n",
- "20 Dominant Grasslands projects/global-pasture-watch/assets/ggc-30m/v... \n",
- "21 Dominant Grasslands projects/global-pasture-watch/assets/ggc-30m/v... \n",
+ " name \\\n",
+ "0 Dominant Grasslands \n",
+ "1 Dominant Grasslands \n",
+ "2 Dominant Grasslands \n",
+ "3 Dominant Grasslands \n",
+ "4 Dominant Grasslands \n",
+ "5 Dominant Grasslands \n",
+ "6 Dominant Grasslands \n",
+ "7 Dominant Grasslands \n",
+ "8 Dominant Grasslands \n",
+ "9 Dominant Grasslands \n",
+ "10 Dominant Grasslands \n",
+ "11 Dominant Grasslands \n",
+ "12 Dominant Grasslands \n",
+ "13 Dominant Grasslands \n",
+ "14 Dominant Grasslands \n",
+ "15 Dominant Grasslands \n",
+ "16 Dominant Grasslands \n",
+ "17 Dominant Grasslands \n",
+ "18 Dominant Grasslands \n",
+ "19 Dominant Grasslands \n",
+ "20 Dominant Grasslands \n",
+ "21 Dominant Grasslands \n",
+ "22 Natural Lands - Classification \n",
+ "\n",
+ " dataset \\\n",
+ "0 projects/global-pasture-watch/assets/ggc-30m/v... \n",
+ "1 projects/global-pasture-watch/assets/ggc-30m/v... \n",
+ "2 projects/global-pasture-watch/assets/ggc-30m/v... \n",
+ "3 projects/global-pasture-watch/assets/ggc-30m/v... \n",
+ "4 projects/global-pasture-watch/assets/ggc-30m/v... \n",
+ "5 projects/global-pasture-watch/assets/ggc-30m/v... \n",
+ "6 projects/global-pasture-watch/assets/ggc-30m/v... \n",
+ "7 projects/global-pasture-watch/assets/ggc-30m/v... \n",
+ "8 projects/global-pasture-watch/assets/ggc-30m/v... \n",
+ "9 projects/global-pasture-watch/assets/ggc-30m/v... \n",
+ "10 projects/global-pasture-watch/assets/ggc-30m/v... \n",
+ "11 projects/global-pasture-watch/assets/ggc-30m/v... \n",
+ "12 projects/global-pasture-watch/assets/ggc-30m/v... \n",
+ "13 projects/global-pasture-watch/assets/ggc-30m/v... \n",
+ "14 projects/global-pasture-watch/assets/ggc-30m/v... \n",
+ "15 projects/global-pasture-watch/assets/ggc-30m/v... \n",
+ "16 projects/global-pasture-watch/assets/ggc-30m/v... \n",
+ "17 projects/global-pasture-watch/assets/ggc-30m/v... \n",
+ "18 projects/global-pasture-watch/assets/ggc-30m/v... \n",
+ "19 projects/global-pasture-watch/assets/ggc-30m/v... \n",
+ "20 projects/global-pasture-watch/assets/ggc-30m/v... \n",
+ "21 projects/global-pasture-watch/assets/ggc-30m/v... \n",
+ "22 WRI/SBTN/naturalLands/v1/2020 \n",
"\n",
" description resolution year \\\n",
"0 This dataset provides global annual dominant c... 30 2006 \n",
@@ -1899,6 +2246,7 @@
"19 This dataset provides global annual dominant c... 30 2016 \n",
"20 This dataset provides global annual dominant c... 30 2019 \n",
"21 This dataset provides global annual dominant c... 30 2020 \n",
+ "22 The 'Natural Lands - Classification' layer sho... 30 2020 \n",
"\n",
" band type \\\n",
"0 dominant_class ImageCollection \n",
@@ -1923,30 +2271,57 @@
"19 dominant_class ImageCollection \n",
"20 dominant_class ImageCollection \n",
"21 dominant_class ImageCollection \n",
+ "22 classification Image \n",
"\n",
" metadata \\\n",
- "0 \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... \n",
- "1 \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... \n",
- "2 \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... \n",
- "3 \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... \n",
- "4 \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... \n",
- "5 \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... \n",
- "6 \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... \n",
- "7 \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... \n",
- "8 \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... \n",
- "9 \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... \n",
- "10 \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... \n",
- "11 \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... \n",
- "12 \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... \n",
- "13 \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... \n",
- "14 \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... \n",
- "15 \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... \n",
- "16 \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... \n",
- "17 \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... \n",
- "18 \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... \n",
- "19 \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... \n",
- "20 \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... \n",
- "21 \"{\\\"layer_type\\\": \\\"categorical\\\", \\\"value_map... \n",
+ "0 {\"layer_type\": \"categorical\", \"value_mappings\"... \n",
+ "1 {\"layer_type\": \"categorical\", \"value_mappings\"... \n",
+ "2 {\"layer_type\": \"categorical\", \"value_mappings\"... \n",
+ "3 {\"layer_type\": \"categorical\", \"value_mappings\"... \n",
+ "4 {\"layer_type\": \"categorical\", \"value_mappings\"... \n",
+ "5 {\"layer_type\": \"categorical\", \"value_mappings\"... \n",
+ "6 {\"layer_type\": \"categorical\", \"value_mappings\"... \n",
+ "7 {\"layer_type\": \"categorical\", \"value_mappings\"... \n",
+ "8 {\"layer_type\": \"categorical\", \"value_mappings\"... \n",
+ "9 {\"layer_type\": \"categorical\", \"value_mappings\"... \n",
+ "10 {\"layer_type\": \"categorical\", \"value_mappings\"... \n",
+ "11 {\"layer_type\": \"categorical\", \"value_mappings\"... \n",
+ "12 {\"layer_type\": \"categorical\", \"value_mappings\"... \n",
+ "13 {\"layer_type\": \"categorical\", \"value_mappings\"... \n",
+ "14 {\"layer_type\": \"categorical\", \"value_mappings\"... \n",
+ "15 {\"layer_type\": \"categorical\", \"value_mappings\"... \n",
+ "16 {\"layer_type\": \"categorical\", \"value_mappings\"... \n",
+ "17 {\"layer_type\": \"categorical\", \"value_mappings\"... \n",
+ "18 {\"layer_type\": \"categorical\", \"value_mappings\"... \n",
+ "19 {\"layer_type\": \"categorical\", \"value_mappings\"... \n",
+ "20 {\"layer_type\": \"categorical\", \"value_mappings\"... \n",
+ "21 {\"layer_type\": \"categorical\", \"value_mappings\"... \n",
+ "22 {\"layer_type\": \"categorical\", \"value_mappings\"... \n",
+ "\n",
+ " visualization_parameters \\\n",
+ "0 {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... \n",
+ "1 {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... \n",
+ "2 {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... \n",
+ "3 {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... \n",
+ "4 {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... \n",
+ "5 {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... \n",
+ "6 {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... \n",
+ "7 {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... \n",
+ "8 {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... \n",
+ "9 {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... \n",
+ "10 {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... \n",
+ "11 {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... \n",
+ "12 {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... \n",
+ "13 {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... \n",
+ "14 {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... \n",
+ "15 {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... \n",
+ "16 {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... \n",
+ "17 {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... \n",
+ "18 {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... \n",
+ "19 {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... \n",
+ "20 {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... \n",
+ "21 {\"opacity\": 1, \"min\": 1, \"max\": 2, \"palette\": ... \n",
+ "22 {} \n",
"\n",
" vector _distance \n",
"0 [0.057723086, 0.0040142275, -0.22560917, 0.000... 0.671497 \n",
@@ -1970,7 +2345,8 @@
"18 [0.05388417, 0.0035654795, -0.22717339, -0.002... 0.680844 \n",
"19 [0.055234984, 0.0035729045, -0.22603473, -0.00... 0.680939 \n",
"20 [0.056566644, 0.0027942855, -0.22534496, -0.00... 0.682095 \n",
- "21 [0.052811123, 0.003465781, -0.22363867, -0.001... 0.684511 "
+ "21 [0.052811123, 0.003465781, -0.22363867, -0.001... 0.684511 \n",
+ "22 [0.015649244, 0.0022550165, -0.21761675, -0.01... 0.876485 "
]
},
"execution_count": 23,
diff --git a/zeno/tools/contextlayer/context_layer_retriever_tool.py b/zeno/tools/contextlayer/context_layer_retriever_tool.py
index 18ddecf..373c125 100644
--- a/zeno/tools/contextlayer/context_layer_retriever_tool.py
+++ b/zeno/tools/contextlayer/context_layer_retriever_tool.py
@@ -17,7 +17,7 @@
embedder = OllamaEmbeddings(
model="nomic-embed-text", base_url=os.environ["OLLAMA_BASE_URL"]
)
-table = lancedb.connect("data/layers-context").open_table("zeno-layers-context")
+table = lancedb.connect("data/layers-context").open_table("zeno-layers-context-latest")
# TODO: add reranker?
@@ -53,7 +53,11 @@ class ContextLayerInput(BaseModel):
model = ModelFactory().get("claude-3-5-sonnet-latest").with_structured_output(grade)
-@tool("context-layer-tool", args_schema=ContextLayerInput, response_format="content_and_artifact")
+@tool(
+ "context-layer-tool",
+ args_schema=ContextLayerInput,
+ response_format="content_and_artifact",
+)
def context_layer_tool(question: str) -> dict:
"""
Determines whether the question asks for summarizing by land cover.
@@ -92,6 +96,8 @@ def get_tms_url(result: Series):
image = ee.Image(result.dataset)
# TODO: add dynamic viz parameters
- map_id = image.select(result.band).getMapId()
+ map_id = image.select(result.band).getMapId(
+ visParams=result.visualization_parameters
+ )
return map_id["tile_fetcher"].url_format