Clay-foundation / model

The Clay Foundation Model (in development)
https://clay-foundation.github.io/model/
Apache License 2.0
299 stars 38 forks source link

Rename embeddings file to include MGRS code and store GeoTIFF source_url #86

Closed weiji14 closed 8 months ago

weiji14 commented 9 months ago

What I am changing

How I did it

TODO in this PR:

TODO in the future:

How you can test it

To load the embeddings from the geoparquet file:

import geopandas as gpd

geodataframe: gpd.GeoDataFrame = gpd.read_parquet(path="32VLM_v01.gpq")
assert geodataframe.shape == (823, 4)  # 823 rows, 4 columns
print(geodataframe)
    source_url                                          date            embeddings                                          geometry
0   s3://clay-tiles-02/02/32VLM/2017-05-19/claytil...   2017-05-19  [-1.0804343, -1.1861055, 0.2579711, -1.1242834...   POLYGON ((5.46822 60.34364, 5.46324 60.38953, ...
1   s3://clay-tiles-02/02/32VLM/2017-05-19/claytil...   2017-05-19  [-1.081955, -1.1901798, 0.2592258, -1.1241777,...   POLYGON ((5.56081 60.34607, 5.55596 60.39196, ...
2   s3://clay-tiles-02/02/32VLM/2017-05-19/claytil...   2017-05-19  [-1.0853468, -1.1995519, 0.26269174, -1.127272...   POLYGON ((5.65341 60.34844, 5.64870 60.39433, ...
3   s3://clay-tiles-02/02/32VLM/2017-05-19/claytil...   2017-05-19  [-1.0773537, -1.1837404, 0.25767463, -1.119480...   POLYGON ((5.74603 60.35074, 5.74145 60.39663, ...
4   s3://clay-tiles-02/02/32VLM/2017-05-19/claytil...   2017-05-19  [-1.0771247, -1.187013, 0.26040226, -1.124507,...   POLYGON ((5.83867 60.35297, 5.83421 60.39887, ...
... ... ... ... ...
818 s3://clay-tiles-02/02/32VLM/2019-08-27/claytil...   2019-08-27  [-1.0937738, -1.1862404, 0.26832822, -1.123034...   POLYGON ((7.18770 59.45848, 7.18524 59.50443, ...
819 s3://clay-tiles-02/02/32VLM/2019-08-27/claytil...   2019-08-27  [-1.0931807, -1.1811237, 0.26974052, -1.117826...   POLYGON ((7.27798 59.45970, 7.27564 59.50566, ...
820 s3://clay-tiles-02/02/32VLM/2019-08-27/claytil...   2019-08-27  [-1.0908315, -1.1857345, 0.26635545, -1.121208...   POLYGON ((7.36827 59.46086, 7.36605 59.50682, ...
821 s3://clay-tiles-02/02/32VLM/2022-11-19/claytil...   2022-11-19  [-1.0904396, -1.2076643, 0.26954767, -1.134142...   POLYGON ((7.24451 60.10306, 7.24206 60.14901, ...
822 s3://clay-tiles-02/02/32VLM/2022-11-19/claytil...   2022-11-19  [-1.0872881, -1.2177591, 0.27005005, -1.140369...   POLYGON ((6.42729 59.95170, 6.42372 59.99763, ...

823 rows × 4 columns

Related Issues

Follow-up to #73, addresses https://github.com/Clay-foundation/model/issues/35#issuecomment-1841585520

weiji14 commented 8 months ago

Gonna merge this in first, and work on integrating with the new model (#47) next.