Giter Club home page Giter Club logo

census-tract-geocoding-external-module's People

Contributors

chemikyle avatar kcmcg avatar mmcev106 avatar victrserveradmins avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

chemikyle

census-tract-geocoding-external-module's Issues

Most TigerWeb data keys are unable to be populated

Due to the module only sourcing its data from the "Census Blocks" key, the majority of the TigerWeb data keys are likely to always be absent from the lookupTable

var lookupTable = data['result']['addressMatches'][0]['geographies']['Census Blocks'][0];

e.g. the CSA key is only available under Combined Statistical Areas; perhaps the API worked differently when this module was created.

A solution to this issue might be to populate lookupTable by checking each key for geographies in reverse order until a value is found.
Although this particular solution doesn't hold for values only contained in addressComponents (i.e. zip). Additionally, it's not a simple problem to report the geographic bound which the data was sourced from as these data may be piped into validated fields.


JSON response for 2020 data, links to API
{
  "result": {
    "input": {
      "address": {
        "address": "2201 West End Ave, Nashville, TN 37235"
      },
      "vintage": {
        "isDefault": false,
        "id": "420",
        "vintageName": "Census2020_Current",
        "vintageDescription": "Census2020 Vintage - Current Benchmark"
      },
      "benchmark": {
        "isDefault": true,
        "benchmarkDescription": "Public Address Ranges - Current Benchmark",
        "id": "4",
        "benchmarkName": "Public_AR_Current"
      }
    },
    "addressMatches": [
      {
        "tigerLine": {
          "side": "L",
          "tigerLineId": "647614301"
        },
        "geographies": {
          "2018 State Legislative Districts - Upper": [
            {
              "POP100": 234648,
              "GEOID": "47021",
              "CENTLAT": "+36.1014194",
              "AREAWATER": 22266480,
              "STATE": "47",
              "BASENAME": "21",
              "OID": "212704487270825",
              "LSADC": "LU",
              "SLDU": "021",
              "FUNCSTAT": "N",
              "INTPTLAT": "+36.1010901",
              "NAME": "State Senate District 21",
              "OBJECTID": 177,
              "CENTLON": "-086.6883112",
              "LSY": "2018",
              "AREALAND": 240041777,
              "INTPTLON": "-086.6865778",
              "HU100": 102902,
              "MTFCC": "G5210",
              "LDTYP": "O"
            }
          ],
          "States": [
            {
              "STATENS": "01325873",
              "POP100": 6910840,
              "GEOID": "47",
              "CENTLAT": "+35.8582545",
              "AREAWATER": 2344232327,
              "STATE": "47",
              "BASENAME": "Tennessee",
              "STUSAB": "TN",
              "OID": "2747051118086",
              "LSADC": "00",
              "FUNCSTAT": "A",
              "INTPTLAT": "+35.8584600",
              "DIVISION": "6",
              "NAME": "Tennessee",
              "REGION": "3",
              "OBJECTID": 13,
              "CENTLON": "-086.3490839",
              "AREALAND": 106770495857,
              "INTPTLON": "-086.3496339",
              "HU100": 3031605,
              "MTFCC": "G4000",
              "UR": "M"
            }
          ],
          "Combined Statistical Areas": [
            {
              "POP100": 2118233,
              "GEOID": "400",
              "CENTLAT": "+35.9686285",
              "AREAWATER": 204133347,
              "BASENAME": "Nashville-Davidson--Murfreesboro, TN",
              "OID": "2617013782255192",
              "LSADC": "M0",
              "FUNCSTAT": "S",
              "INTPTLAT": "+35.9686460",
              "NAME": "Nashville-Davidson--Murfreesboro, TN CSA",
              "OBJECTID": 8,
              "CSA": "400",
              "CENTLON": "-086.7044433",
              "INTPTLON": "-086.7069821",
              "AREALAND": 18533025506,
              "HU100": 880654,
              "MTFCC": "G3100"
            }
          ],
          "2020 Urban Areas - Corrected": [
            {
              "GEOID": "61273",
              "CENTLAT": "+36.1264038",
              "AREAWATER": 13731644,
              "BASENAME": "Nashville-Davidson, TN",
              "OID": "27021134432064",
              "UA": "61273",
              "LSADC": "67",
              "FUNCSTAT": "S",
              "INTPTLAT": "+36.1259094",
              "NAME": "Nashville-Davidson, TN Urban Area",
              "OBJECTID": 281,
              "CENTLON": "-086.6924185",
              "AREALAND": 1514962957,
              "INTPTLON": "-086.6911686",
              "MTFCC": "G3500"
            }
          ],
          "County Subdivisions": [
            {
              "COUSUB": "93268",
              "POP100": 17991,
              "GEOID": "4703793268",
              "CENTLAT": "+36.1324166",
              "AREAWATER": 0,
              "STATE": "47",
              "BASENAME": "18",
              "OID": "276702969536411",
              "LSADC": "28",
              "FUNCSTAT": "N",
              "INTPTLAT": "+36.1324166",
              "NAME": "District 18",
              "OBJECTID": 25242,
              "CENTLON": "-086.8039191",
              "COUSUBCC": "Z1",
              "AREALAND": 6351030,
              "INTPTLON": "-086.8039191",
              "HU100": 6227,
              "MTFCC": "G4040",
              "COUSUBNS": "02464407",
              "UR": "U",
              "COUNTY": "037"
            }
          ],
          "Incorporated Places": [
            {
              "DISP_CLR": 4,
              "NECTAPCI": "N",
              "POP100": 689447,
              "GEOID": "4752006",
              "CENTLAT": "+36.1713872",
              "AREAWATER": 55980697,
              "BASENAME": "Nashville-Davidson metropolitan government (balance)",
              "STATE": "47",
              "OID": "27870134387655",
              "LSADC": "00",
              "INTPTLAT": "+36.1718001",
              "PLACE": "52006",
              "FUNCSTAT": "F",
              "NAME": "Nashville-Davidson metropolitan government (balance)",
              "OBJECTID": 12164,
              "PLACECC": "C8",
              "CENTLON": "-086.7841719",
              "CBSAPCI": "Y",
              "AREALAND": 1232288496,
              "HU100": 316363,
              "INTPTLON": "-086.7850016",
              "PLACENS": "02405092",
              "MTFCC": "G4110",
              "UR": "M"
            }
          ],
          "Counties": [
            {
              "POP100": 715884,
              "GEOID": "47037",
              "CENTLAT": "+36.1694525",
              "AREAWATER": 56439483,
              "STATE": "47",
              "BASENAME": "Davidson",
              "OID": "27570134377631",
              "LSADC": "06",
              "FUNCSTAT": "C",
              "INTPTLAT": "+36.1691287",
              "NAME": "Davidson County",
              "OBJECTID": 1809,
              "CENTLON": "-086.7847147",
              "COUNTYCC": "H6",
              "COUNTYNS": "01639737",
              "AREALAND": 1304577371,
              "INTPTLON": "-086.7847898",
              "HU100": 328309,
              "MTFCC": "G4020",
              "UR": "M",
              "COUNTY": "037"
            }
          ],
          "2018 State Legislative Districts - Lower": [
            {
              "POP100": 69925,
              "GEOID": "47055",
              "CENTLAT": "+36.1317908",
              "SLDL": "055",
              "AREAWATER": 555470,
              "STATE": "47",
              "BASENAME": "55",
              "OID": "213704487271044",
              "LSADC": "LL",
              "FUNCSTAT": "N",
              "INTPTLAT": "+36.1315419",
              "NAME": "State House District 55",
              "OBJECTID": 1963,
              "CENTLON": "-086.8633605",
              "LSY": "2018",
              "AREALAND": 58072372,
              "INTPTLON": "-086.8642735",
              "HU100": 34157,
              "MTFCC": "G5220",
              "LDTYP": "O"
            }
          ],
          "116th Congressional Districts": [
            {
              "POP100": 800247,
              "GEOID": "4705",
              "CENTLAT": "+36.1771610",
              "CDSESSN": "116",
              "AREAWATER": 71798552,
              "STATE": "47",
              "BASENAME": "5",
              "OID": "211704487269645",
              "LSADC": "C2",
              "FUNCSTAT": "N",
              "INTPTLAT": "+36.1873306",
              "NAME": "Congressional District 5",
              "OBJECTID": 114,
              "CENTLON": "-087.0699203",
              "AREALAND": 3233151436,
              "INTPTLON": "-087.0740252",
              "HU100": 363163,
              "CD116": "05",
              "MTFCC": "G5200"
            }
          ],
          "Census Tracts": [
            {
              "POP100": 4812,
              "GEOID": "47037016500",
              "CENTLAT": "+36.1456055",
              "AREAWATER": 0,
              "STATE": "47",
              "BASENAME": "165",
              "OID": "20770215796597",
              "LSADC": "CT",
              "FUNCSTAT": "S",
              "INTPTLAT": "+36.1456055",
              "NAME": "Census Tract 165",
              "OBJECTID": 57178,
              "TRACT": "016500",
              "CENTLON": "-086.8050100",
              "AREALAND": 1494439,
              "INTPTLON": "-086.8050100",
              "HU100": 1094,
              "MTFCC": "G5020",
              "UR": "U",
              "COUNTY": "037"
            }
          ],
          "Census Blocks": [
            {
              "GEOID": "470370165002000",
              "STATE": "47",
              "BASENAME": "2000",
              "LSADC": "BK",
              "INTPTLAT": "+36.1463730",
              "OBJECTID": 664024,
              "BLKGRP": "2",
              "AREALAND": 354033,
              "HU100": 3,
              "VINTAGE": "70",
              "LWBLKTYP": "L",
              "UR": "U",
              "COUNTY": "037",
              "SUFFIX": "",
              "TABBLKSUFX2": "",
              "POP100": 1906,
              "CENTLAT": "+36.1463730",
              "BLOCK": "2000",
              "AREAWATER": 0,
              "OID": "210701007549205",
              "FUNCSTAT": "S",
              "NAME": "Block 2000",
              "TRACT": "016500",
              "CENTLON": "-086.8023381",
              "ACT": "",
              "INTPTLON": "-086.8023381",
              "MTFCC": "G5040"
            }
          ]
        },
        "coordinates": {
          "x": -86.80349503726946,
          "y": 36.14929681521341
        },
        "addressComponents": {
          "zip": "37240",
          "streetName": "END",
          "preType": "",
          "city": "NASHVILLE",
          "preDirection": "W",
          "suffixDirection": "",
          "fromAddress": "2201",
          "state": "TN",
          "suffixType": "AVE",
          "toAddress": "2299",
          "suffixQualifier": "",
          "preQualifier": ""
        },
        "matchedAddress": "2201 W END AVE, NASHVILLE, TN, 37240"
      }
    ]
  }
}

Data examples:
2020
https://geocoding.geo.census.gov/geocoder/geographies/onelineaddress?address=2201%20West%20End%20Ave%2C%20Nashville%2C%20TN%2037235&benchmark=Public_AR_Current&vintage=Census2020_Current&format=json

2010
https://geocoding.geo.census.gov/geocoder/geographies/onelineaddress?address=2201%20West%20End%20Ave%2C%20Nashville%2C%20TN%2037235&benchmark=Public_AR_Current&vintage=Census2010_Current&format=json

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.