Uhm, what space are you taking the median over? As in, the median number of people within a mile of a given person? Or is it over area? Because in the latter case it's not really useful if your area is poorly defined: it might include lots of empty space and also lots of people, e.g. it might be LA County. I don't feel like thinking right now about what the first variant might yield.
In any case this might be hard partly because some census blocks are very large.
The idea is to calculate the number of people within an area (say one square mile) for every person within a geography. The problem in a place like L.A. County would be the amount of processing power required to calculate it for each block, which would then be represented proportionally to the number of people in that block. Like, if a block had 50 people on it, and blocks within a square mile had 6,000, it would count for the overall average as 50 people who had 6,000 people within a square mile -- since blocks are the lowest level of data, we'd be forced to act like they all inhabit the same area.
The idea here would be that this would better represent the actual density experienced by the population. As it stands, density calculations of areas including non-residential areas give a misleading portrait of density. If a city annexes an industrial park, its density goes down, but does the density of its
population really go down? Population density is only demographically useful when it tells you what density a given resident of a geography experiences. As it stands, population density just tells you what that would be like if every resident of the geography spread themselves out equidistantly.
(Census
tracts are very large population-wise. Census blocks are...well, a block, or in rural areas, whatever is contiguous without a road or body of water.)