Skip to content

Instantly share code, notes, and snippets.

@emilepetrone
Created October 11, 2011 17:41
Show Gist options
  • Save emilepetrone/1278806 to your computer and use it in GitHub Desktop.
Save emilepetrone/1278806 to your computer and use it in GitHub Desktop.
// get advanced demographic information for an address
SGContextQuery *query = [SGContextQuery queryWithAddress:@"41 Decatur Street, San Francisco, CA"];
[query setFilters:[NSArray arrayWithObject:SGContextFilterDemographics]];
[query setACSTableIDs:[NSArray arrayWithObjects:@"B05005", @"B06009", @"B07001", nil]];
[client getContextForQuery:query
callback:[SGCallback callbackWithSuccessBlock:
^(id response) {
// you've got demographics!
} failureBlock:^(NSError *error) {
// handle failure
}]];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment