Can also recommend this book so far (I’m still working my way through it).

Unlocking the Groove by Mark Butler.
http://www.iupress.indiana.edu/product_info.php?products_id=22615

It gets pretty technical for someone without any music theory background (like me), but it breaks down what defines many of the original genres, and key tracks/rhythmical passages on a structural level.

And don’t be put off by the use of the acronym EDM! He is referring to all genres of dance music made on electronic machines, not the neon, commercialised plague that has consumed America of late.