Economic complexity theory and applications