CityOfPhiladelphia / ais

Address Information System
19 stars 8 forks source link

New /search response #72

Closed bertday closed 7 years ago

bertday commented 7 years ago

MATCH TYPES

sample response:

{
  "search_type": "address", TODO
  "search_params": { TODO

  },
  "query": "1769 frankford ave",
  "normalized": "1769 FRANKFORD AVE",
  "page": 1,
  "page_count": 1,
  "page_size": 1,
  "total_size": 1,
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "match_type": TODO (exact/base_address/unit_child/unit_sibling/unmatched)
      "ais_feature_type": "address",
      "properties": {
        "street_address": "1769 FRANKFORD AVE",
        "address_low": 1769,
        "address_low_suffix": "",
        "address_low_frac": "",
        "address_high": null,
        "street_predir": "",
        "street_name": "FRANKFORD",
        "street_suffix": "AVE",
        "street_postdir": "",
        "unit_type": "",
        "unit_num": "",
        "street_full": "FRANKFORD AVE",
        "street_code": 34960,
        "seg_id": 543011,
        "zip_code": "19125",
        "zip_4": "2422",
        "usps_bldgfirm": "",
        "usps_type": "S",
        "election_block_id": "24010847",
        "election_precinct": "1810",
        "pwd_parcel_id": "128133",
        "dor_parcel_id": null,
        "li_address_key": "748166",
        "pwd_account_nums": [
          "3496001769001"
        ],
        "opa_account_num": null,
        "opa_owners": null,
        "opa_address": null,
        "geom_type": "centroid",
        "geom_source": "pwd_parcel",
        "center_city_district": "",
        "cua_zone": "Asociaci\u00f3n Puertorrique\u00f1os en Marcha for Everyon",
        "li_district": "North",
        "philly_rising_area": "",
        "census_tract_2010": "015800",
        "census_block_group_2010": "1",
        "census_block_2010": "1009",
        "council_district_2016": "5",
        "political_ward": "18",
        "political_division": "1810",
        "planning_district": "River Wards",
        "elementary_school": "Adaire",
        "middle_school": "Adaire",
        "high_school": "Penn Treaty",
        "zoning": "RM1",
        "police_division": "EPD",
        "police_district": "26",
        "police_service_area": "263",
        "recreation_district": "6",
        "rubbish_recycle_day": "FRI",
        "recycling_diversion_rate": 0.062,
        "leaf_collection_area": "Saturday Bag Dropoff",
        "sanitation_area": "3",
        "sanitation_district": "3F",
        "historic_street": "",
        "highway_district": "3",
        "highway_section": "3F",
        "highway_subsection": "3F10",
        "traffic_district": "1",
        "traffic_pm_district": "1212",
        "street_light_route": "48",
        "pwd_maint_district": "3E",
        "pwd_pressure_district": "TLS",
        "pwd_treatment_plant": "BAXTER",
        "pwd_water_plate": "39",
        "pwd_center_city_district": "",
        "related_addresses": [  TODO
          {
            "address": "",
            "relationship": "range_child/range_parent/base_address/same_unit"
          },
          ...
        ]
      },
      "geometry": {
        "geocode_type": "",
        "type": "Point",
        "coordinates": [
          -75.131696154867,
          39.976398436979
        ]
      }
    }
  ]
}
bertday commented 7 years ago

See #74 for one possible algorithm for getting related addresses on the fly.