{"id":13735249,"url":"https://github.com/stac-utils/stac-table","last_synced_at":"2025-05-08T11:32:40.511Z","repository":{"id":103794266,"uuid":"394302288","full_name":"stac-utils/stac-table","owner":"stac-utils","description":null,"archived":false,"fork":false,"pushed_at":"2024-02-26T04:53:25.000Z","size":219,"stargazers_count":5,"open_issues_count":4,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-08-03T03:04:39.815Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stac-utils.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-09T13:29:18.000Z","updated_at":"2024-08-03T03:04:46.411Z","dependencies_parsed_at":"2023-09-22T15:35:02.054Z","dependency_job_id":"c6375e72-fced-4ead-9e81-f615c1683770","html_url":"https://github.com/stac-utils/stac-table","commit_stats":{"total_commits":57,"total_committers":1,"mean_commits":57.0,"dds":0.0,"last_synced_commit":"99a30be419baa2445ab6d0756629eea079c80972"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stac-utils%2Fstac-table","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stac-utils%2Fstac-table/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stac-utils%2Fstac-table/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stac-utils%2Fstac-table/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stac-utils","download_url":"https://codeload.github.com/stac-utils/stac-table/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224727173,"owners_count":17359532,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T03:01:04.710Z","updated_at":"2024-11-15T03:31:35.892Z","avatar_url":"https://github.com/stac-utils.png","language":"Python","funding_links":[],"categories":["`Python` processing of optical imagery (non deep learning)"],"sub_categories":["Cloud Native Geospatial"],"readme":"# stac-table\n\nThis library generates STAC objects for tabular dataset. It uses the [`table`][table] STAC extension.\n\n## Installation\n\n`stac-table` is only available through GitHub right now:\n\n```\npython -m pip install git+https://github.com/TomAugspurger/stac-table\n```\n\n## Examples\n\nGenerate a STAC item from a Parquet Dataset.\n\n```python\n\u003e\u003e\u003e import datetime, geopandas, pystac, stac_table\n\u003e\u003e\u003e # generate the sample data\n\u003e\u003e\u003e gdf = geopandas.read_file(geopandas.datasets.get_path(\"naturalearth_lowres\"))\n\u003e\u003e\u003e gdf.to_parquet(\"data.parquet\")\n\u003e\u003e\u003e # Create the template Item\n\u003e\u003e\u003e item = pystac.Item(\n...     \"naturalearth_lowres\", geometry=None, bbox=None, datetime=datetime.datetime(2021, 1, 1), properties={}\n... )\n\u003e\u003e\u003e result = stac_table.generate(\"data.parquet\", item)\n\u003e\u003e\u003e result\n\u003cItem id=naturalearth_lowres\u003e\n```\n\nThe new item is updated to include the `table` STAC extension\n\n```python\n\u003e\u003e\u003e result.stac_extensions\n['https://stac-extensions.github.io/table/v1.0.0/schema.json',\n 'https://stac-extensions.github.io/projection/v1.0.0/schema.json']\n```\n\nThe updated fields are available under `properties`.\n\n```python\n\u003e\u003e\u003e result.properties\n{'table:columns': [{'name': 'pop_est', 'type': 'int64'},\n  {'name': 'continent', 'type': 'byte_array'},\n  {'name': 'name', 'type': 'byte_array'},\n  {'name': 'iso_a3', 'type': 'byte_array'},\n  {'name': 'gdp_md_est', 'type': 'double'},\n  {'name': 'geometry', 'type': 'byte_array'}],\n 'proj:epsg': 4326}\n```\n\nFinally, an Asset is added with a link to the  the dataset,\n\n```python\n\u003e\u003e\u003e result.assets[\"data\"].to_dict()\n{'href': 'data.parquet',\n 'type': 'application/x-parquet',\n 'title': 'Dataset root',\n 'roles': ['data']}\n```\n\n`stac_table` will optionally fill in some additional values in your STAC item if you pass the appropriate keywords.\n\n* `infer_bbox`: Sets the item's `bbox` to the bounding box of the union of the geometry column's values. Relies on spatial partitions.\n* `infer_geometry`: Sets the item's `geometry` to the union of the geometry column's values.\n* `infer_datetime`: Sets the item's `properties.datetime` or `properties.start_datetime` and `properties.end_daetime` based on the values in the `datetime_column` column.\n\n[table]: https://github.com/TomAugspurger/table\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstac-utils%2Fstac-table","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstac-utils%2Fstac-table","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstac-utils%2Fstac-table/lists"}