The UsTract2010 Database provides the tract (or equivalent) within the United States for a given location (latitude and longitude).
A census tract is a statistical subdivision of a US county subdivision used by the US Census Bureau to collect statistics about local residents. Census tracts are typically about 2 square miles and contain roughly 4,000 people.
Census tracts are part of the USCensus Bureau's strict organizational hierarchichy in which the territory of the United States is recursively subdivided into states, counties, county subdivisions, census tracts, census block groups, and census blocks.
Using the UsTract2010 Database is simple: you give latitude and longitude and the Database returns the tract's name, and several other identifying codes and basic statistics. It also returns more than 200 key demographic variables from the 2010 US Census and the related 5-year American Community Survey, including detailed information on the age, sex, race, employment, educational attainment, marital status, and income of the residents, as well as information about households, property values, and mortgage status. For a complete listing of the data returned, please see the Returned Values Section below.
This Database is based on data from the United States Census Bureau. In addition to repackaging that data in an easy-to-use format for Web developers and Java and .NET programmers, Ask Geo also adds a high-performance spatial index that allows for extremely low-latency queries. Please see the Performance Section below for details on how fast this Database is.
As with most of the Databases constructed from data from the US Census, the Database's map comes in a low-fidelity and a high-fidelity version. The low-fidelity versions are faster to build and query and require less memory but are less geographically accurate. The high-fidelity versions have a smaller maximum geographical error and properly deal with the boundaries that occur over water, such as with coastal states and states touching the Great Lakes.
Note that the fidelity only pertains to the geographic accuracy of the map, not to the values in the data returned. So in the low-fidelity version, when you're close to a boundary, it may give you the data for the neighboring region, but it'll give you the correct data for the region actually picked.
When you buy a license you get access to both versions, so you can use whichever one you prefer.
The map below was generated from the low-fidelity version of the UsTract2010 Database.
The map below was generated from the high-fidelity version of the UsTract2010 Database.
The Low Fidelity map is based on the US Census cartographic boundary map and the High Fidelity map is based on the internationally accepted borders and divisions of interior lakes.
The High Fidelity map may look simpler when zoomed out since it follows the borders as opposed to the coastlines, but it is sampled with much higher accuracy in the details.
The colors for each tract have been selected randomly to provide contrast, but consistently between the two versions to allow for easy comparison.
Please also note that for locations not inside any tract the Database returns the nearest tract up to 20 km away. This "snap-to" distance is fixed for the Web API but can be customized by users of the Ask Geo Java and .NET Libraries.
Please note that the Web API is based on the low-fidelity version.
The UsTract2010 Database consists of 73,803 tracts (72,891 of which are populated) with the following statistical characteristics:
Population | Area | |
---|---|---|
Minimum | 0.00 people | 0.00 square miles |
First Quartile | 2,882 people | 0.69 square miles |
Median | 4,001 people | 1.89 square miles |
Third Quartile | 5,323 people | 13 square miles |
Maximum | 37,452 people | 43,220 square miles |
As noted in the sections above, most Databases based on US Census data come in both high-fidelity and low-fidelity versions.
The high-fidelity version is the most accurate map data available from the US Census Bureau. Though the Census Bureau does not specify an explicit scale, they do quote source materials with scales of 1:100,000 and 1:24,000, and an Accuracy Improvement Project that led to an average error of just 7.6 meters. Our inspection of the data also reveals a high level of consistency with Google Maps and Open Street Map.
The low-fidelity version has an explicit scale of 1:500,000. Furthermore, borders that pass over bodies of water are snapped to the shoreline, unlike in the high-fidelity version.
The UsTract2010 Database returns a large number of parameters about the tract in question. While all these parameters are returned with a single call to the Web API, for performance reasons the Java and .NET Libraries divide them into four separate groups.
The first group is common to all the Databases and pertains to the query point's relationship to the map region from which the returned values were drawn.
Key | Description | Units | Type |
---|---|---|---|
AskGeoId | The internally-used AskGeo unique ID for the returned polygon | n/a | int |
IsInside | Whether or not the query point is inside the returned polygon | n/a | boolean |
MinDistanceKm | The distance from the query point to the nearest interior point of the returned polygon | kilometers | float |
The second group differs between the low-fidelity and high-fidelity versions.
The low-fidelity version returns the following (please note that the Web API uses the low-fidelity version):
Key | Description | Units | Type |
---|---|---|---|
GeoId | US census unique geographic ID | n/a | String |
StateCode | US state FIPS code | n/a | String |
CountyCode | US county FIPS code | n/a | String |
TractCode | US census tract code | n/a | String |
TractName | US census tract name | n/a | String |
Lsad | US census LSAD (logical/statistical area description) | n/a | String |
CensusAreaSqMi | US census area (square miles) | square miles | float |
The high-fidelity version returns the following:
Key | Description | Units | Type |
---|---|---|---|
StateCode | US state FIPS code | n/a | String |
CountyCode | US county FIPS code | n/a | String |
TractCode | US census tract code | n/a | String |
GeoId | US census unique geographic ID | n/a | String |
TractName | US census tract name | n/a | String |
LsadAndTractName | US census LSAD and tract name | n/a | String |
FeatureClassCode | US census MAF/TIGER feature class code | n/a | String |
FunctionalStatus | US census functional status code | n/a | String |
LandAreaSqM | US census land area (square meters) | square meters | float |
WaterAreaSqM | US census water area (square meters) | square meters | float |
LatitudeDeg | Latitude of interior point (degrees) | degrees | float |
LongitudeDeg | Longitude of interior point (degrees) | degrees | float |
The next two groups are the same in both the high-fidelity and low-fidelity versions. First, we offer selected demographic census data from the official 2010 Census for the tract:
Key | Description | Units | Type |
---|---|---|---|
CensusGeoId | Unique geographic identifier | n/a | String |
CensusGeoLevel | Geographic level code | n/a | String |
CensusEsriId | ESRI entity code | n/a | String |
CensusGeoCode | US Census entity code | n/a | String |
CensusAreaName | Entity name | n/a | String |
CensusStateAbbreviation | State abbreviation | n/a | String |
CensusTotalPopulation | Total Population | people | float |
CensusTotalPopulationIn2000 | Total Population in 2000 | people | float |
CensusTotalPopulationChange2000To2010 | Change in Population 2000-2010 | people | float |
CensusTotalPopulationPercentChange2000To2010 | Percent Change in Population 2000-2010 | percent | float |
CensusSexMale | Sex: Males | people | float |
CensusSexPercentMale | Sex: Percent Males | percent | float |
CensusSexFemale | Sex: Females | people | float |
CensusSexPercentFemale | Sex: Percent Females | percent | float |
CensusPeoplePerSqMi | Population Density | people per square mile | float |
CensusAge0To4 | Age: Under 5 Years | people | float |
CensusAgePercent0To4 | Age: Percent Under 5 Years | percent | float |
CensusAge5To9 | Age: Age 5 to 9 Years | people | float |
CensusAgePercent5To9 | Age: Percent Age 5 to 9 Years | percent | float |
CensusAge10To14 | Age: 10 to 14 Years | people | float |
CensusAgePercent10To14 | Age: Percent 10 to 14 Years | percent | float |
CensusAge15To17 | Age: 15 to 17 Years | people | float |
CensusAgePercent15To17 | Age: Percent 15 to 17 Years | percent | float |
CensusAge18To19 | Age: 18 to 19 Years | people | float |
CensusAgePercent18To19 | Age: Percent 18 to 19 Years | percent | float |
CensusAge20To24 | Age: 20 to 24 Years | people | float |
CensusAgePercent20To24 | Age: Percent 20 to 24 Years | percent | float |
CensusAge25To34 | Age: 25 to 34 Years | people | float |
CensusAgePercent25To34 | Age: Percent 25 to 34 Years | percent | float |
CensusAge35To44 | Age: 35 to 44 Years | people | float |
CensusAgePercent35To44 | Age: Percent 35 to 44 Years | percent | float |
CensusAge45To54 | Age: 45 to 54 Years | people | float |
CensusAgePercent45To54 | Age: Percent 45 to 54 Years | percent | float |
CensusAge55To59 | Age: 55 to 59 Years | people | float |
CensusAgePercent55To59 | Age: Percent 55 to 59 Years | percent | float |
CensusAge60To64 | Age: 60 to 64 Years | people | float |
CensusAgePercent60To64 | Age: Percent 60 to 64 Years | percent | float |
CensusAge65To74 | Age: 65 to 74 Years | people | float |
CensusAgePercent65To74 | Age: Percent 65 to 74 Years | percent | float |
CensusAge75To84 | Age: 75 to 84 Years | people | float |
CensusAgePercent75To84 | Age: Percent 75 to 84 Years | percent | float |
CensusAgeOver85 | Age: 85 Years and Over | people | float |
CensusAgePercentOver85 | Age: Percent 85 Years and Over | percent | float |
CensusAgeMedianAge | Age: Median Age | years | float |
CensusAgeUnder18 | Age: 0 to 17 Years | people | float |
CensusAgePercentUnder18 | Age: Percent 0 to 17 | percent | float |
CensusAge18To24 | Age: 18 to 24 Years | people | float |
CensusAgePercent18To24 | Age: Percent 18 to 24 Years | percent | float |
CensusAge25To44 | Age: 25 to 44 Years | people | float |
CensusAgePercent25To44 | Age: Percent 25 to 44 Years | percent | float |
CensusAge45To64 | Age: 45 to 64 Years | people | float |
CensusAgePercent45To64 | Age: Percent 45 to 64 Years | percent | float |
CensusAgeOver62 | Age: 62 Years and Over | people | float |
CensusAgePercentOver62 | Age: Percent 62 Years and Over | percent | float |
CensusAgeOver65 | Age: 65 Years and Over | people | float |
CensusAgePercentOver65 | Age: Percent 65 Years and Over | percent | float |
CensusAgeOver18 | Age: 18 Years and Over | people | float |
CensusAgePercentOver18 | Age: Percent 18 Years and Over | percent | float |
CensusAgeOver18Male | Age: Males 18 Year and Over | people | float |
CensusAgePercentOver18Male | Age: Percent Males 18 Years and Over | percent | float |
CensusAgeOver18Female | Age: Females 18 Year and Over | people | float |
CensusAgePercentOver18Female | Age: Percent Females 18 Years and Over | percent | float |
CensusAgeOver21 | Age: 21 Years and Over | people | float |
CensusAgePercentOver21 | Age: Percent 21 and Over | percent | float |
CensusAge15To19 | Age: 15 to 19 Years | people | float |
CensusAgePercent15To19 | Age: Percent 15 to 19 Years | percent | float |
CensusAgeOver65Male | Age: Males 65 and Over | people | float |
CensusAgePercentOver65Male | Age: Percent Males 65 and Over | percent | float |
CensusAgeOver65Female | Age: Females 65 and Over | people | float |
CensusAgePercentOver65Female | Age: Percent Females 65 and Over | percent | float |
CensusRaceOneRaceOnly | Race: One Race | people | float |
CensusRacePercentOneRaceOnly | Race: Percent One Race | percent | float |
CensusRaceWhiteOnly | Race: White | people | float |
CensusRacePercentWhiteOnly | Race: Percent White | percent | float |
CensusRaceBlackOnly | Race: Black or African American | people | float |
CensusRacePercentBlackOnly | Race: Percent Black or African American | percent | float |
CensusRaceIndian | Race: American Indian and Alaska Native | people | float |
CensusRacePercentIndian | Race: Percent American Indian and Alaska Native | percent | float |
CensusRaceAsianOnly | Race: Asian | people | float |
CensusRacePercentAsianOnly | Race: Percent Asian | percent | float |
CensusRaceHawaiianPIOnly | Race: Native Hawaiian and Other Pacific Islander | people | float |
CensusRacePercentHawaiianPIOnly | Race: Percent Native Hawaiian and Other Pacific Islander | percent | float |
CensusRaceOtherOnly | Race: Some Other Race | people | float |
CensusRacePercentOtherOnly | Race: Percent Some Other Race | percent | float |
CensusRaceMultiRace | Race: Multi Race: Persons reporting more than one race | people | float |
CensusRacePercentMultiRace | Race: Percent Multi Race: Persons reporting more than one race | percent | float |
CensusHispanicTotalPopulation | Hispanic: Hispanic or Latino (of any race) | people | float |
CensusHispanicPercentHispanic | Hispanic: Percent Hispanic or Latino (of any race) | percent | float |
CensusHispanicMexican | Hispanic: Mexican | people | float |
CensusHispanicPercentMexican | Hispanic: Percent Mexican | percent | float |
CensusHispanicPuertoRican | Hispanic: Puerto Rican | people | float |
CensusHispanicPercentPuertoRican | Hispanic: Percent Puerto Rican | percent | float |
CensusHispanicCuban | Hispanic: Cuban | people | float |
CensusHispanicPercentCuban | Hispanic: Percent Cuban | percent | float |
CensusHispanicOtherHispanic | Hispanic: Other Hispanic or Latino | people | float |
CensusHispanicPercentOtherHispanic | Hispanic: Percent Other Hispanic or Latino | percent | float |
CensusHispanicNonHispanic | Hispanic: Not Hispanic or Latino | people | float |
CensusHispanicPercentNonHispanic | Hispanic: Percent Not Hispanic or Latino | percent | float |
CensusHispanicWhiteNonHispanic | Hispanic: White Alone Not Hispanic | people | float |
CensusHispanicPercentWhiteNonHispanic | Hispanic: Percent White Alone Not Hispanic | percent | float |
CensusHouseholdsTotal | Households: Total Households | households | float |
CensusHouseholdsTotalFamilies | Households: Family Households (Families) | households | float |
CensusHouseholdsPercentFamilies | Households: Percent Family Households (Families) | percent | float |
CensusHouseholdsFamilyKidsUnder18 | Households: With Own Children Under 18 Years | households | float |
CensusHouseholdsPercentFamilyKidsUnder18 | Households: Percent With Own Children Under 18 Years | percent | float |
CensusHouseholdsMarriedCouple | Households: Married Couple Family | households | float |
CensusHouseholdsPercentMarriedCouple | Households: Percent Married Couple Family | percent | float |
CensusHouseholdsMarriedCoupleKidsUnder18 | Households: With Own Children Under 18 Years | households | float |
CensusHouseholdsPercentMarriedCoupleKidsUnder18 | Households: Percent With Own Children Under 18 Years | percent | float |
CensusHouseholdsFemaleHouseholder | Households: Female householder No Husband Present | households | float |
CensusHouseholdsPercentFemaleHouseholder | Households: Percent Female householder No Husband Present | percent | float |
CensusHouseholdsSingleMoms | Households: With Own Children Under 18 Years | households | float |
CensusHouseholdsPercentSingleMoms | Households: Percent With Own Children Under 18 Years | percent | float |
CensusHouseholdsNonFamily | Households: Non Family Households | households | float |
CensusHouseholdsPercentNonFamily | Households: Percent Non Family Households | percent | float |
CensusHouseholdsUnmarriedPartner | Households: Unmarried Partner Households | households | float |
CensusHouseholdsPercentUnmarriedPartner | Households: Percent Unmarried Partner Households | percent | float |
CensusHouseholdsSameSexPartner | Households: Same-Sex Unmarried Partner Households | households | float |
CensusHouseholdsPercentSameSexPartner | Households: Percent Same-Sex Unmarried Partner Households | percent | float |
CensusHouseholdsLivingAlone | Households: Householder Living Alone | households | float |
CensusHouseholdsPercentLivingAlone | Households: Percent Householder Living Alone | percent | float |
CensusHouseholdsHouseholderOver65 | Households: Householder 65 Years and Over | households | float |
CensusHouseholdsPercentHouseholderOver65 | Households: Percent Householder 65 Years and Over | percent | float |
CensusHouseholdsHouseholdsWithUnder18 | Households: Households With Individuals Under 18 Years | households | float |
CensusHouseholdsPercentHouseholdsWithUnder18 | Households: Percent Households With Individuals Under 18 Years | percent | float |
CensusHouseholdsWithOver65 | Households: Households With Individuals 65 Years and Over | households | float |
CensusHouseholdsPercentWithOver65 | Households: Percent Households With Individuals 65 Years and Over | percent | float |
CensusHouseholdsAverageHouseholdSize | Households: Average Household Size | people | float |
CensusHouseholdsAverageFamilySize | Households: Average Family Size | people | float |
Second, we offer additional economic and housing data from the 5-year American Community Survey (2006-2010 inclusive) from the US Census Bureau:
Key | Description | Units | Type |
---|---|---|---|
AcsGeoId | Unique geographic identifier | n/a | String |
AcsComponent | Component code | n/a | String |
AcsTotalPopulation | Total Population | people | float |
AcsRaceTotalPopulation | Race: Total population | people | float |
AcsRaceWhiteOnly | Race: White alone | people | float |
AcsRaceBlackOnly | Race: Black or African American alone | people | float |
AcsRaceAmericanIndianOnly | Race: American Indian and Alaska Native alone | people | float |
AcsRaceAsianOnly | Race: Asian alone | people | float |
AcsRaceHawaiianPIOnly | Race: Native Hawaiian and Other Pacific Islander alone | people | float |
AcsRaceOtherOnly | Race: Some other race alone | people | float |
AcsRaceMulti | Race: Two or more races | people | float |
AcsRaceMultiWithOther | Race: Two or more races including some other race | people | float |
AcsRaceMultiMore | Race: Three or more races, and two races excluding some other race | people | float |
AcsHispanicTotalPolulation | Hispanic: Total population | people | float |
AcsHispanicAllNonHispanic | Hispanic: Non-Hispanics of all races | people | float |
AcsHispanicWhiteNonHispanic | Hispanic: White non-Hispanics | people | float |
AcsHispanicAllHispanic | Hispanic: Hispanics of all races | people | float |
AcsHispanicWhiteHispanic | Hispanic: White Hispanics | people | float |
AcsAgeMedianAge | Median age | years | float |
AcsAgeMaleMedianAge | Male median age | years | float |
AcsAgeFemaleMedianAge | Female median age | years | float |
AcsSexTotalPolulation | Sex: Total population | people | float |
AcsSexMales | Sex: Males | people | float |
AcsSexFemales | Sex: Females | people | float |
AcsAgeUnder18 | Population under 18 years old | people | float |
AcsHouseholdIncomeTotalPopulation | Household income: Total population | people | float |
AcsHouseholdIncomeBelow10k | Household income: Less than $10,000 | people | float |
AcsHouseholdIncome10To15k | Household income: $10,000 to $14,999 | people | float |
AcsHouseholdIncome15To20k | Household income: $15,000 to $19,999 | people | float |
AcsHouseholdIncome20To25k | Household income: $20,000 to $24,999 | people | float |
AcsHouseholdIncome25To30k | Household income: $25,000 to $29,999 | people | float |
AcsHouseholdIncome30To35k | Household income: $30,000 to $34,999 | people | float |
AcsHouseholdIncome35To40k | Household income: $35,000 to $39,999 | people | float |
AcsHouseholdIncome40To45k | Household income: $40,000 to $44,999 | people | float |
AcsHouseholdIncome45To50k | Household income: $45,000 to $49,999 | people | float |
AcsHouseholdIncome50To60k | Household income: $50,000 to $59,999 | people | float |
AcsHouseholdIncome60To75k | Household income: $60,000 to $74,999 | people | float |
AcsHouseholdIncome75To100k | Household income: $75,000 to $99,999 | people | float |
AcsHouseholdIncome100To125k | Household income: $100,000 to $124,999 | people | float |
AcsHouseholdIncome125To150k | Household income: $125,000 to $149,999 | people | float |
AcsHouseholdIncome150To200k | Household income: $150,000 to $199,999 | people | float |
AcsHouseholdIncome200kPlus | Household income: $200,000 or more | people | float |
AcsHouseholdIncomeMedian | Median household income | dollars | float |
AcsIncomePerCapita | Per capita income | dollars | float |
AcsHousingUnitsTotalNumber | Housing Units: Total | housing units | float |
AcsHousingUnitsOccupancyTotalNumber | Housing Units: Occupancy Status: Total | housing units | float |
AcsHousingUnitsOccupied | Housing Units: Occupancy Status: Occupied | housing units | float |
AcsHousingUnitsVacant | Housing Units: Occupancy Status: Vacant | housing units | float |
AcsGrossRentMedian | Median gross rent | dollars | float |
AcsHouseValueOwnerOccupied25thPercentile | Owner-Occupied Housing Units: Value: 25th percentile | dollars | float |
AcsHouseValueOwnerOccupiedMedian | Owner-Occupied Housing Units: Value: Median | dollars | float |
AcsHouseValueOwnerOccupied75thPercentile | Owner-Occupied Housing Units: Value: 75th percentile | dollars | float |
AcsMortgageStatusTotalNumber | Owner-Occupied Housing Units: Mortgage Status: Total | housing units | float |
AcsMortgageStatusWithMortgage | Owner-Occupied Housing Units: Mortgage Status: With mortgage or similar | housing units | float |
AcsMortgageStatusWithoutMortgage | Owner-Occupied Housing Units: Mortgage Status: Without mortgage or similar | housing units | float |
AcsGrossRentAsPctHousholdIncome | Median gross rent as a percentage of household income | percent | float |
AcsRoomsNumberMedian | Median number of rooms | rooms | float |
AcsUnitsInStructureTotalUnits | Units in Structure: Total units | housing units | float |
AcsUnitsInStructure1Detached | Units in Structure: 1, detached | housing units | float |
AcsUnitsInStructure1Attached | Units in Structure: 1, attached | housing units | float |
AcsUnitsInStructure2 | Units in Structure: 2 | housing units | float |
AcsUnitsInStructure3To4 | Units in Structure: 3 or 4 | housing units | float |
AcsUnitsInStructure5To9 | Units in Structure: 5 to 9 | housing units | float |
AcsUnitsInStructure10To19 | Units in Structure: 10 to 19 | housing units | float |
AcsUnitsInStructure20To49 | Units in Structure: 20 to 49 | housing units | float |
AcsUnitsInStructure50Plus | Units in Structure: 50 or more | housing units | float |
AcsUnitsInStructureMobileHome | Units in Structure: Mobile home | housing units | float |
AcsUnitsInStructureBoatRvVan | Units in Structure: Boat, RV, van, etc. | housing units | float |
AcsHouseholdIncome20thPercentile | Household income: 20th percentile | dollars | float |
AcsHouseholdIncome40thPercentile | Household income: 40th percentile | dollars | float |
AcsHouseholdIncome60thPercentile | Household income: 60th percentile | dollars | float |
AcsHouseholdIncome80thPercentile | Household income: 80th percentile | dollars | float |
AcsHouseholdIncome95thPercentile | Household income: 95th percentile | dollars | float |
AcsHousingCostsMonthlyMedian | Median monthly housing costs | dollars | float |
AcsEducationTotalPopulation | Educational Attainment (25 and older): Total population | people | float |
AcsEducationMale | Educational Attainment (25 and older): Male: Total population | people | float |
AcsEducationMaleHighSchool | Educational Attainment (25 and older): Male: High school graduate, GED, or alternative | people | float |
AcsEducationMaleLittleCollege | Educational Attainment (25 and older): Male: Some college, less than 1 year | people | float |
AcsEducationMaleSomeCollege | Educational Attainment (25 and older): Male: Some college, 1 or more years, no degree | people | float |
AcsEducationMaleAssociatesDegree | Educational Attainment (25 and older): Male: Associate's degree | people | float |
AcsEducationMaleBachelorsDegree | Educational Attainment (25 and older): Male: Bachelor's degree | people | float |
AcsEducationMaleMastersDegree | Educational Attainment (25 and older): Male: Master's degree | people | float |
AcsEducationMaleProfessionalSchoolDegree | Educational Attainment (25 and older): Male: Professional school degree | people | float |
AcsEducationMaleDoctorateDegree | Educational Attainment (25 and older): Male: Doctorate degree | people | float |
AcsEducationFemale | Educational Attainment (25 and older): Female: Total population | people | float |
AcsEducationFemaleHighSchool | Educational Attainment (25 and older): Female: High school graduate, GED, or alternative | people | float |
AcsEducationFemaleLittleCollege | Educational Attainment (25 and older): Female: Some college, less than 1 year | people | float |
AcsEducationFemaleSomeCollege | Educational Attainment (25 and older): Female: Some college, 1 or more years, no degree | people | float |
AcsEducationFemaleAssociatesDegree | Educational Attainment (25 and older): Female: Associate's degree | people | float |
AcsEducationFemaleBachelorsDegree | Educational Attainment (25 and older): Female: Bachelor's degree | people | float |
AcsEducationFemaleMastersDegree | Educational Attainment (25 and older): Female: Master's degree | people | float |
AcsEducationFemaleProfessionalSchoolDegree | Educational Attainment (25 and older): Female: Professional school degree | people | float |
AcsEducationFemaleDoctorateDegree | Educational Attainment (25 and older): Female: Doctorate degree | people | float |
AcsMaritalStatusWomen15To50TotalPopulation | Marital Status by Age for Women 15 To 50 Years: Total population | people | float |
AcsMaritalStatusWomen15To50Married | Marital Status by Age for Women 15 To 50 Years: Now married (including spouse absent) | people | float |
AcsMaritalStatusWomen15To50Unmarried | Marital Status by Age for Women 15 To 50 Years: Unmarried (never married, widowed, and divorced) | people | float |
AcsLanguageSpokenAtHomeTotalPopulation | Language Spoken at Home (5 and older): Total population | people | float |
AcsLanguageSpokenAtHomeEnglishOnly | Language Spoken at Home (5 and older): Speak only English | people | float |
AcsLanguageSpokenAtHomeSpanish | Language Spoken at Home (5 and older): Spanish or Spanish Creole | people | float |
AcsWorkTransportationTotalPopulation | Means of Transportation to Work: Total population | people | float |
AcsWorkTransportationCarTruckVan | Means of Transportation to Work: Car, truck, or van | people | float |
AcsWorkTransportationPublicTransit | Means of Transportation to Work: Public transportation (excluding taxicab) | people | float |
AcsWorkTransportationWorkAtHome | Means of Transportation to Work: Worked at home | people | float |
AcsGiniIndex | Gini Index of income inequality | gini index | float |
AcsMedianEarningsByOccupationAllOccupations | Median earnings by occupation (civilian, 16 and older): Total population | dollars | float |
AcsMedianEarningsByOccupationManagement | Median earnings by occupation (civilian, 16 and older): Management, business, science, and arts occupations | dollars | float |
AcsMedianEarningsByOccupationService | Median earnings by occupation (civilian, 16 and older): Service occupations | dollars | float |
AcsMedianEarningsByOccupationSales | Median earnings by occupation (civilian, 16 and older): Sales and office occupations | dollars | float |
AcsMedianEarningsByOccupationConstruction | Median earnings by occupation (civilian, 16 and older): Natural resources, construction, and maintenance occupations | dollars | float |
AcsMedianEarningsByOccupationProduction | Median earnings by occupation (civilian, 16 and older): Production, transportation, and material moving occupations | dollars | float |
AcsGeoLevel | Geographic level code | n/a | String |
AcsStateCode | US census state code | n/a | String |
AcsCountyCode | US census county code | n/a | String |
AcsTractCode | US census tract code | n/a | String |
AcsBlockGroupCode | US census block group code | n/a | String |
All Ask Geo Java Libraries are compatible with Java 6, have no external dependencies, and are thread safe. Each Database comes with an associated Data File that must provided at constructor time to populate the internal data structures.
The libraries come in both double and single (float) precision versions, with the former consuming just under twice the resident memory of the latter. For reference, the single precision version is accurate to about 2.4 meters, which is more than sufficient for most applications.
As noted above, the UsTract2010 Java Libary comes in two different geographic fidelity levels. The high fidelity version is larger on disk and in memory, but offers greater geographic precision.
If you are interested in purchasing this Library or gaining access to the Web API, please see the:
There are only four classes that you need to be aware of to use the Ask Geo UsTract2010 Java Library, and only the first two are essential:
Contains map data and allows queries on the Database.
Embodies the result of a query on a UsTractMap instance.
Enumeration of the result fields taken from the 2010 US Census.
Enumeration of the result fields taken from the 2006-2010 US Census Bureau's American Community Survey.
They are described in the sections that follow.
The method signatures listed in this section are for the single precision (float) version of the library. For the double precision version, just replace float
with double
.
Please note that the documentation below is intended to provide you with an easy-to-understand presentation of the essentials of how to use the Ask Geo UsTract2010 Java Library.
For full documentation of the classes included, please see the:
The UsTractMap class stores the map data and exposes a query method to find the tract and related metadata at a given latitude and longitude. Because each UsTractMap instance is quite large, we recommend instantiating a single static instance in your project. The methods that you will need to use are as follows.
class UsTractMap {
static UsTractMap create(InputStream dataFileStream)
UsTractResult findResult(float latDeg, float lonDeg)
// Additional methods exist in this class; for complete documentation, please see the Full Java Docs
}
The UsTractResult class embodies the result of a query on a UsTractMap instance. All of the results listed in the Returned Values Section may be accessed using an accessor whose method name consists of "get" followed by the Key parameter from the Returned Values tables. Those tables also specify the type of the returned value. For example, here are several important accessors:
class UsTractResult {
String getTractName()
float GetCensusTotalPopulation()
float GetCensusAgeMedianAge()
float GetAcsHouseholdIncomeMedian()
// Additional methods exist in this class; for complete documentation, please see the Full Java Docs
}
The CensusField and AcsField enums lists the fields taken from the 2010 US Census and 2006-2010 American Community Survey that are reported for each tract. These may be used with the UsTractResult to access these data if, for whatever reason, the more traditional accessors are not suitable to the application at hand. For example, some applications might result in having a list of desired fields, which could be represented as a list of CensusField or AcsField members, and accessed in a for loop.
The following methods on the UsTractResult class work with these enums:
class UsTractResult {
String getAcsField(AcsField field)
float getAcsFieldAsFloat(AcsField field)
String getCensusField(CensusField field)
float getCensusFieldAsFloat(CensusField field)
// Additional methods exist in this class; for complete documentation, please see the Full Java Docs
}
Please note that if you are just trying to access a couple of fields that are known at compile time, it is probably much easier to use the direct accessors documented here.
The following is a complete example program demonstrating the use of the Ask Geo UsTract2010 Java Library.
import com.askgeo.flt.base.AcsField; import com.askgeo.flt.us.census2010.low.UsTractMap; import com.askgeo.flt.us.census2010.low.UsTractResult; import java.io.FileInputStream; public class UsCensusExample { static float[][] examplePoints = {{37f, -122f}, {42f, -89f}}; static String license = "INSERT YOUR LICENSE STRING HERE"; static String dataFilePath = "askgeo-us-state-2010-low-1.1.0.dat"; public static void main(String[] args) { try { UsTractMap map = UsTractMap.create(new FileInputStream(dataFilePath)); map.authorize(license); for (float[] point : examplePoints) { UsTractResult result = map.findResult(point[0], point[1]); String name = result.getTractName(); float population = result.getCensusTotalPopulation(); float medianAge = result.getCensusAgeMedianAge(); float medianIncome = result.getAcsFieldAsFloat(AcsField.AcsHouseholdIncomeMedian); System.out.println(" Latitude: " + point[0] + ", Longitude: " + point[1] + ", Name: " + name + ", Population: " + population + ", Median Age: " + medianAge + ", Median Income: " + medianIncome); } } catch (Exception e) { e.printStackTrace(); } } }
Ask Geo was designed from the ground up to be high performance. Our custom spatial index delivers blazing-fast response times. Furthermore, we've designed the Ask Geo Java Libraries to be thread safe and to not utilize synchronized methods or statements in the performance-critical query code. This means that computers with multiple processors or cores can take full advantage of those cores to deliver even faster performance.
We tested the performance of the Library using a single thread on a computer with an Intel Core i7 3.33 GHz running 64-bit Windows 7. For each version of the library, we tested:
The time it took to construct an instance of the UsTract2010 Database object.
The average response time for a single query. This was measured by running 100,000 queries, randomly distributed over the full extent of the map.
Resident memory of a UsTract2010 Database instance, as estimated by measuring the JVM's used memory after running the GC when running a simple test application containing only the map. This will lead to a slight over-estimate of the resident memory because it will include the overhead of the test application.
The file size of the Data File associated with this Database.
Fidelity | Precision | Construction Time | Per-Query Time | Memory | Data File Size |
---|---|---|---|---|---|
Low | Single | 8.82 seconds | 3.29e-05 seconds | 233.1 MB | 57.9 MB |
Low | Double | 6.94 seconds | 3.89e-05 seconds | 267.3 MB | 57.9 MB |
High | Single | 37.01 seconds | 1.29e-04 seconds | 517.2 MB | 259.9 MB |
High | Double | 36.32 seconds | 1.37e-04 seconds | 819.7 MB | 259.9 MB |
All Ask Geo .NET Libraries are compatible with .NET 4 and are thread safe. Each Database comes with an associated Data File that must provided at constructor time to populate the internal data structures. Except for a few small changes to be more consistent with .NET style and coding conventions, the Ask Geo .NET Libraries are a direct port of the AskGeo Java Libraries.
Where relevant both double and single (float) precision versions of the various classes are provided, with the former consuming just under twice the resident memory of the latter. For reference, the single precision version is accurate to about 2.4 meters, which is more than sufficient for most applications.
As noted above, the UsTract2010 .NET Libary comes in two different geographic fidelity levels. The high fidelity version is larger on disk and in memory, but offers greater geographic precision.
If you are interested in purchasing this Library or gaining access to the Web API, please see the:
There are only four classes that you need to be aware of to use the Ask Geo UsTract2010 .NET Library, and only the first two are essential:
Contains map data and allows queries on the Database.
Embodies the result of a query on a UsTractMap instance.
Enumerates (with static public members) the result fields taken from the 2010 US Census.
Enumerates (with static public members) the result fields taken from the 2006-2010 US Census Bureau's American Community Survey.
They are described in the sections that follow.
The method signatures listed in this section are for the single precision (float) version of the library. For the double precision version, just replace float
with double
.
Please note that the documentation below is intended to provide you with an easy-to-understand presentation of the essentials of how to use the Ask Geo UsTract2010 .NET Library.
For full documentation of the classes included, please see the:
The UsTractMap class stores the map data and exposes a query method to find the tract and related metadata at a given latitude and longitude. Because each UsTractMap instance is quite large, we recommend instantiating a single static instance in your project. The methods that you will need to use are as follows.
class UsTractMap {
static UsTractMap Create(Stream dataFileStream)
UsTractResult FindResult(float latDeg, float lonDeg)
// Additional methods exist in this class; for complete documentation, please see the Full .NET Docs
}
The UsTractResult class embodies the result of a query on a UsTractMap instance. All of the results listed in the Returned Values Section may be accessed using an accessor whose method name consists of "Get" followed by the Key parameter from the Returned Values tables. Those tables also specify the type of the returned value. For example, here are several important accessors:
class UsTractResult {
String GetTractName()
float GetCensusTotalPopulation()
float GetCensusAgeMedianAge()
float GetAcsHouseholdIncomeMedian()
// Additional methods exist in this class; for complete documentation, please see the Full .NET Docs
}
The CensusField and AcsField classes lists (as static public members) the fields taken from the 2010 US Census and 2006-2010 American Community Survey that are reported for each tract. These may be used with the UsTractResult to access these data if, for whatever reason, the more traditional accessors are not suitable to the application at hand. For example, some applications might result in having a list of desired fields, which could be represented as a list of CensusField or AcsField members, and accessed in a for loop.
The following methods on the UsTractResult class work with the static public members of these classes:
class UsTractResult {
String GetAcsField(AcsField field)
float GetAcsFieldAsFloat(AcsField field)
String GetCensusField(CensusField field)
float GetCensusFieldAsFloat(CensusField field)
// Additional methods exist in this class; for complete documentation, please see the Full .NET Docs
}
Please note that if you are just trying to access a couple of fields that are known at compile time, it is probably much easier to use the direct accessors documented here.
The following is a complete example program demonstrating the use of the Ask Geo UsTract2010 .NET Library.
using System; using System.IO; using AskGeo.Flt; using AskGeo.Base; class UsCensus { static void Main(string[] args) { float[,] examplePoints = { { 37f, -122f }, { 42f, -89f } }; String license = "INSERT YOUR LICENSE STRING HERE"; String dataFilePath = @"askgeo-us-state-2010-low-1.1.0.dat"; UsTractLowMap map = UsTractLowMap.Create(new FileStream(dataFilePath, FileMode.Open)); map.Authorize(license); for (int i = 0; i < examplePoints.GetLength(0); i++) { UsTractLowResult result = map.FindResult(examplePoints[i, 0], examplePoints[i, 1]); String name = result.GetTractName(); float population = result.GetCensusTotalPopulation(); float medianAge = result.GetCensusAgeMedianAge(); float medianIncome = result.GetAcsFieldAsFloat(AcsField.AcsHouseholdIncomeMedian); Console.WriteLine(" Latitude: " + examplePoints[i, 0] + ", Longitude: " + examplePoints[i, 1] + ", Name: " + name + ", Population: " + population + ", Median Age: " + medianAge + ", Median Income: " + medianIncome); } } }
Ask Geo was designed from the ground up to be high performance. Our custom spatial index delivers blazing-fast response times. Furthermore, we've designed the Ask Geo .NET Libraries to be thread safe and to not utilize synchronized methods or statements in the performance-critical query code. This means that computers with multiple processors or cores can take full advantage of those cores to deliver even faster performance.
The Ask Geo Libraries were originally designed and written in Java and ported to .NET. Consequently, detailed performance and memory consumption information is available for the Java Libraries but not for the .NET Libraries. We have run spot checks on a few of our test cases and found that the .NET Libraries have essentially the same performance characteristics as the Java Libraries. This is unsurprising given the similarities between the languages and the virtual machines on which they run. See the Java Performance Section for detailed information on construction time, per-query time, and memory consumption.