Downloads the raw data files necessary to analyze Houston buildings found within flood zones.
import pandas as pd
import geopandas as gpd
import warnings
warnings.simplefilter("ignore")
Download a list of all buildings published by the Harris County Appraisal District, as well as their tax districts
!curl -o input/Real_building_land.zip http://pdata.hcad.org/download/2017/Real_building_land.zip
!curl -o input/Real_jur_exempt.zip http://pdata.hcad.org/download/2017/Real_jur_exempt.zip
% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 221M 100 221M 0 0 1163k 0 0:03:15 0:03:15 --:--:-- 2283k
After unzipping, convert them to CSVs.
res = pd.read_csv(
"input/Real_building_land/building_res.txt",
delimiter="\t",
dtype={"ACCOUNT": str},
names=[
'ACCOUNT',
'USE_CODE',
'BUILDING_NUMBER',
'IMPRV_TYPE',
'BUILDING_STYLE_GUIDE',
'CLASS_STRUCTURE',
'CLASS_STRUCTURE_DESRICPTION',
'DEPRECIATION_VALUE',
'CAMA_REPLACEMENT_COST',
'ACCRUED_DEPR_PCT',
'QUALITY',
'QUALITY_DESCRIPTION',
'DATE_ERECTED',
'EFFECTIVE_DATE',
'YR_REMODEL',
'YR_ROLL',
'APPRAISED_BY',
'APPRAISED_DATE',
'NOTE',
'IMPR_SQ_FT',
'ACTUAL_AREA',
'HEAT_AREA',
'GROSS_AREA',
'EFFECTIVE_AREA',
'BASE_AREA',
'PERIMETER',
'PERCENT_COMPLETE',
'NBDH_FACTOR',
'RCNLD',
'SIZE_INDEX',
'LUMP_SUM_ADJ'
]
)
jur = pd.read_csv(
"input/Real_jur_exempt/jur_value.txt",
delimiter="\t",
dtype={"ACCOUNT": str, 'TAX_DISTRICT': str},
names=[
"ACCOUNT",
"TAX_DISTRICT",
"TYPE",
"PERCENT_IN_DISTRICT",
"APPRAISED_VALUE",
"TAXABLE_VALUE"
]
)
res['ACCOUNT'] = res.ACCOUNT.str.strip()
jur['ACCOUNT'] = jur.ACCOUNT.str.strip()
res.to_csv("input/building_res.csv", index=False)
jur.to_csv("input/jur_value.csv", index=False)
Download a map of the parcels where the buildings sit from the same source.
!curl -o input/Parcels.exe http://pdata.hcad.org/GIS/Parcels.exe
% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 345M 100 345M 0 0 1240k 0 0:04:44 0:04:44 --:--:-- 1281k 3 10.6M 0 0 1292k 0 0:04:33 0:00:08 0:04:25 1505k 0 1372k 0 0:04:17 0:03:08 0:01:09 2216k
Download the flood zones from FEMA here