Is there a quick and easy way to refactor this viz to make it display only one Indian state.
@sriramvsharma You can filter the data beforehand to match on the state you want only. In your code there, it might look something like reassigning stateJSON
and districtJSON
with new versions of them, with just the geometries you are interested in.
You can use immutable object update patterns described here to traverse the JSON and define a filtered version of the geometries: Immutable Update Patterns.
Good luck!
1 Like