How to calculate the checksum of an extended public key?
it seems like the process to calculate a checksum for an extended key is to decode the base58 string to data, 


If raw_xpub = version + depth + fingerprint + child + chain + DATA
than to make the checksum you need to do doublehash of xpriv/xpub (sha256), in python:

hashed_xpub = hashlib.sha256(raw_xpub).digest()
hashed_xpub = hashlib.sha256(hashed_xpub).digest()


and then take the checksum as first 4 characters (0 to 3) and add it at the end of the raw xpub:

raw_xpub += hashed_xpub[:4]


Finally, run it through Base58 to encode it. I think you've might performed base58 operation too early based on your question. It's the last step in the process.