Skip to content

Conversation

@juliawu
Copy link
Contributor

@juliawu juliawu commented Jan 22, 2026

This PR limits the child place types available for "Earth" in the Map tool to Country and AA1 level maps.

Now the child Place Types for Earth are:

  • Country
  • AA1
  • EurostatNUTS1

Context:

Many of the child place types when plotting a map of "Earth" lead to buggy behavior on the Map Tool. Sometimes, the page blanks out. Other times, we get a spinner that never exits. And for small place types (e.g. City) we end up with very sparse maps. This is primarily because for small places, the data volume (and therefore latency / mixer errors) is too high while coverage tends to be low.

Before:
Screenshot 2026-01-21 at 5 03 23 PM

After:
Screenshot 2026-01-21 at 5 04 13 PM

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @juliawu, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly improves the stability and user experience of the Map Tool by strategically limiting the child place types available when 'Earth' is the selected region. By restricting options to higher-level administrative divisions, the change effectively mitigates issues like blank screens and unresponsive interfaces that arise from attempting to load excessively large datasets for smaller geographical units.

Highlights

  • New Constant for Planet Place Types: A new constant, PLANET_PLACE_TYPES, has been introduced to explicitly define the allowed child place types for 'Earth'. This constant includes 'Country', 'AdministrativeArea1', and 'EurostatNUTS1'.
  • Restricted Child Place Types for 'Earth': The CHILD_PLACE_TYPES.Planet mapping has been updated to use the newly defined PLANET_PLACE_TYPES constant. This change restricts the available child place types in the Map Tool dropdown when 'Earth' is selected, focusing on higher-level administrative divisions.
  • Improved Map Tool Stability: This modification aims to prevent buggy behavior in the Map Tool, such as blank maps, infinite loading spinners, or sparse data, which previously occurred when users selected smaller, data-intensive place types for 'Earth'.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request limits the child place types for 'Earth' in the Map tool to prevent buggy behavior. This is done by introducing a new PLANET_PLACE_TYPES constant with a restricted set of place types. The change is logical and correctly implemented. I've added one minor suggestion to improve code formatting for consistency.

Comment on lines 75 to 76
export const PLANET_PLACE_TYPES = [
"Country", "AdministrativeArea1", "EurostatNUTS1"];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For consistency with other array declarations in this file (e.g., line 22), and for better readability, please format this array on a single line with spaces after the commas.

export const PLANET_PLACE_TYPES = ["Country", "AdministrativeArea1", "EurostatNUTS1"];

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed via lint ./run_test.sh -f

@juliawu juliawu requested review from a team and beets and removed request for a team January 22, 2026 01:18
@juliawu juliawu marked this pull request as ready for review January 22, 2026 01:18
@juliawu juliawu requested a review from miss-o-soup January 22, 2026 01:18
Copy link
Collaborator

@beets beets left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for this fix !

@juliawu juliawu enabled auto-merge (squash) January 22, 2026 18:18
@juliawu juliawu merged commit 6b4cab6 into datacommonsorg:master Jan 22, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants