Tapestry Segments

1718
2
07-08-2011 11:30 AM
SarahSteinberg
New Contributor
Hello --

I'm a total noob... I've been perusing your online REST API documentation on how to obtain demographic data.  It is very good.  But one of the bits of data I am keen on getting for, say a given blockgroup, is it's Tapestry Segment.  I would also like to query for any data associated with a given Tapestry Segment.  Is this possible, currently, through the API?

Thank you very much.

Sarah
0 Kudos
2 Replies
TonyHowser
Esri Contributor
Hi Sarah,

Thank you for your WONDERFUL QUESTION (and your wonderful timing)!

As a matter of fact, we will be releasing new REST documentation on the Resource Center for the Online API describing syntax, parameters, and samples for our new "Smart Map Facts" Web service at the beginning of next week for the Users Conference in San Diego.  With it, you can perform complex spatial and attribute-based queries of the Business Analyst Online dataset.

For your questions, you will need an Online API subscription to access the 'DOMTAP' ("Dominant Tapestry Segment Number Variable) but I will show you the exact syntax and a sample here as a preview to the forthcoming documentation:

1.

Give me the Dominant Tapestry Code (and, just for fun, let's throw in some other stuff in the request: the 2010 estimate for the Median Household Income, the 2010 estimate for the Median Age, and the output polygon geometry so we can map it!) of Census Block Group 060730054002

Here is the associated REST request:

baoapi.esri.com/rest/maps/ThematicQuery/execute?geoLevelID=US.BlockGroups&f=pjson&outFields=NAME,ID,DOMTAP,MEDHINC_CY,MEDAGE_CY &ReturnGeometry=true&OutSR=4326&Where=(ID='060730054002')&Token=<YOUR_ONLINE_API_TOKEN>

And, after about a second, here are your results:

Dominant Tapestry Segment: #8 ("Laptops and Lattes")
2010 Median HH Income: $72,470
2010 Median Age: about 51

The JSON Response:



The Rendered Geometry of the Block Group Which Was Queried (location is near the San Diego Cruise Ship Terminal with lots of high rise condos):




[2]

Give me the locations of all Census block groups in San Diego County which have a Dominant Tapestry Code of 8 or 23 ("Laptops and Lattes" and "Trendsetters", respectively) (this time without any geometry---we just want the FIPS codes of the areas)


Here is the associated REST request using the extent of San Diego County:

baoapi.esri.com/rest/maps/ThematicQuery/execute?geoLevelID=US.BlockGroups&f=pjson&outFields=NAME,ID,DOMTAP&geometry={"xmin":-117.783716,"ymin":32.482960,"xmax":-116.013673,"ymax":33.488599}&geometryType=esriGeometryEnvelope&InSR=4326&Where=(DOMTAP=8 OR DOMTAP=23)&Token=<YOUR_ONLINE_API_TOKEN>

And, after about a second, here are your results:

The JSON Response:



And the Rendered Response (if I changed to request to include it):




I hope this was able to answer your questions and, if you will be around at the Esri Users Conference in San Diego, please stop by the Business Analyst/Community Analyst Commercial Solutions booth and say, "Hi" and also attend our sessions and presentations!

Thanks for your wonderful timed questions,
Tony
0 Kudos
SarahSteinberg
New Contributor
Tony, thanks for this detailed response.  I see it is now released so I will give the new functionality a try.  I'm glad the timing was so perfect.  🙂

Sarah
0 Kudos