{
  "operators": [
    {
      "operatorID": "CSVFileScan-operator-ddb8baf2-03e1-4b7a-9b88-719db6a21199",
      "operatorType": "CSVFileScan",
      "operatorVersion": "N/A",
      "operatorProperties": {
        "fileEncoding": "UTF_8",
        "customDelimiter": ",",
        "hasHeader": true,
        "fileName": "/texera/popular-movies-of-imdb/v1/TMDb_updated.csv",
        "offset": 0,
        "limit": 1000
      },
      "inputPorts": [],
      "outputPorts": [
        {
          "portID": "output-0",
          "displayName": "",
          "allowMultiInputs": false,
          "isDynamicPort": false
        }
      ],
      "showAdvanced": false,
      "isDisabled": false,
      "customDisplayName": "Read Movie Dataset",
      "dynamicInputPorts": false,
      "dynamicOutputPorts": false,
      "viewResult": true
    },
    {
      "operatorID": "PieChart-operator-4924a885-7e6d-4b3c-8463-588f1e2ecb92",
      "operatorType": "PieChart",
      "operatorVersion": "N/A",
      "operatorProperties": {
        "value": "#movies",
        "name": "original_language"
      },
      "inputPorts": [
        {
          "portID": "input-0",
          "displayName": "",
          "allowMultiInputs": false,
          "isDynamicPort": false,
          "dependencies": []
        }
      ],
      "outputPorts": [
        {
          "portID": "output-0",
          "displayName": "",
          "allowMultiInputs": false,
          "isDynamicPort": false
        }
      ],
      "showAdvanced": false,
      "isDisabled": false,
      "customDisplayName": "PieChart",
      "dynamicInputPorts": false,
      "dynamicOutputPorts": false
    },
    {
      "operatorID": "Aggregate-operator-41c3fbf6-2846-417b-add2-386c34b0a07f",
      "operatorType": "Aggregate",
      "operatorVersion": "N/A",
      "operatorProperties": {
        "aggregations": [
          {
            "aggFunction": "count",
            "attribute": "original_language",
            "result attribute": "#movies"
          }
        ],
        "groupByKeys": [
          "original_language"
        ]
      },
      "inputPorts": [
        {
          "portID": "input-0",
          "displayName": "",
          "allowMultiInputs": false,
          "isDynamicPort": false,
          "dependencies": []
        }
      ],
      "outputPorts": [
        {
          "portID": "output-0",
          "displayName": "",
          "allowMultiInputs": false,
          "isDynamicPort": false
        }
      ],
      "showAdvanced": false,
      "isDisabled": false,
      "customDisplayName": "Count # of Movies Per Language",
      "dynamicInputPorts": false,
      "dynamicOutputPorts": false
    },
    {
      "operatorID": "Filter-operator-4ecc80e6-3840-46ff-afed-2ee638693a60",
      "operatorType": "Filter",
      "operatorVersion": "N/A",
      "operatorProperties": {
        "predicates": [
          {
            "value": "en",
            "attribute": "original_language",
            "condition": "="
          }
        ]
      },
      "inputPorts": [
        {
          "portID": "input-0",
          "displayName": "",
          "allowMultiInputs": false,
          "isDynamicPort": false,
          "dependencies": []
        }
      ],
      "outputPorts": [
        {
          "portID": "output-0",
          "displayName": "",
          "allowMultiInputs": false,
          "isDynamicPort": false
        }
      ],
      "showAdvanced": false,
      "isDisabled": false,
      "customDisplayName": "Keep English Movies",
      "dynamicInputPorts": false,
      "dynamicOutputPorts": false,
      "viewResult": true
    },
    {
      "operatorID": "WordCloud-operator-fdc7b86b-3bc2-44db-9334-d6767e30186d",
      "operatorType": "WordCloud",
      "operatorVersion": "N/A",
      "operatorProperties": {
        "topN": 100,
        "textColumn": "overview"
      },
      "inputPorts": [
        {
          "portID": "input-0",
          "displayName": "",
          "allowMultiInputs": false,
          "isDynamicPort": false,
          "dependencies": []
        }
      ],
      "outputPorts": [
        {
          "portID": "output-0",
          "displayName": "",
          "allowMultiInputs": false,
          "isDynamicPort": false
        }
      ],
      "showAdvanced": false,
      "isDisabled": false,
      "customDisplayName": "Word Cloud of \"overview\"",
      "dynamicInputPorts": false,
      "dynamicOutputPorts": false
    },
    {
      "operatorID": "Filter-operator-428eb866-abfb-4f7f-9d4f-5aeebd6d778b",
      "operatorType": "Filter",
      "operatorVersion": "N/A",
      "operatorProperties": {
        "predicates": [
          {
            "value": "fr",
            "attribute": "original_language",
            "condition": "="
          }
        ]
      },
      "inputPorts": [
        {
          "portID": "input-0",
          "displayName": "",
          "allowMultiInputs": false,
          "isDynamicPort": false,
          "dependencies": []
        }
      ],
      "outputPorts": [
        {
          "portID": "output-0",
          "displayName": "",
          "allowMultiInputs": false,
          "isDynamicPort": false
        }
      ],
      "showAdvanced": false,
      "isDisabled": false,
      "customDisplayName": "Keep French Movies",
      "dynamicInputPorts": false,
      "dynamicOutputPorts": false,
      "viewResult": true
    },
    {
      "operatorID": "WordCloud-operator-0526bc0b-66fe-48d8-aa41-67be71f98401",
      "operatorType": "WordCloud",
      "operatorVersion": "N/A",
      "operatorProperties": {
        "topN": 100,
        "textColumn": "overview"
      },
      "inputPorts": [
        {
          "portID": "input-0",
          "displayName": "",
          "allowMultiInputs": false,
          "isDynamicPort": false,
          "dependencies": []
        }
      ],
      "outputPorts": [
        {
          "portID": "output-0",
          "displayName": "",
          "allowMultiInputs": false,
          "isDynamicPort": false
        }
      ],
      "showAdvanced": false,
      "isDisabled": false,
      "customDisplayName": "Word Cloud of \"overview\"",
      "dynamicInputPorts": false,
      "dynamicOutputPorts": false
    },
    {
      "operatorID": "Projection-operator-9144f57d-0229-4afb-8a18-64e4d9ba8aa7",
      "operatorType": "Projection",
      "operatorVersion": "N/A",
      "operatorProperties": {
        "isDrop": true,
        "attributes": [
          {
            "originalAttribute": "id"
          }
        ]
      },
      "inputPorts": [
        {
          "portID": "input-0",
          "displayName": "",
          "allowMultiInputs": false,
          "isDynamicPort": false,
          "dependencies": []
        }
      ],
      "outputPorts": [
        {
          "portID": "output-0",
          "displayName": "",
          "allowMultiInputs": false,
          "isDynamicPort": false
        }
      ],
      "showAdvanced": false,
      "isDisabled": false,
      "customDisplayName": "Remove One Column",
      "dynamicInputPorts": false,
      "dynamicOutputPorts": false
    },
    {
      "operatorID": "PythonUDFV2-operator-d785a88e-a5fe-45bb-9da3-b9acc5f368a4",
      "operatorType": "PythonUDFV2",
      "operatorVersion": "N/A",
      "operatorProperties": {
        "code": "from pytexera import *\n\nclass ProcessTupleOperator(UDFOperatorV2):\n    \n    @overrides\n    def process_tuple(self, tuple_: Tuple, port: int) -> Iterator[Optional[TupleLike]]:\n        vote_count = tuple_[\"vote_count\"]\n        vote_average = tuple_[\"vote_average\"]\n        \n        # Normalize vote_count to a 0–1 scale, capped at 1,000 votes\n        # This gives us a weight factor indicating how trust-worthy the \"vote_average\" field is\n        # Example: 200 votes → 0.2 ; 1,500 votes → 1.0\n        weight = min(vote_count, 1000) / 1000\n\n        # Final score is vote_average scaled by vote_count weight\n        # A movie with a lower \"vote_count\" will be impacted more\n        custom_score = vote_average * weight\n        \n        # Give a rating label based on the \"custom_score\"\n        if custom_score < 2.0:\n            label = \"Disaster\"\n        elif custom_score < 4.0:\n            label = \"Flop\"\n        elif custom_score < 6.0:\n            label = \"Average\"\n        elif custom_score < 8.0:\n            label = \"Hit\"\n        else:\n            label = \"Legendary\"\n    \n        # Assign \"custom_score\" and \"custom_rating\" to the tuple as new fields\n        tuple_[\"custom_score\"] = round(custom_score, 2)\n        tuple_[\"custom_rating\"] = label\n\n        # Output the tuple\n        yield tuple_\n\n",
        "workers": 2,
        "retainInputColumns": true,
        "outputColumns": [
          {
            "attributeName": "custom_score",
            "attributeType": "double"
          },
          {
            "attributeName": "custom_rating",
            "attributeType": "string"
          }
        ]
      },
      "inputPorts": [
        {
          "portID": "input-0",
          "displayName": "",
          "allowMultiInputs": true,
          "isDynamicPort": false,
          "dependencies": []
        }
      ],
      "outputPorts": [
        {
          "portID": "output-0",
          "displayName": "",
          "allowMultiInputs": false,
          "isDynamicPort": false
        }
      ],
      "showAdvanced": false,
      "isDisabled": false,
      "customDisplayName": "Assign Custom Scores and Ratings",
      "dynamicInputPorts": true,
      "dynamicOutputPorts": true,
      "viewResult": true
    },
    {
      "operatorID": "Aggregate-operator-671f7e75-6477-46bd-be40-484d3c496eb7",
      "operatorType": "Aggregate",
      "operatorVersion": "N/A",
      "operatorProperties": {
        "aggregations": [
          {
            "aggFunction": "count",
            "attribute": "custom_rating",
            "result attribute": "#ratings"
          }
        ],
        "groupByKeys": [
          "custom_rating"
        ]
      },
      "inputPorts": [
        {
          "portID": "input-0",
          "displayName": "",
          "allowMultiInputs": false,
          "isDynamicPort": false,
          "dependencies": []
        }
      ],
      "outputPorts": [
        {
          "portID": "output-0",
          "displayName": "",
          "allowMultiInputs": false,
          "isDynamicPort": false
        }
      ],
      "showAdvanced": false,
      "isDisabled": false,
      "customDisplayName": "Count # of Rated Movies ",
      "dynamicInputPorts": false,
      "dynamicOutputPorts": false
    },
    {
      "operatorID": "Aggregate-operator-ea972a84-7fca-499c-83f2-75f0bef56900",
      "operatorType": "Aggregate",
      "operatorVersion": "N/A",
      "operatorProperties": {
        "aggregations": [
          {
            "aggFunction": "count",
            "attribute": "custom_rating",
            "result attribute": "#ratings"
          }
        ],
        "groupByKeys": [
          "custom_rating"
        ]
      },
      "inputPorts": [
        {
          "portID": "input-0",
          "displayName": "",
          "allowMultiInputs": false,
          "isDynamicPort": false,
          "dependencies": []
        }
      ],
      "outputPorts": [
        {
          "portID": "output-0",
          "displayName": "",
          "allowMultiInputs": false,
          "isDynamicPort": false
        }
      ],
      "showAdvanced": false,
      "isDisabled": false,
      "customDisplayName": "Count # of Rated Movies ",
      "dynamicInputPorts": false,
      "dynamicOutputPorts": false
    },
    {
      "operatorID": "BarChart-operator-beb55708-e8d1-4e65-9b66-ace428e52f63",
      "operatorType": "BarChart",
      "operatorVersion": "N/A",
      "operatorProperties": {
        "categoryColumn": "custom_rating",
        "horizontalOrientation": false,
        "fields": "custom_rating",
        "value": "#ratings"
      },
      "inputPorts": [
        {
          "portID": "input-0",
          "displayName": "",
          "allowMultiInputs": false,
          "isDynamicPort": false,
          "dependencies": []
        }
      ],
      "outputPorts": [
        {
          "portID": "output-0",
          "displayName": "",
          "allowMultiInputs": false,
          "isDynamicPort": false
        }
      ],
      "showAdvanced": false,
      "isDisabled": false,
      "customDisplayName": "Bar Chart",
      "dynamicInputPorts": false,
      "dynamicOutputPorts": false
    },
    {
      "operatorID": "BarChart-operator-e38a512a-a74e-4f86-85ad-67c5c2cb0620",
      "operatorType": "BarChart",
      "operatorVersion": "N/A",
      "operatorProperties": {
        "categoryColumn": "custom_rating",
        "horizontalOrientation": false,
        "fields": "custom_rating",
        "value": "#ratings"
      },
      "inputPorts": [
        {
          "portID": "input-0",
          "displayName": "",
          "allowMultiInputs": false,
          "isDynamicPort": false,
          "dependencies": []
        }
      ],
      "outputPorts": [
        {
          "portID": "output-0",
          "displayName": "",
          "allowMultiInputs": false,
          "isDynamicPort": false
        }
      ],
      "showAdvanced": false,
      "isDisabled": false,
      "customDisplayName": "Bar Chart",
      "dynamicInputPorts": false,
      "dynamicOutputPorts": false
    }
  ],
  "operatorPositions": {
    "CSVFileScan-operator-ddb8baf2-03e1-4b7a-9b88-719db6a21199": {
      "x": -121,
      "y": 239
    },
    "PieChart-operator-4924a885-7e6d-4b3c-8463-588f1e2ecb92": {
      "x": 637,
      "y": -59
    },
    "Aggregate-operator-41c3fbf6-2846-417b-add2-386c34b0a07f": {
      "x": 419,
      "y": -59
    },
    "Filter-operator-4ecc80e6-3840-46ff-afed-2ee638693a60": {
      "x": 478,
      "y": 240
    },
    "WordCloud-operator-fdc7b86b-3bc2-44db-9334-d6767e30186d": {
      "x": 639,
      "y": 159
    },
    "Filter-operator-428eb866-abfb-4f7f-9d4f-5aeebd6d778b": {
      "x": 496,
      "y": 592
    },
    "WordCloud-operator-0526bc0b-66fe-48d8-aa41-67be71f98401": {
      "x": 636,
      "y": 512
    },
    "Projection-operator-9144f57d-0229-4afb-8a18-64e4d9ba8aa7": {
      "x": 66,
      "y": 239
    },
    "PythonUDFV2-operator-d785a88e-a5fe-45bb-9da3-b9acc5f368a4": {
      "x": 280,
      "y": 240
    },
    "Aggregate-operator-671f7e75-6477-46bd-be40-484d3c496eb7": {
      "x": 636,
      "y": 671
    },
    "Aggregate-operator-ea972a84-7fca-499c-83f2-75f0bef56900": {
      "x": 638,
      "y": 320
    },
    "BarChart-operator-beb55708-e8d1-4e65-9b66-ace428e52f63": {
      "x": 786,
      "y": 320
    },
    "BarChart-operator-e38a512a-a74e-4f86-85ad-67c5c2cb0620": {
      "x": 770,
      "y": 671
    }
  },
  "links": [
    {
      "linkID": "3fba9036-949b-41e6-b1ac-809074e95b3d",
      "source": {
        "operatorID": "Aggregate-operator-41c3fbf6-2846-417b-add2-386c34b0a07f",
        "portID": "output-0"
      },
      "target": {
        "operatorID": "PieChart-operator-4924a885-7e6d-4b3c-8463-588f1e2ecb92",
        "portID": "input-0"
      }
    },
    {
      "linkID": "8752abd8-3f8a-41d6-9780-9c2285308481",
      "source": {
        "operatorID": "Filter-operator-4ecc80e6-3840-46ff-afed-2ee638693a60",
        "portID": "output-0"
      },
      "target": {
        "operatorID": "WordCloud-operator-fdc7b86b-3bc2-44db-9334-d6767e30186d",
        "portID": "input-0"
      }
    },
    {
      "linkID": "link-5eccb964-e5ba-413f-a8bb-7de17dd15daa",
      "source": {
        "operatorID": "Filter-operator-428eb866-abfb-4f7f-9d4f-5aeebd6d778b",
        "portID": "output-0"
      },
      "target": {
        "operatorID": "WordCloud-operator-0526bc0b-66fe-48d8-aa41-67be71f98401",
        "portID": "input-0"
      }
    },
    {
      "linkID": "136b40b1-0f7a-421e-809d-746e55eaa397",
      "source": {
        "operatorID": "CSVFileScan-operator-ddb8baf2-03e1-4b7a-9b88-719db6a21199",
        "portID": "output-0"
      },
      "target": {
        "operatorID": "Projection-operator-9144f57d-0229-4afb-8a18-64e4d9ba8aa7",
        "portID": "input-0"
      }
    },
    {
      "linkID": "d3baeb00-7f51-49f3-ad81-ceaad4376085",
      "source": {
        "operatorID": "Projection-operator-9144f57d-0229-4afb-8a18-64e4d9ba8aa7",
        "portID": "output-0"
      },
      "target": {
        "operatorID": "PythonUDFV2-operator-d785a88e-a5fe-45bb-9da3-b9acc5f368a4",
        "portID": "input-0"
      }
    },
    {
      "linkID": "b7f78a90-b224-43d3-9891-628d92c8fe2b",
      "source": {
        "operatorID": "PythonUDFV2-operator-d785a88e-a5fe-45bb-9da3-b9acc5f368a4",
        "portID": "output-0"
      },
      "target": {
        "operatorID": "Aggregate-operator-41c3fbf6-2846-417b-add2-386c34b0a07f",
        "portID": "input-0"
      }
    },
    {
      "linkID": "9aa47d70-2fd0-4047-8326-e6ec0e3cb1a7",
      "source": {
        "operatorID": "PythonUDFV2-operator-d785a88e-a5fe-45bb-9da3-b9acc5f368a4",
        "portID": "output-0"
      },
      "target": {
        "operatorID": "Filter-operator-4ecc80e6-3840-46ff-afed-2ee638693a60",
        "portID": "input-0"
      }
    },
    {
      "linkID": "cbfc3d5a-08cd-4d45-94f4-9711855c839c",
      "source": {
        "operatorID": "PythonUDFV2-operator-d785a88e-a5fe-45bb-9da3-b9acc5f368a4",
        "portID": "output-0"
      },
      "target": {
        "operatorID": "Filter-operator-428eb866-abfb-4f7f-9d4f-5aeebd6d778b",
        "portID": "input-0"
      }
    },
    {
      "linkID": "2d18fc28-ef4b-4c71-8927-cfc3bb044868",
      "source": {
        "operatorID": "Filter-operator-428eb866-abfb-4f7f-9d4f-5aeebd6d778b",
        "portID": "output-0"
      },
      "target": {
        "operatorID": "Aggregate-operator-671f7e75-6477-46bd-be40-484d3c496eb7",
        "portID": "input-0"
      }
    },
    {
      "linkID": "bd807bb1-10f0-4d9e-b837-27a005e1d433",
      "source": {
        "operatorID": "Filter-operator-4ecc80e6-3840-46ff-afed-2ee638693a60",
        "portID": "output-0"
      },
      "target": {
        "operatorID": "Aggregate-operator-ea972a84-7fca-499c-83f2-75f0bef56900",
        "portID": "input-0"
      }
    },
    {
      "linkID": "link-2c07dc92-b0d9-495a-9620-1d893f8bb87c",
      "source": {
        "operatorID": "Aggregate-operator-ea972a84-7fca-499c-83f2-75f0bef56900",
        "portID": "output-0"
      },
      "target": {
        "operatorID": "BarChart-operator-beb55708-e8d1-4e65-9b66-ace428e52f63",
        "portID": "input-0"
      }
    },
    {
      "linkID": "853cf538-ed67-489b-b279-3b3cd447a1fc",
      "source": {
        "operatorID": "Aggregate-operator-671f7e75-6477-46bd-be40-484d3c496eb7",
        "portID": "output-0"
      },
      "target": {
        "operatorID": "BarChart-operator-e38a512a-a74e-4f86-85ad-67c5c2cb0620",
        "portID": "input-0"
      }
    }
  ],
  "commentBoxes": [],
  "settings": {
    "dataTransferBatchSize": 400
  }
}