There are three main concerns when it comes to having a driveway basketball court installed at your home.
The existing slope of the driveway
The size of the driveway
Location of the sun in the afternoon
Most driveways are sloped at a minimum of 1% or greater to promote proper drainage. A 1% slope means if you were to walk 100 feet you would go down 1 foot, 2% would be a 2 feet down over 100 etc. So, why is this important? In a gym the rim is always 10′ high no matter where you stand on the court. In a driveway this is completely different. When you practice foul shots, the rim should be 10′ higher than the foul line. With a 1% slope, there would be a 1.8″ difference in the height of the rim when stranding under the basket and standing on the foul line. Now if there was a 4% slope there would be a 7.2″ difference in height which is high when practicing foul shots. One solution is to locate the basketball unit on the flattest part of the driveway, another solution is to replace the asphalt in the part of your driveway where you would like a court and minimize the slope to 1%. Otherwise, you have to live with the limitations and the risk that comes with practicing foul shots inaccurately.
When it comes to size, there should be at least 2 or 3 car garage driveway to build the court in. The distance required coming off the basketball unit’s pole is 25′ to the top of the key/high school 3-point line. Assuming your basketball unit has the official out of bounds distance of 4′ from the backboard to the pole + 15′ to the foul line + 6′ to the top of the key/high school 3-point line, it is good to have 3′ beyond the 3-point line for shooting high school 3-pointers. 28′ from the pole to the edge of the court is a minimum. 28′ would also be a comfortable minimum for the width as the lane is 12′ wide which would leave you 8′ on either side of the lane for the ball to bounce a few times on a missed shot before you go out of bounds. The wider the better and the more of the 3-point arch you will have on your court. The 3-point line at the base line is just under 40′ wide.
Finally, taking the location of the sun into consideration is very important and often overlooked. This is an easy one, though. Just go onto your driveway at 4 or 5pm and imagine the location of your basketball unit. Line up for a foul shot and if the sun is in your eyes & located behind the imaginary location of your basketball unit then this location is west and is not a good spot for your hoop. Opposite of west is east and the sun will only be behind the basketball unit at the crack of dawn when most people aren’t playing basketball. To the right of west is north which would also be an ideal location. Another way to figure this out is to look at the north arrow on your property survey or look at your home on Google earth and check the north arrow on the map.