Lets see. Edgeguarding spacies (the good stuff)

Actually I'd encourage you to watch alot of matches and watch how players tackle this. Take notes.
Here are a few guidelines though
If you see a spacie below the stage the best thing to do is to sh needle them -> turn and wavedash back to take ledge -> fast fall down and double jump Bair them.
The easier version requires you to simply run off the stage and press A. Your Nair will likely kill them. You can experiement with other aerials as you please. Run off Bair for example can stage spike them which is nice.
Another option is to take the Ledge and if you time it right you can do a Nair onto the stage right after you grabbed the ledge and be invincible (the actual term is Intangible since the opponent in no way can interact with you in this state) doing so. That will cover any UpB angle towards the ledge.
Yet another option is to wait on the edge of the stage and time a Downsmash right as they come flying with the UpB. This is not easy to time right. You might be more successfull if you charge the Downsmash.
If they are right at stage height they are likely to sideB to the Ledge. It's very hard to react to, but a well timed Downsmash will make sure they are sent out and you'll find them below the stage after the hit.
A simpler option to cover this is to shoot a standing needle.
Above stage level is the hardest part. It becomes alot easier if you know (read) they will recover from high though.
Full Jump (FJ) backwards (from the edge of the stage) and put your Bair out is very likely to hit. Likewise a full speed FJ Fair might catch them.
I am still not very good at edge guarding spacies who recover from high. So hopefully other people can add to this.