-- DBMS: bigquery
CREATE TABLE `bigquery-public-data.sdoh_hud_housing.2017_lihtc_database_hud`
(
  hud_id STRING OPTIONS(description="Unique Project Identifier for the Database — characters 1-3: Allocating agency code (see table below) digits 4-7: Year placed in service (0000 or 0001 if unknown or missing) digit 8: Number of years property was added to database after initial request, e.g. 1= 2015 property reported to HUD with 2016 update (0 if property added to DB prior to 2015 update) digits 9-11: Record number within allocating agency and year placed in service;* Note: Beginning with the 2015 database update, digit 8 (see variable definition) was added to HUD_ID."),
  project STRING OPTIONS(description="Project name"),
  proj_add STRING OPTIONS(description="Project street address"),
  proj_cty STRING OPTIONS(description="Project city"),
  proj_st STRING OPTIONS(description="Project state"),
  proj_zip STRING OPTIONS(description="Project zip"),
  state_id STRING OPTIONS(description="State-defined Project ID"),
  contact STRING OPTIONS(description="Owner or owner's contact"),
  company STRING OPTIONS(description="Name of contact company"),
  co_add STRING OPTIONS(description="Contact's business address"),
  co_cty STRING OPTIONS(description="Contact's city"),
  co_st STRING OPTIONS(description="Contact's state"),
  co_zip STRING OPTIONS(description="Contact's zip"),
  co_tel STRING OPTIONS(description="Contact's telephone"),
  latitude FLOAT64 OPTIONS(description="Latitude: Degrees Decimal"),
  longitude FLOAT64 OPTIONS(description="Longitude: Negative Degrees Decimal -- GIS Mapping Convention"),
  reg INT64 OPTIONS(description="Census Region; 1=Northeast 2=Midwest 3=South 4=West"),
  msa STRING OPTIONS(description="MSA/PMSA Number (1999)"),
  cbsa STRING OPTIONS(description="Core Based Statistical Area (CBSA) Lowest Level Code"),
  placece STRING OPTIONS(description="Census Place Code (1990)"),
  placefp STRING OPTIONS(description="FIPS Place Code (2000)"),
  place2010 STRING OPTIONS(description="FIPS Place Code (2010)"),
  cosubcur STRING OPTIONS(description="County Subdivision Code (Minor Civil Division/ Census Civil Division)"),
  fips1990 STRING OPTIONS(description="Unique 1990 Census Tract ID -- digits 1-2: State FIPS Code digits 3-5: County FIPS Code digits 6-11: Census Tract Number (no decimal point included)"),
  st1990 STRING OPTIONS(description="1990 State FIPS Code"),
  cnty1990 STRING OPTIONS(description="1990 County FIPS Code"),
  trct1990 STRING OPTIONS(description="1990 Census Tract Number"),
  fips2000 STRING OPTIONS(description="Unique 2000 Census Tract ID -- digits 1-2: State FIPS Code digits 3-5: County FIPS Code digits 6-11: Census Tract Number (no decimal point included)"),
  st2000 STRING OPTIONS(description="2000 State FIPS Code"),
  cnty2000 STRING OPTIONS(description="2000 County FIPS Code"),
  trct2000 STRING OPTIONS(description="2000 Census Tract Number"),
  fips2010 STRING OPTIONS(description="Unique 2010 Census Tract: Digits 1-2: State FIPS Code Digits 3-5: County FIPS Code Digits 6-11: Census Tract Number (decimal point excluded)"),
  st2010 STRING OPTIONS(description="2010 State FIPS Code"),
  cnty2010 STRING OPTIONS(description="2010 County FIPS Code"),
  trct2010 STRING OPTIONS(description="2010 Census Tract Number"),
  scattered_site_cd INT64 OPTIONS(description="Scattered Site Property; 1=Yes 2=No"),
  resyndication_cd INT64 OPTIONS(description="Resyndicated Property; 1=Yes 2=No"),
  allocamt FLOAT64 OPTIONS(description="Annual dollar amount of tax credits allocated"),
  n_units INT64 OPTIONS(description="Total number of units"),
  li_units INT64 OPTIONS(description="Total number of low income units"),
  n_0br INT64 OPTIONS(description="Number of efficiencies"),
  n_1br INT64 OPTIONS(description="Number of 1-bedroom units"),
  n_2br INT64 OPTIONS(description="Number of 2-bedroom units"),
  n_3br INT64 OPTIONS(description="Number of 3-bedroom units"),
  n_4br INT64 OPTIONS(description="Number of 4-bedroom units"),
  inc_ceil INT64 OPTIONS(description="Elected rent/income ceiling for low income units;1=50% AMGI 2=60% AMGI 3=Not Reported"),
  low_ceil INT64 OPTIONS(description="Units set aside with rents lower than elected rent/income ceiling;1=Yes 2=No"),
  ceilunit INT64 OPTIONS(description="Number of units set aside with rents lower than elected rent/income ceiling"),
  yr_pis STRING OPTIONS(description="Year placed in service; 1987-2016=year placed in service 8888=placed in service status not confirmed 9999=placed in service status confirmed, but placed in service year missing"),
  yr_alloc STRING OPTIONS(description="Allocation year"),
  non_prof INT64 OPTIONS(description="Non-profit sponsor;1=Yes 2=No"),
  basis INT64 OPTIONS(description="Increase in eligible basis; 1=Yes 2=No"),
  bond INT64 OPTIONS(description="Tax-exempt bond received; 1=Yes 2=No"),
  mff_ra INT64 OPTIONS(description="HUD Multi-Family financing/rental assistance; 1=Yes 2=No"),
  fmha_514 INT64 OPTIONS(description="FmHA (RHS) Section 514 loan; 1=Yes 2=No"),
  fmha_515 INT64 OPTIONS(description="FmHA (RHS) Section 515 loan; 1=Yes 2=No"),
  fmha_538 INT64 OPTIONS(description="FmHA (RHS) Section 538 loan; 1=Yes 2=No"),
  home INT64 OPTIONS(description="HOME Investment Partnership Program funds; 1=Yes 2=No"),
  home_amt INT64 OPTIONS(description="Dollar amount of HOME funds"),
  tcap INT64 OPTIONS(description="Tax Credit Assistance Program (TCAP) funds;1=Yes 2=No"),
  tcap_amt FLOAT64 OPTIONS(description="TCAP Amount"),
  cdbg INT64 OPTIONS(description="Community Development Block Grant (CDBG) funds;1=Yes 2=No"),
  cdbg_amt INT64 OPTIONS(description="Dollar amount of CDBG funds"),
  fha INT64 OPTIONS(description="FHA-insured loan;1=Yes 2=No"),
  hopevi INT64 OPTIONS(description="Forms part of a HOPEVI development;1=Yes 2=No"),
  hpvi_amt INT64 OPTIONS(description="Dollar amount of HOPEVI funds for development or building costs"),
  tcep INT64 OPTIONS(description="Tax Credit Exchange Program (TCEP) Funds;1=Yes 2=No"),
  tcep_amt FLOAT64 OPTIONS(description="Dollar amount of TCEP funds"),
  rentassist INT64 OPTIONS(description="Federal or state project-based rental assistance contract;1=Federal 2=State 3=Both Federal and State 4=Neither 5=Unknown whether Federal or State"),
  trgt_pop INT64 OPTIONS(description="Targets a specific population with specialized services or facilities;1=Yes 2=No"),
  trgt_fam STRING OPTIONS(description="Targets a specific population – families;1=Yes 2=No 0 or blank = Not indicated"),
  trgt_eld STRING OPTIONS(description="Targets a specific population – elderly;1=Yes 2=No 0 or blank = Not indicated"),
  trgt_dis STRING OPTIONS(description="Targets a specific population – disabled;1=Yes 2=No 0 or blank = Not indicated"),
  trgt_hml STRING OPTIONS(description="Targets a specific population – homeless;1=Yes 2=No 0 or blank = Not indicated"),
  trgt_other STRING OPTIONS(description="Targets a specific population – other;1=Yes 2=No 0 or blank = Not indicated"),
  trgt_spc STRING OPTIONS(description="Targets a specific population – other as specified"),
  type INT64 OPTIONS(description="Type of construction;1=New construction 2=Acquisition and Rehab 3=Both new construction and A/R 4=Existing"),
  credit INT64 OPTIONS(description="Type of credit percentage;1=30 percent present value 2=70 percent present value 3=Both 4=TCEP only"),
  n_unitsr INT64 OPTIONS(description="Total number of units or if total units missing or inconsistent, total low-income units"),
  li_unitr INT64 OPTIONS(description="Total number of low income units or if total low-income units missing, total units"),
  metro INT64 OPTIONS(description="Is the census tract metro or non-metro?;1=Metro/Non-Central City 2=Metro/Central City 3=Non-Metro"),
  dda INT64 OPTIONS(description="Is the census tract in a difficult development area? (DDA status is based on placed in service year.);0=Not in DDA 1=In Metro DDA 2=In Non-Metro DDA 3=In Metro GO Zone DDA 4=In Non-Metro GO Zone DDA"),
  qct INT64 OPTIONS(description="Is the census tract a qualified census tract? (For projects placed in service prior to 2003, QCT is based on 1990 Census tract. For projects placed in service since 2003, QCT is based on 2000 Census tract.);1=In a qualified tract 2=Not in a qualified tract"),
  nonprog STRING OPTIONS(description="No longer monitored for LIHTC program due to expired use or other reason (Status of no longer being monitored for the LIHTC Program is indicated for projects as specified by the allocating agency. This does not indicate whether or not a project remains affordable to low income populations.); 1=Yes"),
  datanote STRING OPTIONS(description="Notes about data record changes processed for database update."),
  record_status STRING OPTIONS(description="Record Status compared to previous version of LIHTC database;N=New U=Updated X=Existing (Unchanged from previous DB version)"),
  x FLOAT64,
  y FLOAT64,
  z FLOAT64,
  yrmisflg INT64
)
OPTIONS(
  description="This is a list of all of the housing units that are covered by HUDs LITC program from the mid-1980s through 2017.",
  labels=[("freebqcovid", "")]
);

INSERT INTO `bigquery-public-data.sdoh_hud_housing.2017_lihtc_database_hud` (hud_id, project, proj_add, proj_cty, proj_st, proj_zip, state_id, contact, company, co_add, co_cty, co_st, co_zip, co_tel, latitude, longitude, reg, msa, cbsa, placece, placefp, place2010, cosubcur, fips1990, st1990, cnty1990, trct1990, fips2000, st2000, cnty2000, trct2000, fips2010, st2010, cnty2010, trct2010, scattered_site_cd, resyndication_cd, allocamt, n_units, li_units, n_0br, n_1br, n_2br, n_3br, n_4br, inc_ceil, low_ceil, ceilunit, yr_pis, yr_alloc, non_prof, basis, bond, mff_ra, fmha_514, fmha_515, fmha_538, home, home_amt, tcap, tcap_amt, cdbg, cdbg_amt, fha, hopevi, hpvi_amt, tcep, tcep_amt, rentassist, trgt_pop, trgt_fam, trgt_eld, trgt_dis, trgt_hml, trgt_other, trgt_spc, type, credit, n_unitsr, li_unitr, metro, dda, qct, nonprog, datanote, record_status, x, y, z, yrmisflg) VALUES ('CTA20150006', 'PALMERS SQUARE', '26 Palmers Hill', 'Stamford', 'CT', '6902', 'CT-09-021', 'Vincent Tufo', 'Palmer Square Housing Development Llc, C/O Charter Oak Communities', '22 Clinton Avenue - Suite 101', 'Stamford', 'CT', '6901', '203-977-1400', 41.058919, -73.561044, 1, '8040', '14860', NULL, '73000', '73000', '73070', NULL, NULL, NULL, NULL, '9001021400', '9', '0', '21400', '9001021400', '9', '1', '21400', 2, NULL, 9232487.0, 76, 46, 0, 8, 50, 18, 0, 2, NULL, NULL, '2015', '2009', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 8722487.0, 2, 0, NULL, NULL, 0, 2, 0.0, 4, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 3, 2, 76, 46, 1, 0, 2, NULL, NULL, 'X', 0.213386982679367, -0.72321093082428, 0.656834781169891, 0), ('NEA20110817', 'REESE ESTATES', '11510 N 142nd St', 'Waverly', 'NE', '68462', '7-0728', 'Matt Thomas', 'Dana Point Development Corp', 'Po Box 1808', 'Turlock', 'CA', '95381', '209-634-0044', 40.923385, -96.529339, 2, '4360', '30700', '2585', '12280', NULL, '93370', '31109010100', '31', '109', '101', '31109010100', '31', '109', '101', '31109010100', '31', '109', '10100', 2, NULL, 228572.0, 15, 15, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2011', '2009', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, 1050158.0, NULL, NULL, NULL, NULL, NULL, 1, 59207.0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15, 15, 2, 0, 2, NULL, NULL, 'X', -0.0859191939234734, -0.750685274600983, 0.655049264431, 0), ('NEA20100806', 'WESTERN MANOR', '2210 W Q St', 'Lincoln', 'NE', '68528', '7-0720', 'Melissa Clayton', 'Western Manor Lp', '1999 Broadway, Ste 1000', 'Denver', 'CO', '80202', '303-830-6207', 40.815791, -96.752288, 2, '4360', '30700', '1425', '28000', NULL, '91753', '31109003300', '31', '109', '33', '31109003300', '31', '109', '33', '31109003301', '31', '109', '3301', 2, NULL, 529654.0, 82, 82, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2010', '2009', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, 490034.0, NULL, NULL, NULL, NULL, NULL, 2, 0.0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 82, 82, 2, 0, 2, NULL, NULL, 'X', -0.0889840722084045, -0.751565515995026, 0.653629183769226, 0), ('NEA20100810', 'NORTHGLEN APTS', '1503 Knox St', 'Lincoln', 'NE', '68521', '7-0718', 'Melissa Clayton', 'Northglen Lp', '1999 Broadway, Ste 1000', 'Denver', 'CO', '80202', '303-830-6207', 40.844161, -96.698938, 2, '4360', '30700', '1425', '28000', NULL, '91753', '31109003000', '31', '109', '30', '31109003003', '31', '109', '30.03', '31109003003', '31', '109', '3003', 2, NULL, 421588.0, 60, 60, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2010', '2009', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, 926956.0, NULL, NULL, NULL, NULL, NULL, 2, 0.0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 60, 60, 2, 0, 2, NULL, NULL, 'X', -0.0882464572787285, -0.751326501369476, 0.654003858566284, 0), ('NEA20110819', 'PROGRESS FOR PEOPLE II', '1730 Montini Dr', 'Lincoln', 'NE', '68521', '7-0723', 'Christopher Kubat', 'Progress For People Ii Llc', '2241 O St', 'Lincoln', 'NE', '68510', '402-474-1600', 40.856732, -96.695136, 2, '4360', '30700', '1425', '28000', NULL, '91753', '31109003000', '31', '109', '30', '31109003003', '31', '109', '30.03', '31109003003', '31', '109', '3003', 2, NULL, 521963.0, 24, 21, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2011', '2009', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, 777932.0, NULL, NULL, NULL, NULL, NULL, 2, 0.0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 24, 21, 2, 0, 2, NULL, NULL, 'X', -0.0881798714399338, -0.751189827919006, 0.654169857501984, 0);