The matter distribution in the local Universe as derived from galaxy