{"id":22301796,"url":"https://github.com/renardeinside/terrametria","last_synced_at":"2026-03-05T02:03:12.337Z","repository":{"id":266064121,"uuid":"883414435","full_name":"renardeinside/terrametria","owner":"renardeinside","description":"Source code 3D population density map of Germany, with ETL and app logic on top the Databricks Platform.","archived":false,"fork":false,"pushed_at":"2025-06-10T20:45:12.000Z","size":2111,"stargazers_count":12,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-29T03:55:22.155Z","etag":null,"topics":["databricks","deckgl","python","react","spark"],"latest_commit_sha":null,"homepage":"https://www.linkedin.com/pulse/building-data-applications-databricks-apps-ivan-trusov-6pjwf/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/renardeinside.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2024-11-04T23:26:43.000Z","updated_at":"2025-06-25T13:16:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"1379de8c-ec43-4ab7-8a71-a393bb267dc3","html_url":"https://github.com/renardeinside/terrametria","commit_stats":null,"previous_names":["renardeinside/terrametria"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/renardeinside/terrametria","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renardeinside%2Fterrametria","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renardeinside%2Fterrametria/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renardeinside%2Fterrametria/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renardeinside%2Fterrametria/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/renardeinside","download_url":"https://codeload.github.com/renardeinside/terrametria/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renardeinside%2Fterrametria/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30106153,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T01:39:18.192Z","status":"online","status_checked_at":"2026-03-05T02:00:06.710Z","response_time":93,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["databricks","deckgl","python","react","spark"],"created_at":"2024-12-03T18:31:09.138Z","updated_at":"2026-03-05T02:03:12.330Z","avatar_url":"https://github.com/renardeinside.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Terrametria - 3D population density map\n\nThis project shows an example of interactive 3d density map, with data processed by Databricks and deployed as a Databricks App.\n\n\u003e Source data loaded from HDX (Humanitarian Data Exchange) and is provided by Meta.\nPlease read more about the data [here](https://dataforgood.facebook.com/dfg/docs/high-resolution-population-density-maps-demographic-estimates-documentation).\n\n## Local development\n\nPrerequisites:\n- Python 3.9+\n- Hatch\n- Node.js 20.0+\n- Databricks CLI\n- Databricks workspace\n\nSteps:\n1. Clone the repository\n2. Setup the Python env for backend:\n```\nhatch env create\n```\n3. Setup frontend:\n```\nyarn --cwd src/frontend install\n```\n\nFirst, deploy and run the workflow:\n```bash\ndatabricks bundle deploy --var=\"catalog=main\" --var=\"schema=terrametria\"\ndatabricks bundle run terrametria\n```\n\nNote the catalog and schema name. You will need it to run the app. Grant access to this catalog and schema to the principal that you will use to run the app.\n\nThen, configure your environment variables in `.env` file:\n```bash\n# client/secret id for a principal that has access to the catalog and schema\nDATABRICKS_CLIENT_ID=\nDATABRICKS_CLIENT_SECRET=\n# Databricks workspace URL, without HTTP/HTTPS prefix\nDATABRICKS_HOST=\nDATABRICKS_SQL_WAREHOUSE_ID=\n# catalog and schema name from the previous step\nTERRAMETRIA_CATALOG=\nTERRAMETRIA_SCHEMA=\n```\n\nNow open 2 terminals and run the following commands:\n\n```bash\n# Terminal 1\n\u003e hatch run dev-frontend\n# Terminal 2\n\u003e hatch run dev-backend\n```\n\nGo to [`http://localhost:5173`](http://localhost:5173/) to see the app in action.\n\n## App deployment \n\nTo deploy the app, you need to have a Databricks workspace and a service principal with access to the catalog and schema that you created in the previous step.\nYou can deploy the app using the following command:\n\n```bash\ndatabricks bundle deploy --var=\"catalog=\u003ccatalog\u003e\" --var=\"schema=\u003cschema\u003e\" --var=\"sql_warehouse=\u003cSQL_WAREHOUSE_ID\u003e\"\ndatabricks bundle run terrametria-app \\\n  --var=\"catalog=\u003ccatalog\u003e\"\\\n  --var=\"schema=\u003cschema\u003e\"\\\n  --var=\"sql_warehouse=\u003cSQL_WAREHOUSE_ID\u003e\"\n```\n\n\nDuring the App deployment, another service principal will be created. Make sure to grant access to the catalog and schema to this principal.\nAfter the app deployment, add a SQL warehouse to the app resources via UI. Give it a key `sql_warehouse`. The value should be the ID of the SQL warehouse that you want to use for the app.\n\n\n## Example \n\n![Terrametria](./assets/map_view.png)\n\n## Tech used\n\n- Frontend:\n  - [React](https://react.dev/)\n  - [TypeScript](https://www.typescriptlang.org/)\n  - [Vite](https://vite.dev/)\n  - [Deck.gl](https://deck.gl/)\n  - [shadcn/ui](https://ui.shadcn.com/)\n- Backend:\n  - [FastAPI](https://fastapi.tiangolo.com/)\n  - [Databricks Apps](https://docs.databricks.com/en/dev-tools/databricks-apps/index.html)\n  - [Databricks SQL](https://www.databricks.com/product/databricks-sql)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frenardeinside%2Fterrametria","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frenardeinside%2Fterrametria","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frenardeinside%2Fterrametria/lists"}