Planetary Computer Data Catalog
Combines a multi-petabyte catalog of global environmental data with intuitive APIs and a flexible scientific environment.
https://github.com/microsoft/PlanetaryComputerDataCatalog
Category: Sustainable Development
Sub Category: Data Catalogs and Interfaces
Keywords
aiforearth
Keywords from Contributors
measurement transformer observability web-map archiving geojson earth-observation conversation stac 3d-map
Last synced: about 6 hours ago
JSON representation
Repository metadata
Data catalog for the Microsoft Planetary Computer
- Host: GitHub
- URL: https://github.com/microsoft/PlanetaryComputerDataCatalog
- Owner: microsoft
- License: mit
- Created: 2020-12-01T02:26:24.000Z (over 4 years ago)
- Default Branch: develop
- Last Pushed: 2025-04-16T17:57:25.000Z (14 days ago)
- Last Synced: 2025-04-17T02:36:08.397Z (14 days ago)
- Topics: aiforearth
- Language: TypeScript
- Homepage: https://planetarycomputer.microsoft.com
- Size: 107 MB
- Stars: 43
- Watchers: 9
- Forks: 17
- Open Issues: 17
- Releases: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
- Support: SUPPORT.md
README.md
Planetary Computer Data Catalog
Note: This repository serves as a reference implementation for interacting with
Planetary Computer APIs on Azure. Ths code supports the production deployment of
the Planetary Computer Data Catalog and Explorer applications. This repository
is not meant to be reusable in other situations without significant
modification, and the repository maintainers cannot provide any support for
non-development deployments of this code. Additionally, this application is under
constant development, including some significant planned refactors.
That said, it is hoped that components or examples contained here will be
helpful for users developing applications using the open-source components also
used by the Planetary Computer, or against Planetary Computer APIs themselves.
Please review the terms of use.
To file general issues or ask questions, please visit the Planetary Computer
repository.
Data Catalog
A homepage, data catalog, and visualizations for the Planetary Computer.
Requirements
- Docker
- docker-compose
Getting started
The entire development environment is created as part of a multi-container docker-compose setup. To
fetch and build the images, run:
./scripts/update
Now you can start the development server, and the site should be accessible at http://localhost:4280.
./scripts/server
If you want to run just the frontend development server on your host, ensure you have Node 14 installed and run:
npm install
npm start
To 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).
Developing
There are four main components to the application:
- etl - downloads and processes external files to be included in the application build
- docs - a sphinx-powered, markdown based documentation system
- api - an Azure Function app that provides a lightweight backend
- src - the main React application, bootstrapped from Create React App
Frontend development
First, copy .env.sample
file to .env
, and ensure the configuration values are set.
Name | Value | Description |
---|---|---|
REACT_APP_API_ROOT |
https://planetarycomputer-staging.microsoft.com | The root URL for the STAC API, either prod, staging or a local instance using http://localhost:8080/stac. 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' |
REACT_APP_TILER_ROOT |
Optional | The root URL for the data tiler API, if not hosted from the domain of the STAC API. |
REACT_APP_IMAGE_API_ROOT |
PC APIs pcfunc endpoint | The root URL for the image data API for animations. For a local instance use http://localhost:8080/f. |
REACT_APP_AZMAPS_CLIENT_ID |
Retrieve from Azure Portal | The Client ID used to authenticate against Azure Maps. |
REACT_APP_ONEDS_TENANT_KEY |
Lookup at https://1dswhitelisting.azurewebsites.net/ | Telemetry key (not needed for dev) |
REACT_APP_AUTH_URL |
Optional. URL to root pc-session-api instance | Used to enable login work. |
Run ./scripts/server --api
to launch a development server with a local Azure Functions host running.
Azure Maps
In the local development setups, the Azure Maps token is generated using the local developer identity. Be sure to
az login
and az account set --subscription "Planetary Computer"
to ensure the correct token is generated. Your identity
will also need the "Azure Maps Search and Render Data Reader" permission, which can be set with:
USER_NAME=$(az account show --query user.name -o tsv)
az role assignment create \
--assignee "$USER_NAME" \
--role "Azure Maps Search and Render Data Reader" \
--scope "/subscriptions/9da7523a-cb61-4c3e-b1d4-afa5fc6d2da9/resourceGroups/pc-datacatalog-rg/providers/Microsoft.Maps/accounts/pc-datacatalog-azmaps" \
--subscription "Planetary Computer"
Note, you may need to assign this role via an identity that has JIT admin privileges enabled against the Planetary Computer subscription.
Developing against local STAC assets
The REACT_APP_API_ROOT
can be set to a local instance of the Metadata API if you are
prototyping changes to collections, e.g., http://localhost:8080/stac. However, as a shortcut, you can also run the
./scripts/mockstac
script in order to locally serve a static json file from
/mockstac/collections
. Simply alter the contents of the JSON file as you need,
and set your REACT_APP_API_ROOT
value to http://localhost:8866
and restart
your dev server.
Feature flags
A simple feature flag system is included in the application. To add a flagged feature during development:
- Wrap the component to be shown or hidden with a
Feature
component, providing aname
. - In
/utils/featureFlags.js
add an object to the list withname
,description
, andactive
(bool
) - Use the script in
/extra/ff-bookmarklet.js
to toggle features on a running site- Use a JS minifier like https://javascript-minifier.com/ to minimize the file
- 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.
- Toggle feature flags on or off. Be sure that the site works in both states.
- Remove the
Feature
component and the flag entry when the feature is mature enough to be included.
API development
To debug or extend the small API backend, please read the API README.
Testing and linting
The project contains cypress end-to-end tests and jest based unit tests.
To run jest based unit test and perform linting and code format analysis, run ./scripts/test
.
Formatting
The project contains a prettier config file that is used to format code, which
should integrate with your editor. Alternatively you can run ./scripts/format
to format all files. The CI system will check for formatting errors.
Cypress
If you're on WSL2, be sure to set up your system to run the Cypress GUI:
https://wilcovanes.ch/articles/setting-up-the-cypress-gui-in-wsl2-ubuntu-for-windows-10/
You may also need to install cypress locally on your computer, with npm install cypress
and ./node_modules/.bin/cypress install
.
- Install Google Chrome in your WSL2 environment (Cypress ships with a chromium-based electron browser)
- Run
npm run cypress:open
to run the GUI and debug tests, or - Run
npm run cypress:run
to run the headless version in the terminal
Both test suites are run from CI.
Note- 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.
Ports
Service | Port |
---|---|
Webpack Dev Server | 3000 |
Functions App Dev Server | 7071 |
Mock STAC API Server | 8866 |
Scripts
Name | Description |
---|---|
clean |
Removes intermediate build files from docs and dataset codefiles |
format |
Runs black and prettier against Python and Java/TypeScript files |
mockstac |
Serves contents of /mockstac/collections at http://localhost:8866 |
server |
Runs frontend development server |
test |
Runs unit tests and linter |
update |
Install dependencies and build etl and docs content. Use --devdocs to develop against a local notebook repo. |
npm * |
Run configured npm commands like npm add , npm lint , npm test , etc |
Deploying
There are 3 Azure Static Web App services enabled, for staging, test and
production. They are configured via the GitHub workflow
files. Generally, merging to deployment branches will
initiate a build and deploy with the service framework:
develop
: Deploys to staging and test (pc-datacatalog
,pc-datacatalog-test
)main
: Deploys to production (pc-datacatalog-production
)
Opening a PR against either branch will also create an ephemeral staging environment, and a site link will be added to the PR comment section.
The 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:
- Identify the latest release
Use CalVer versioning.
If 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.
git tag | sort
- Start a release
git flow release start X.Y.Z
- Bump the version number in
package.json
and check it in
git status # check staging area is clean
git add package.json
git commit -m "X.Y.Z"
- Publish the release
git flow release publish X.Y.Z
- Finish and push the release branch
- When prompted, keep default commit messages
- Use
X.Y.Z
as the tag message
git flow release finish -p X.Y.Z
Contributing
This project welcomes contributions and suggestions. Most contributions require you to agree to a
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
When you submit a pull request, a CLA bot will automatically determine whether you need to provide
a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions
provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct.
For more information see the Code of Conduct FAQ or
contact opencode@microsoft.com with any additional questions or comments.
Trademarks
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft
trademarks or logos is subject to and must follow
Microsoft's Trademark & Brand Guidelines.
Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.
Any use of third-party trademarks or logos are subject to those third-party's policies.
Owner metadata
- Name: Microsoft
- Login: microsoft
- Email: opensource@microsoft.com
- Kind: organization
- Description: Open source projects and samples from Microsoft
- Website: https://opensource.microsoft.com
- Location: Redmond, WA
- Twitter: OpenAtMicrosoft
- Company:
- Icon url: https://avatars.githubusercontent.com/u/6154722?v=4
- Repositories: 6995
- Last ynced at: 2025-04-30T12:40:42.773Z
- Profile URL: https://github.com/microsoft
GitHub Events
Total
- Issues event: 5
- Watch event: 6
- Delete event: 24
- Issue comment event: 34
- Push event: 33
- Pull request review comment event: 1
- Pull request event: 39
- Pull request review event: 6
- Fork event: 3
- Create event: 30
Last Year
- Issues event: 5
- Watch event: 6
- Delete event: 24
- Issue comment event: 34
- Push event: 33
- Pull request review comment event: 1
- Pull request event: 39
- Pull request review event: 6
- Fork event: 3
- Create event: 30
Committers metadata
Last synced: 8 days ago
Total Commits: 929
Total Committers: 21
Avg Commits per committer: 44.238
Development Distribution Score (DDS): 0.336
Commits in past year: 34
Committers in past year: 5
Avg Commits per committer in past year: 6.8
Development Distribution Score (DDS) in past year: 0.676
Name | Commits | |
---|---|---|
Matt McFarland | m****d@m****m | 617 |
Tom Augspurger | t****r@m****m | 148 |
Rob Emanuele | r****e@g****m | 37 |
Preston Hartzell | p****l@g****m | 31 |
Dan Morris | d****n@m****m | 16 |
Gustavo Hidalgo | z****o@g****m | 13 |
Jeff Frankl | j****l@a****m | 12 |
Manish Kumar Gupta | m****g@m****m | 11 |
dependabot[bot] | 4****] | 10 |
Paola Holleway | 9****y | 10 |
Microsoft Open Source | m****e | 5 |
Pete Gadomski | p****i@g****m | 5 |
Marc Lichtman | m****l@v****u | 4 |
Maitreyee Joshi | 1****i | 2 |
Alex Kaminsky | a****y@a****m | 2 |
Bruno Sánchez-Andrade Nuño | b****n@g****m | 1 |
Gregorio Martin | g****2@g****m | 1 |
Michael Delgado | d****m | 1 |
Ubuntu | d****s@g****t | 1 |
Bruno Sánchez-Andrade Nuño | b****c@m****m | 1 |
microsoft-github-operations[bot] | 5****] | 1 |
Committer domains:
- microsoft.com: 5
- azavea.com: 2
- grebevm.xsuyhapamgeula53slhhynbbme.ax.internal.cloudapp.net: 1
- vt.edu: 1
Issue and Pull Request metadata
Last synced: 1 day ago
Total issues: 21
Total pull requests: 483
Average time to close issues: 2 months
Average time to close pull requests: 11 days
Total issue authors: 11
Total pull request authors: 18
Average comments per issue: 1.81
Average comments per pull request: 2.99
Merged pull request: 421
Bot issues: 0
Bot pull requests: 55
Past year issues: 4
Past year pull requests: 36
Past year average time to close issues: about 2 months
Past year average time to close pull requests: 25 days
Past year issue authors: 3
Past year pull request authors: 6
Past year average comments per issue: 1.0
Past year average comments per pull request: 1.67
Past year merged pull request: 20
Past year bot issues: 0
Past year bot pull requests: 13
Top Issue Authors
- m-mohr (6)
- jfrankl (3)
- ngam (2)
- mmcfarland (2)
- srijan55 (2)
- cmosig (1)
- lukasValentin (1)
- FlorisCalkoen (1)
- iuryt (1)
- rachtsingh (1)
- not-Karot (1)
Top Pull Request Authors
- mmcfarland (220)
- TomAugspurger (99)
- dependabot[bot] (55)
- pjhartzell (30)
- lossyrob (24)
- pholleway (12)
- agentmorris (8)
- srijan55 (8)
- ghidalgo3 (6)
- 777arc (6)
- gadomski (5)
- joshimai (2)
- brunosan (2)
- jfrankl (2)
- gregoriomartin (1)
Top Issue Labels
Top Pull Request Labels
- dependencies (55)
- javascript (42)
- python (4)
- bug (1)
Dependencies
- Jinja2 ==3.0.
- ipython ==7.31.1
- myst-parser >=0.13.5
- nbconvert ==6.0.
- nbformat ==5.1.3
- nbsphinx ==0.8.3
- numpydoc ==1.1.0
- pyyaml ==5.4.1
- requests *
- sphinx ==3.5.4
- Azure/static-web-apps-deploy v1 composite
- actions/cache v3 composite
- actions/checkout v3 composite
- Azure/static-web-apps-deploy v1 composite
- actions/checkout v3 composite
- Azure/static-web-apps-deploy v1 composite
- actions/cache v3 composite
- actions/checkout v3 composite
- actions/checkout v3 composite
- actions/upload-artifact v3 composite
- cypress-io/github-action v4 composite
- mcr.microsoft.com/azure-functions/python 3.0-python3.8 build
- node 14.19.3-slim
- tiangolo/uvicorn-gunicorn-fastapi python3.7
- python 3.9-slim build
- 1513 dependencies
- copy-webpack-plugin ^11.0.0 development
- cypress ^10.1.0 development
- json-loader ^0.5.7 development
- nock ^13.2.7 development
- prettier ^2.7.1 development
- yaml-loader ^0.8.0 development
- @apidevtools/json-schema-ref-parser ^9.0.9
- @craco/craco 7.0.0-alpha.3
- @fluentui/react ^8.76.0
- @radiantearth/stac-fields 1.0.0-beta.7
- @reduxjs/toolkit ^1.8.2
- @testing-library/jest-dom ^5.16.4
- @testing-library/react ^12.1.3
- @testing-library/user-event ^14.2.0
- @turf/bbox-polygon ^6.5.0
- @turf/boolean-intersects ^6.5.0
- @turf/centroid ^6.5.0
- @turf/union ^6.5.0
- @types/dompurify ^2.3.3
- @types/geojson ^7946.0.8
- @types/jest ^27.4.1
- @types/lodash-es ^4.17.6
- @types/marked ^4.0.3
- @types/node ^17.0.44
- @types/react ^17.0.39
- @types/react-dom ^17.0.12
- @types/react-redux ^7.1.24
- @types/react-router-dom ^5.3.3
- @types/react-router-hash-link ^2.4.5
- @types/swagger-ui-react ^4.11.0
- @uifabric/icons ^7.7.2
- axios ^0.27.2
- azure-maps-control ^2.2.0
- azure-maps-drawing-tools ^1.0.0
- buffer ^6.0.3
- dayjs ^1.11.3
- dompurify ^2.3.8
- formik ^2.2.9
- highlight.js ^11.5.1
- https-browserify ^1.0.0
- json-stringify-pretty-compact ^4.0.0
- lodash-es ^4.17.21
- marked ^4.0.17
- minisearch ^5.1.0
- next-share ^0.18.4
- number-abbreviate ^2.0.0
- process ^0.11.10
- query-string ^7.1.3
- react ^17.0.2
- react-dom ^17.0.2
- react-error-boundary ^3.1.4
- react-helmet ^6.1.0
- react-query ^3.39.1
- react-redux ^7.2.9
- react-router-dom ^6.3.0
- react-router-hash-link ^2.4.3
- react-scripts 5.0.1
- react-use ^17.4.0
- redux ^4.2.0
- stream-http ^3.2.0
- swagger-ui-react ^4.12.0
- typescript ^4.6.2
- yup ^0.32.11
- black * development
- mypy * development
- types-requests * development
- azure-functions ==1.11.2
- requests ==2.28.1
Score: 7.138866999945524