{"id":33141213,"url":"https://github.com/microsoft/PlanetaryComputerDataCatalog","last_synced_at":"2025-11-15T17:00:45.507Z","repository":{"id":37796900,"uuid":"317402028","full_name":"microsoft/PlanetaryComputerDataCatalog","owner":"microsoft","description":"Data catalog for the Microsoft Planetary Computer","archived":false,"fork":false,"pushed_at":"2025-07-31T17:53:56.000Z","size":112383,"stargazers_count":43,"open_issues_count":20,"forks_count":19,"subscribers_count":6,"default_branch":"develop","last_synced_at":"2025-10-28T16:36:12.086Z","etag":null,"topics":["aiforearth"],"latest_commit_sha":null,"homepage":"https://planetarycomputer.microsoft.com","language":"TypeScript","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/microsoft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":"SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-12-01T02:26:24.000Z","updated_at":"2025-09-30T22:31:48.000Z","dependencies_parsed_at":"2023-09-21T19:28:28.224Z","dependency_job_id":"7432bcc3-e084-4998-830c-6cea50937410","html_url":"https://github.com/microsoft/PlanetaryComputerDataCatalog","commit_stats":{"total_commits":923,"total_committers":21,"mean_commits":43.95238095238095,"dds":"0.33152762730227514","last_synced_commit":"e67b045f21f5822aa0a6a82dd135c4794bedd897"},"previous_names":[],"tags_count":67,"template":false,"template_full_name":null,"purl":"pkg:github/microsoft/PlanetaryComputerDataCatalog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2FPlanetaryComputerDataCatalog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2FPlanetaryComputerDataCatalog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2FPlanetaryComputerDataCatalog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2FPlanetaryComputerDataCatalog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/microsoft","download_url":"https://codeload.github.com/microsoft/PlanetaryComputerDataCatalog/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2FPlanetaryComputerDataCatalog/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":284589138,"owners_count":27031019,"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","status":"online","status_checked_at":"2025-11-15T02:00:06.050Z","response_time":57,"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":["aiforearth"],"created_at":"2025-11-15T12:00:43.109Z","updated_at":"2025-11-15T17:00:45.501Z","avatar_url":"https://github.com/microsoft.png","language":"TypeScript","funding_links":[],"categories":["Planetary Computer","Sustainable Development"],"sub_categories":["Testing your code","Data Catalogs and Interfaces"],"readme":"# Planetary Computer Data Catalog\n\nNote: This repository serves as a reference implementation for interacting with\nPlanetary Computer APIs on Azure. Ths code supports the production deployment of\nthe Planetary Computer Data Catalog and Explorer applications. This repository\nis not meant to be reusable in other situations without significant\nmodification, and the repository maintainers cannot provide any support for\nnon-development deployments of this code. Additionally, this application is under\nconstant development, including some significant planned refactors.\n\nThat said, it is hoped that components or examples contained here will be\nhelpful for users developing applications using the open-source components also\nused by the Planetary Computer, or against Planetary Computer APIs themselves.\nPlease review the [terms of use](https://planetarycomputer.microsoft.com/terms).\n\nTo file general issues or ask questions, please visit the [Planetary Computer\nrepository](https://github.com/microsoft/PlanetaryComputer).\n\n## Data Catalog\n\nA homepage, data catalog, and visualizations for the Planetary Computer.\n\n## Requirements\n\n- Docker\n- docker-compose\n\n## Getting started\n\nThe entire development environment is created as part of a multi-container docker-compose setup. To\nfetch and build the images, run:\n\n```sh\n./scripts/update\n\n```\n\nNow you can start the development server, and the site should be accessible at \u003chttp://localhost:4280\u003e.\n\n```sh\n./scripts/server\n```\n\nIf you want to run just the frontend development server on your host, ensure you have Node 14 installed and run:\n\n```sh\nnpm install\nnpm start\n```\n\nTo build the latest docs or external notebook, or if any new dependencies have been added, re-run `./scripts/update` (you may need to refresh the app in your browser if the site was running).\n\n### Developing\n\nThere are four main components to the application:\n\n1. [etl](etl/README.md) - downloads and processes external files to be included in the application build\n2. [docs](docs/README.md) - a [sphinx](https://www.sphinx-doc.org/en/master/)-powered, markdown based documentation system\n3. [api](api/README.md) - an Azure Function app that provides a lightweight backend\n4. src - the main React application, bootstrapped from [Create React App](https://create-react-app.dev/)\n\n#### Frontend development\n\nFirst, copy `.env.sample` file to `.env`, and ensure the configuration values are set.\n\n| Name | Value | Description |\n|------|-------|-------------|\n|`REACT_APP_API_ROOT`| \u003chttps://planetarycomputer-staging.microsoft.com\u003e | The root URL for the STAC API, either prod, staging or a local instance using \u003chttp://localhost:8080/stac\u003e. If the URL ends in 'stac', this is a special case that is handled by replacing 'stac' with the target service, e.g. 'data' or 'sas'\n|`REACT_APP_TILER_ROOT`| Optional | The root URL for the data tiler API, if not hosted from the domain of the STAC API.\n|`REACT_APP_IMAGE_API_ROOT`| PC APIs pcfunc endpoint | The root URL for the image data API for animations.  For a local instance use \u003chttp://localhost:8080/f\u003e.\n|`REACT_APP_AZMAPS_CLIENT_ID`| Retrieve from Azure Portal | The Client ID used to authenticate against Azure Maps.\n|`REACT_APP_ONEDS_TENANT_KEY`| Lookup at \u003chttps://1dswhitelisting.azurewebsites.net/\u003e | Telemetry key (not needed for dev)\n|`REACT_APP_AUTH_URL`| Optional. URL to root pc-session-api instance | Used to enable login work.\n\nRun `./scripts/server --api` to launch a development server with a local Azure Functions host running.\n\n#### Azure Maps\n\nIn the local development setups, the Azure Maps token is generated using the local developer identity. Be sure to\n`az login` and `az account set --subscription \"Planetary Computer\"` to ensure the correct token is generated. Your identity\nwill also need the \"Azure Maps Search and Render Data Reader\" permission, which can be set with:\n\n```sh\nUSER_NAME=$(az account show --query user.name -o tsv)\naz role assignment create \\\n    --assignee \"$USER_NAME\" \\\n    --role \"Azure Maps Search and Render Data Reader\" \\\n    --scope \"/subscriptions/9da7523a-cb61-4c3e-b1d4-afa5fc6d2da9/resourceGroups/pc-datacatalog-rg/providers/Microsoft.Maps/accounts/pc-datacatalog-azmaps\" \\\n    --subscription \"Planetary Computer\"\n```\n\nNote, you may need to assign this role via an identity that has JIT admin privileges enabled against the Planetary Computer subscription.\n\n#### Developing against local STAC assets\n\nThe `REACT_APP_API_ROOT` can be set to a local instance of the Metadata API if you are\nprototyping changes to collections, e.g., \u003chttp://localhost:8080/stac\u003e. However, as a shortcut, you can also run the\n`./scripts/mockstac` script in order to locally serve a static json file from\n`/mockstac/collections`. Simply alter the contents of the JSON file as you need,\nand set your `REACT_APP_API_ROOT` value to `http://localhost:8866` and restart\nyour dev server.\n\n#### Feature flags\n\nA simple feature flag system is included in the application. To add a flagged feature during development:\n\n1. Wrap the component to be shown or hidden with a `Feature` component, providing a `name`.\n2. In `/utils/featureFlags.js` add an object to the list with `name`, `description`, and `active` (`bool`)\n3. Use the script in `/extra/ff-bookmarklet.js` to toggle features on a running site\n   1. Use a JS minifier like \u003chttps://javascript-minifier.com/\u003e to minimize the file\n   2. Add a new bookmark, and paste the minified JS as the URL. You'll likely need add the `javascript:` label back to the front of the screen.\n4. Toggle feature flags on or off. Be sure that the site works in both states.\n5. Remove the `Feature` component and the flag entry when the feature is mature enough to be included.\n\n#### API development\n\nTo debug or extend the small API backend, please read the [API README](api/README.md).\n\n#### Testing and linting\n\nThe project contains cypress end-to-end tests and jest based unit tests.\n\nTo run jest based unit test and perform linting and code format analysis, run `./scripts/test`.\n\n#### Formatting\n\nThe project contains a prettier config file that is used to format code, which\nshould integrate with your editor.  Alternatively you can run `./scripts/format`\nto format all files. The CI system will check for formatting errors.\n\n##### Cypress\n\nIf you're on WSL2, be sure to set up your system to run the Cypress GUI:\n\u003chttps://wilcovanes.ch/articles/setting-up-the-cypress-gui-in-wsl2-ubuntu-for-windows-10/\u003e\n\nYou may also need to install cypress locally on your computer, with `npm install cypress` and `./node_modules/.bin/cypress install`.\n\n- Install Google Chrome in your WSL2 environment (Cypress ships with a chromium-based electron browser)\n- Run `npm run cypress:open` to run the GUI and debug tests, or\n- Run `npm run cypress:run` to run the headless version in the terminal\n\nBoth test suites are run from CI.\n\nNote- the cypress tests currently involve the sentinel-2-l2a collection, but running the backend locally only comes out of the box with naip, so the tests will fail.\n\n## Ports\n\n| Service                  | Port |\n|--------------------------|------|\n| Webpack Dev Server       | 3000 |\n| Functions App Dev Server | 7071 |\n| Mock STAC API Server     | 8866 |\n\n## Scripts\n\n| Name    | Description                                                      |\n|---------|------------------------------------------------------------------|\n| `clean` | Removes intermediate build files from docs and dataset codefiles |\n| `format`   | Runs black and prettier against Python and Java/TypeScript files\n| `mockstac` | Serves contents of `/mockstac/collections` at \u003chttp://localhost:8866\u003e                                          |\n| `server`   | Runs frontend development server                                                                               |\n| `test`     | Runs unit tests and linter                                                                                     |\n| `update`   | Install dependencies and build etl and docs content. Use `--devdocs` to develop against a local notebook repo. |\n| `npm *`    | Run configured `npm` commands like `npm add`, `npm lint`, `npm test`, etc                                      |\n\n## Deploying\n\nThere are 3 Azure Static Web App services enabled, for staging, test and\nproduction. They are configured via [the GitHub workflow\nfiles](.github/workflows). Generally, merging to deployment branches will\ninitiate a build and deploy with the service framework:\n\n- `develop`: Deploys to staging and test (`pc-datacatalog`, `pc-datacatalog-test`)\n- `main`: Deploys to production (`pc-datacatalog-production`)\n\nOpening a PR against either branch will also create an ephemeral staging environment, and a site link will be added to the PR comment section.\n\nThe release process can be managed with git flow, initialized with the default settings. To bring forth a production release, pull local `develop` and `main` to latest, and follow these steps:\n\n- Identify the latest release\n\nUse [CalVer](https://calver.org/) versioning.\nIf the latest release is `2024.2.3` then the next release will be `2024.2.4` if it's still february, otherwise `2024.3.1` or whatever month/year it happens to be when you are runnign releases.\n\n```bash\ngit tag | sort\n```\n\n- Start a release\n\n```bash\ngit flow release start X.Y.Z\n```\n\n- Bump the version number in `package.json` and check it in\n\n```bash\ngit status # check staging area is clean\ngit add package.json\ngit commit -m \"X.Y.Z\"\n```\n\n- Publish the release\n\n```bash\ngit flow release publish X.Y.Z\n```\n\n- Finish and push the release branch\n  - When prompted, keep default commit messages\n  - Use `X.Y.Z` as the tag message\n\n```bash\ngit flow release finish -p X.Y.Z\n```\n\n## Contributing\n\nThis project welcomes contributions and suggestions. Most contributions require you to agree to a\nContributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us\nthe rights to use your contribution. For details, visit \u003chttps://cla.opensource.microsoft.com\u003e.\n\nWhen you submit a pull request, a CLA bot will automatically determine whether you need to provide\na CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions\nprovided by the bot. You will only need to do this once across all repos using our CLA.\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).\nFor more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or\ncontact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\n\n## Trademarks\n\nThis project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft\ntrademarks or logos is subject to and must follow\n[Microsoft's Trademark \u0026 Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general).\nUse of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.\nAny use of third-party trademarks or logos are subject to those third-party's policies.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrosoft%2FPlanetaryComputerDataCatalog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmicrosoft%2FPlanetaryComputerDataCatalog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrosoft%2FPlanetaryComputerDataCatalog/lists"}