0

I want to count Asian males, 15-30 years old by Census Tract. I can get the data sorted, but I don't know how to make a Boolean type of query (i.e., race is Asian AND sex is male AND age is 15-30). I currently have a table of all Asian, all female, all male aged 15-30, but this is not useful.

I am using ESRI Arcmap Business Analyst to pull ACS data to tracts.

Data shapefile

9
  • Do you have a link to the data so I can try and write a definition query for you?
    – Stevetech
    Mar 9, 2017 at 18:59
  • I can only create tract shapefiles with total asian pop, total male pop, total male age 15-30 pop. Is this useful or do I need to query the Census Bureau site?
    – Davey
    Mar 9, 2017 at 19:04
  • 1
    Welcome to GIS SE! As a new user please take the tour to learn about our focused Q&A format. Please edit your question to include a sample of your census data, and also tell us which country you're interested in
    – Midavalo
    Mar 9, 2017 at 19:06
  • 1
    @Davey Please edit your question to include a sample of your data either as a screenshot or as text. Few volunteers will download an attached dataset. Also which country is your census data for?
    – Midavalo
    Mar 9, 2017 at 19:47
  • 1
    @Davey right but that isn't described anywhere in your question so it should be edited. I believe what others have been asking for is data or examples from the original data source.
    – GISHuman
    Mar 9, 2017 at 21:11

1 Answer 1

0

The data you have currently downloaded does not break down the statistics in the way you want.

you need something like

SELECT FROM [table name] where [field name] ='[value]'
AND where  [field name] ='[value]'
AND where  [field name] ='[value]'

Whilst most SQL dialects don't need the repeated where, ArcMap seems to insist on it and the query builder in Arc doesn't seem to want the trailing ; either

Once you have entered the query use the verify button to check the SQL is valid before execution.

If you can get a tract shape file with all the attributes it will be easier

I unfortunately don't have access to Business Analyst and its associated packaged data to go any further.

You could manually obtain the raw data from the US Census site and join them by tract number.

5
  • thank you. how can I query census with sql from arcmap?
    – Davey
    Mar 9, 2017 at 19:38
  • Where is the source data you wish to query. Once we have the source url we can try and help
    – Stevetech
    Mar 9, 2017 at 19:39
  • I use ArcMap business analyst / SmartMap function which lets me select the metrics and geounit. Similar to using advanced tool at Census Factfinder site and joining the tables the tract shapefile myself. So I am not aware of the api, but I suspect this is my next task. thank you!
    – Davey
    Mar 9, 2017 at 19:41
  • 1
    @Stevetech I'm interested in your comment Whilst most SQL dialects don't need the repeated where, ArcMap seems to insist on it. - Where in ArcMap are you referring to? I have never experienced this requirement
    – Midavalo
    Mar 9, 2017 at 19:48
  • in the select by Attributes dialog not including the repeated WHERE frequently returns an error
    – Stevetech
    Mar 9, 2017 at 19:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.