Special equipment: a deep-frying thermometer
Put the raspberries, lemon juice and 1/3 cup of the granulated sugar in a medium saucepan and cook over medium heat until the berries are soft and the liquid has thickened, about 15 minutes. Let cool to room temperature.
Combine the ricotta cheese, cream cheese, vanilla and remaining 1/4 cup granulated sugar in a bowl and stir until smooth.
Whisk together the egg and 1 tablespoon water in a small bowl for the egg wash; set aside. In a separate small bowl, combine the sanding sugar with the cinnamon; set aside.
Fill a Dutch oven or deep fryer with the oil and heat to 325 degrees F.
Dust a work surface with flour, roll half of the pie dough to 1/4-inch thickness and then cut out five 5-inch circles. Spoon a heaping tablespoon of the ricotta-cream cheese mixture onto one side of each circle, leaving about a 1-inch space from the edge. Top with a heaping teaspoon of the raspberry mixture, then brush the bottom edge of each pie with the egg wash and fold over to make a half-moon. Use a fork to press around the edges. Repeat with the remaining dough, filling and egg wash.
Working in batches, fry the pies until golden and crisp, 2 to 3 minutes. Drain on a paper towel-lined plate and sprinkle with the sugar and cinnamon mixture.
In a food processor, add the flour, granulated sugar, cinnamon and salt and pulse to combine. Add the butter and pulse until the butter is coated with flour and is still in chunks, 3 to 4 times. Slowly pulse in the water until the dough holds together when squeezed between your fingers.
Turn the dough out onto a lightly floured surface, divide into 2 equal parts, shape each into a disk and wrap with plastic. Refrigerate for at least 30 minutes.