City List Includes Sub-localities/Neighborhoods as Cities
The @countrystatecity/countries package appears to include sub-localities/neighborhoods within the city list.
For example, for India (IN) → Maharashtra (MH), the city data includes entries such as:
- Borivali
- Andheri
- Other similar localities/suburbs
These are commonly considered suburbs/localities of Mumbai, rather than independent cities.
Expected Behavior
The city list should contain actual cities and should not include sub-localities, neighborhoods, or suburbs as separate cities.
For example:
Country: India (IN) State: Maharashtra (MH)
Expected:
- Mumbai
- Pune
- Nashik
- Nagpur
- etc.
Should not include:
- Borivali
- Andheri
- etc.
Actual Behavior
The package returns sub-localities/suburbs as city entries along with actual cities.
Example:
IN → MH → Borivali
IN → MH → AndheriImpact
This can cause issues for applications that use the package to populate Country → State → City dropdowns, as users may see neighborhoods/suburbs mixed with actual city names.
It can also lead to:
- Incorrect city selection
- Duplicate or confusing locations
- Inconsistent location data
- Incorrect downstream filtering or reporting
Suggested Resolution
Could the city dataset be reviewed to distinguish between:
- Cities
- Towns
- Suburbs
- Neighborhoods
- Localities
and ensure that only appropriate city-level locations are included in the cities dataset?
If the project intentionally includes localities/suburbs, it would be helpful to document this behavior and/or provide a separate classification/type field so consumers can distinguish them.
Environment
- Package:
@countrystatecity/countries - Country: India (
IN) - State: Maharashtra (
MH)
Example
The issue can be reproduced by fetching the cities for Maharashtra and observing that entries such as Borivali and Andheri are returned as cities.
Question
Is this the intended behavior of the dataset, or could these entries be reclassified/removed from the city list?
Source: dr5hn/countries-states-cities-database