Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def geo(self, fields, geojson_geometry, year=None, resolution='tract', ignore_missing = False, **kwargs):
if year is None:
year = self.default_year
fields = census.core.list_or_str(fields)
as_acs = kwargs.get('as_acs', False)
if as_acs:
acs_fields = self._cross(fields)
for field in acs_fields:
if self._field_type(field, year) is not int:
raise ValueError('{} is not a variable that can be aggregated your geography'.format(field))
else:
for field in fields:
if self._field_type(field, year) is not int:
raise ValueError('{} is not a variable that can be aggregated your geography'.format(field))
resolutions = {'tract': self.geo_tract,
'blockgroup': self.geo_blockgroup}