1. For the crust: Combine the flour, margarine, sugar, and salt in a large bowl. Work with your fingers gathering and crumbling until you have a crumbly mixture about the size of peas.
2. In 2-tablespoon amounts (about 1/2 cup total), slowly add cold water, gently incorporating by hand. As soon as the dough comes together in a ball, wrap in plastic wrap and chill for 30 minutes.
3. For the filling: Mix together the goat cheese, heavy cream, egg, brown sugar, flour, salt, and basil in a bowl. Add the blueberries and combine; the texture will be like a thick cake batter.
4. For the topping: Mix together the almonds, sugar, and margarine in a bowl and set aside.
5. Preheat the oven to 350 degrees F. Roll out the dough on a floured surface to 18-inch thickness and place into a 10-inch pie pan. Trim and crimp the edges and prick the bottom of the crust with a fork. Par-bake the crust for 15 minutes, or until firm. Let cool slightly. Pour the filling into the crust and sprinkle the topping over the top. Bake for 35 to 40 minutes, until slightly bubbling and the crust is browned, rotating the pie halfway through. Let the pie cool for 30 minutes on a wire rack before serving so the filling can firm up.