microsoft / microsoft/GlobalMLBuildingFootprints
Google colab and API token access
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2k
- Forks
- 277
- PR merge metrics
- No merged PRs in 30d
Description
Hello!
I am trying to obtain the building polygons and locations using the google colab notebooks.
First, I requested access to Microsoft to be able to use Jupyter notebook and test the "Vatican city" example and it worked. Then I used the same code on google colab, and I got an error. To make sure, that this is not due to versions, I used printed all the packages versions on the Microsoft jupyter hub and installed them on my google colab.
However, I keep getting the same error.
The error I get is the following:

Code:
catalog = pystac_client.Client.open(
"https://planetarycomputer.microsoft.com/api/stac/v1"
)
items = catalog.search(
collections=["ms-buildings"], query={"msbuildings:region": {"eq": "Vatican City"}}
)
item = next(items.get_items())
item
collection = catalog.get_collection("ms-buildings")
asset = planetary_computer.sign(item.assets["data"])
df = geopandas.read_parquet(
asset.href, storage_options=asset.extra_fields["table:storage_options"]
)
df.head()
I am guessing the error, its the API token? but I think I am following the steps in the Microsoft API documentation for the datasets.
What am I doing wrong?
Thank you !
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The reported entry point is the Google Colab notebook code using pystac_client.Client.open, planetary_computer.sign, and geopandas.read_parquet; first reproduce it in Colab and capture the full traceback and package versions rather than relying on the linked screenshot. Done means identifying the authentication or environment difference and documenting a verified way to retrieve the ms-buildings asset.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jupyter-notebook, python
- Domain
- api, cloud, data
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100