def process_retail()

in gemini/agents/research-multi-agents/ev_agent/api_handler/api_01_NeighborhoodSummary.py [0:0]


    def process_retail(elements: List[Dict]) -> Retail:
        retail = Retail()
        for element in elements:
            tags = element.get("tags", {})

            # Process shop tags
            shop_type = tags.get("shop")
            if shop_type == "mall":
                retail.malls += 1
            elif shop_type == "supermarket":
                retail.supermarkets += 1
            elif shop_type == "department_store":
                retail.department_stores += 1
            elif shop_type == "convenience":
                retail.convenience_stores += 1
            elif shop_type in ["grocery", "greengrocer"]:
                retail.grocery_stores += 1
            elif shop_type == "marketplace" or tags.get("amenity") == "marketplace":
                retail.markets += 1

            # Check for retail parks and shopping centres in different tags
            if tags.get("landuse") == "retail":
                retail.retail_parks += 1
            if tags.get("building") == "retail" or shop_type == "shopping_centre":
                retail.shopping_centres += 1
        return retail