For the most part it isn't really that big of a problem, a small percentage of mesh blocks have multiple zones in them, but there are over 20000 with 2 and less than 5000 with more than 3.
I go this data via this
df_zone = pd.read_sql(text("""
SELECT mb.mb_code, COUNT(DISTINCT p.zone_code) as zones
FROM abs_main_structures.meshblock mb
LEFT JOIN gnaf.MB_2021 gmb ON gmb.mb_2021_code = mb.mb_code
LEFT JOIN gnaf.ADDRESS_MESH_BLOCK_2021 gmb21 ON gmb21.mb_2021_pid = gmb.mb_2021_pid
LEFT JOIN gnaf.ADDRESS_DETAIL ad ON ad.address_detail_pid = gmb21.address_detail_pid
INNER JOIN nsw_valuer_general.land_parcel_link lp ON lp.land_parcel_id = ad.legal_parcel_id
LEFT JOIN nsw_valuer_general.property p ON p.property_id = lp.property_id
GROUP BY mb.mb_code
HAVING COUNT(DISTINCT p.zone_code) > 0
ORDER BY zones DESC
"""), engine)
plt.hist(df_zone['zones'], bins=10)
plt.xlabel('Zones in Meshblock')
plt.show()
df_zone.head()
Long term soultion
We should probably load planning all property boundaries as shapefiles tbh #8
While the ABS tries to ensure mesh blocks don't have multiple zones, it's not really a criteria and there are definitely mesh blocks with multiple zones.
To what extent is this a problem?
For the most part it isn't really that big of a problem, a small percentage of mesh blocks have multiple zones in them, but there are over 20000 with 2 and less than 5000 with more than 3.
I go this data via this
Long term soultion
We should probably load planning all property boundaries as shapefiles tbh #8