Way to create report based on community/locality/city?

3655
6
06-08-2011 12:55 PM
CodyInman
New Contributor
Is there a way to create the BAO report at a community/locality/city level and not by Drive Time or Area Radius?

If yes, where could I find the documentation to accomplish this?
0 Kudos
6 Replies
CodyInman
New Contributor
FYI

We are working in ASP.NET C# using the BAO web services
0 Kudos
TonyHowser
Esri Contributor
Section 1 - PART 1 of 5 (had to split this up)


Is there a way to create the BAO report at a community/locality/city level and not by Drive Time or Area Radius? 

If yes, where could I find the documentation to accomplish this?



Greetings!

This is actually a very good question and is one of the fundamental use cases of the Online APIs. That being said, you will be happy to know that your workflow will be fast, efficient, and flexible.

Iâ??ve decided to split this into two sections:

(1). Today, I have decided to respond with a general description of your workflow and some links to the corresponding API reference documentation and some live samples which donâ??t require any code.

(2). Next week, after you have had time to absorb and understand this, I will follow up by also posting the source code for a *very* simple ASP.NET C# example in both REST and SOAP---the two types of services we offer---which will quickly and easily illustrate the concepts I discuss below.

We also offer Adobe Flex/Flash and Microsoft Silverlight SDKs however; since you are targeting a server-side dev platform, I will limit the samples to just the underlying REST and SOAP services.
Thanks for your question and I hope this helps you and everyone else. Enjoy and think about how you can leverage this stuff!

-Tony
Online APIs - Business Analyst/Community Analyst Team

Workflow Synopsis: Leverage the Online API to generate reports for standard administrative areas (towns, cities, ZIP codes, etc.).

For this workflow, we are going to walk through it using this example:

â??I want to generate a Demographic and Income Report in PDF format for the City of Redlands, CA. To take it one step further, I will also create the same report describing the Redlands ZIP codes and the county containing Redlandsâ?�.

Workflow Steps:

(Step 1). Determine which Online API Dataset you want to access.

The Online APIs have and will continue to deliver and give users/developers access to Esri Business Analyst/Community Analyst datasets. These datasets consist of standard administrative boundary features (ZIP codes, towns/cities, counties, U.S. Congressional Districts, census geographies, etc. ) and Esri data consisting of several thousand high-quality â??variablesâ?� which are observations and calculated values describing Census, demographic, business, consumer, and many other characteristics of the underlying population of areas.

Leverage the Get Datasets service (REST: http://help.arcgis.com/en/businessanalyst/online%20apis/services/rest/reference/index.htm?GetSummari... SOAP: http://help.arcgis.com/en/businessanalyst/online%20apis/services/soap/reference/index.htm?GetToken.h... ) to look up the currently available datasets. You will need the dataset ID in subsequent steps. As of this writing, the following datasets are available to consume in the Online APIs:


  • "USA" : U.S.-specific administrative boundary/geography data layers, analysis variables, and reports

  • "Canada": Canada-specific administrative boundary/geography data layers, analysis variables, and reports

  • "USACensus2010": U.S.-specific administrative boundary/geography data layers, analysis variables, and reports associated with new Census 2010 data (summarized here: http://help.arcgis.com/en/esri_data/geography_changes/index.html )


Going back to our workflow example, we will leverage the â??USAâ?� dataset to query/analyze Redlands, CA.

(Step 2). Look up the area IDs of the administrative areas you want to query/analyze.

The Online API gives you access to several administrative boundary data layers like ZIP codes, towns/cities, counties, U.S. Congressional Districts, etc. We call these â??standard geographiesâ?� within our team. The Online API offers access to several different types of standard geographies. You can leverage the Get Standard Geographies service (REST: http://help.arcgis.com/en/businessanalyst/online%20apis/services/rest/reference/index.htm?GetStandar... or SOAP: http://help.arcgis.com/en/businessanalyst/online%20apis/services/soap/reference/index.htm?GetStandar... ) to retrieve a list of the available standard geography data layers and their corresponding IDs which you will need in subsequent analysis. We current provide access to standard geography data layers for the U.S. and Canada in our Online APIs however; I will stick the U.S. data in this workflow.

--------------------------------------------------------------------------------
Name Entire Country
ID US.WholeUSA
--------------------------------------------------------------------------------
Name States
ID US.States
--------------------------------------------------------------------------------
Name Designated Market Areas (DMAs)
ID US.DMA
--------------------------------------------------------------------------------
Name Congressional Districts
ID US.CD
--------------------------------------------------------------------------------
Name Metropolitan Areas (CBSAs)
ID US.CBSA
--------------------------------------------------------------------------------
Name Counties
ID US.Counties
--------------------------------------------------------------------------------
Name Cities and Towns (Places)
ID US.Places
--------------------------------------------------------------------------------
Name ZIP Codes
ID US.ZIP5
--------------------------------------------------------------------------------
Name County Subdivisions
ID US.CS
--------------------------------------------------------------------------------
Name Census Tracts
ID US.Tracts
--------------------------------------------------------------------------------
Name Census Block Groups
ID US.BlockGroups
--------------------------------------------------------------------------------

Going back to our workflow example: â??I want to generate a Demographic and Income Report in PDF format of the City of Redlands, CA. To take it one step further, I also want to create the same report describing the Redlands ZIP codes, the county containing Redlandsâ?�. This implies that you want to query/analyze the â??Cities and Town (Places)â?�. This data layer consists of areas from the list of Census Designated Places (http://en.wikipedia.org/wiki/Census-designated_place and https://ask.census.gov/app/answers/detail/a_id/1377/~/definition%3A-census-designated-place ).

Since the study area is Redlands, CA (the home of Esri), I would leverage the Standard Geographies by Attributes service (REST: http://help.arcgis.com/en/businessanalyst/online%20apis/services/rest/reference/index.htm?StdGeograp... SOAP: http://help.arcgis.com/en/businessanalyst/online%20apis/services/soap/reference/index.htm?StdGeograp... ) to look up the area IDs associated with Redlands, CA against the â??Cities and Towns (Places)â?� data layer (with ID: US.Places). I need to also look up all the ZIP codes associated with Redlands against the â??ZIP Codes: (ID: US.ZIP5) data layer with the same service too. The following describes the output with these lookup operations:

--------------------------------------------------------------------------------
Standard Geography Name Cities and Towns (Places)
Standard Geography Data Layer ID US.Places
Area Name Redlands city
Area ID 0659962 (Census-designated Place FIPS Code: http://en.wikipedia.org/wiki/Federal_Information_Processing_Standard)
State Name California
State Abbrev CA
--------------------------------------------------------------------------------
Standard Geography Name ZIP Codes
Standard Geography Data Layer ID US.ZIP5
Area Name Redlands
Area ID 92373
State Name California
State Abbrev CA
--------------------------------------------------------------------------------
Standard Geography Name ZIP Codes
Standard Geography Data Layer ID US.ZIP5
Area Name Redlands
Area ID 92374
State Name California
State Abbrev CA
--------------------------------------------------------------------------------
0 Kudos
TonyHowser
Esri Contributor
Section 1 - PART 2 of 5 (had to split this up)


If you recall our workflow example: â??I want to generate a Demographic and Income Report in PDF format of the City of Redlands, CA. To take it one step further, I also want to create the same report describing the Redlands ZIP codes, the county containing Redlandsâ?�---we still need to get the county which contains Redlands. Well, we might already know this but this is not convenient for areas which you are not familiar with. Additionally or alternatively, we can actually do everything we want in this step (Get the area IDs of our study locations) using an *address* (or latitude and longitude coordinates) instead of an area name. What we really want is to obtain the â??completeâ?� spatial context of the location---that is, I want to know every area for every available standard geography data layer that â??touchesâ?� or intersects that address (or those coordinates), I can leverage the Return Standard Geographies service (REST: http://help.arcgis.com/en/businessanalyst/online%20apis/services/rest/reference/index.htm?ReturnStan... SOAP: http://help.arcgis.com/en/businessanalyst/online%20apis/services/soap/reference/index.htm?ReturnStdG... ) to do this and obtain the area IDs this way as well.

In our example, the Esri Headquarters is located at â??380 New York St. Redlands, CA 92373â?� and I wanted to get every area from every available standard geography data layer that is associated with this location. Well, I would simply pass that address and the IDs of all of the standard geography data layers to the Return Standard Geographies service and get the following:


--------------------------------------------------------------------------------
Standard Geography Name Entire Country
Standard Geography Data Layer ID US.WholeUSA
Area Name
Area ID United States
Area ID 01
--------------------------------------------------------------------------------
Standard Geography Name States
Standard Geography Data Layer ID US.States
Area Name California
Area ID 06 (State FIPS Code: http://en.wikipedia.org/wiki/Federal_Information_Processing_Standard)
--------------------------------------------------------------------------------
Standard Geography Name Designated Market Areas (DMAs)
Standard Geography Data Layer ID US.DMA
Area Name Los Angeles, CA
Area ID 803
--------------------------------------------------------------------------------
Standard Geography Name Congressional Districts
Standard Geography Data Layer ID US.CD
Area Name California - District 41
Area ID 0641
--------------------------------------------------------------------------------
Standard Geography Name Metropolitan Areas (CBSAs)
Standard Geography Data Layer ID US.CBSA
Area Name Riverside-San Bernardino-Ontario, CA Metropolitan Statistical Area
Area ID 40140
--------------------------------------------------------------------------------
Standard Geography Name Counties
Standard Geography Data Layer ID US.Counties
Area Name 06071 (County FIPS Code: http://en.wikipedia.org/wiki/Federal_Information_Processing_Standard)
Area ID San Bernardino County
--------------------------------------------------------------------------------
Standard Geography Name Cities and Towns (Places)
Standard Geography Data Layer ID US.Places
Area Name Redlands city
Area ID 0659962 (Census-designated Place FIPS Code: http://en.wikipedia.org/wiki/Federal_Information_Processing_Standard)
--------------------------------------------------------------------------------
Standard Geography Name ZIP Codes
Standard Geography Data Layer ID US.ZIP5
Area Name Redlands
Area ID 92373
--------------------------------------------------------------------------------
Standard Geography Name County Subdivisions
Standard Geography Data Layer ID US.CS
Area Name San Bernardino CCD
Area ID 0607192770 (County Subdivision FIPS Code: http://en.wikipedia.org/wiki/Federal_Information_Processing_Standard)
--------------------------------------------------------------------------------
Standard Geography Name Census Tracts
Standard Geography Data Layer ID US.Tracts
Area Name 060710081.00 (Census Tract FIPS Code: http://en.wikipedia.org/wiki/Federal_Information_Processing_Standard)
Area ID 06071008100
--------------------------------------------------------------------------------
Standard Geography Name Census Block Groups
Standard Geography Data Layer ID US.BlockGroups
Area Name 060710081.002 (Census Block Group FIPS Code: http://en.wikipedia.org/wiki/Federal_Information_Processing_Standard)
Area ID 060710081002
--------------------------------------------------------------------------------


Well, thatâ??s real cool. I actually make reports or query data that can be used to compare summary attributes or facts describing these areas like average/median household income, age, specific consumer expenditures, education level, etc.

Going back to our workflow example: â??I want to generate a Demographic and Income Report in PDF format of the City of Redlands, CA. To take it one step further, I also want to create the same report describing the Redlands ZIP codes, the county containing Redlandsâ?�. Well, we were able to leverage utility services to look up all this info:
--------------------------------------------------------------------------------
Standard Geography Name Cities and Towns (Places)
Standard Geography Data Layer ID US.Places
Area Name Redlands city
Area ID 0659962 (Census-designated Place FIPS Code: http://en.wikipedia.org/wiki/Federal_Information_Processing_Standard)
State Name California
State Abbrev CA
--------------------------------------------------------------------------------
Standard Geography Name ZIP Codes
Standard Geography Data Layer ID US.ZIP5
Area Name Redlands
Area ID 92373

State Name California
State Abbrev CA
--------------------------------------------------------------------------------
Standard Geography Name ZIP Codes
Standard Geography Data Layer ID US.ZIP5
Area Name Redlands
Area ID 92374

State Name California
State Abbrev CA
--------------------------------------------------------------------------------
Standard Geography Name Counties
Standard Geography Data Layer ID US.Counties
Area Name 06071
(County FIPS Code: http://en.wikipedia.org/wiki/Federal_Information_Processing_Standard)
Area ID San Bernardino County

--------------------------------------------------------------------------------
0 Kudos
TonyHowser
Esri Contributor
Section 1 - PART 3 of 5 (had to split this up)

(Step 3). Look up the IDs of the report you want to generate.

This is a quick and easy step. The Online APIs have a growing number of predefined report â??templatesâ?� which you can generate with the services. In most cases, the reports summarize demographic, business, consumer characteristics, and many other measures which describe the underlying population of your selected study areas. In Step 2, you selected the study area, in this step, you are selecting the reports and you need to look up their associated IDs to tell the Online API which report you are interested in creating. (It should be noted that access and availability of report templates and associated analysis locations are subject to the terms of your subscription.) Leverage the Get Report Templates service (REST: http://help.arcgis.com/en/businessanalyst/online%20apis/services/rest/reference/index.htm?GetReportT... SOAP: http://help.arcgis.com/en/businessanalyst/online%20apis/services/soap/reference/index.htm?GetReportT... ) to look up the list of available report templates. As of this writing and with my own â??Basicâ?� subscription, the following reports on the â??USAâ?� dataset are available to me:

--------------------------------------------------------------------------------
Report ID market_profile
Category Demographic Reports
Report Title Market Profile
Available Output Formats [PDF, Excel, XML, S.XML]
Optionally Customizable Header Fields [logo, Report Title, areadescription, address, subReport Title, longitude, locationReport ID, latitude, binarylogo]

--------------------------------------------------------------------------------
Report ID dandi
Category Demographic Reports
Report Title Demographic and Income Profile (New Style)
Available Output Formats [PDF, Excel, XML, S.XML]
Optionally Customizable Header Fields [logo, Report Title, areadescription, address, subReport Title, longitude, locationReport ID, latitude, binarylogo]

--------------------------------------------------------------------------------
Report ID dandi_fy
Category Demographic Reports
Report Title Demographic and Income Profile
Available Output Formats [PDF, Excel, XML, S.XML]
Optionally Customizable Header Fields [logo, Report Title, areadescription, address, subReport Title, longitude, locationReport ID, latitude, binarylogo]

--------------------------------------------------------------------------------
Report ID dandicomparison
Category Demographic Reports
Report Title Demographic and Income Comparison Profile
Available Output Formats [PDF, Excel, XML, S.XML]
Optionally Customizable Header Fields [logo, Report Title, areadescription, address, subReport Title, longitude, locationReport ID, latitude, binarylogo]

--------------------------------------------------------------------------------
Report ID sf3_comparison
Category Demographic Reports
Report Title 1990-2000 Comparison Profile
Available Output Formats [PDF, Excel, XML, S.XML]
Optionally Customizable Header Fields [logo, Report Title, areadescription, address, subReport Title, longitude, locationReport ID, latitude, binarylogo]

--------------------------------------------------------------------------------
Report ID 55plus
Category Demographic Reports
Report Title Age 50+ Profile
Available Output Formats [PDF, Excel, XML, S.XML]
Optionally Customizable Header Fields [logo, Report Title, areadescription, address, subReport Title, longitude, locationReport ID, latitude, binarylogo]

--------------------------------------------------------------------------------
Report ID ageinc
Category Demographic Reports
Report Title Age by Income Profile
Available Output Formats [PDF, Excel, XML, S.XML]
Optionally Customizable Header Fields [logo, Report Title, areadescription, address, subReport Title, longitude, locationReport ID, latitude, binarylogo]

--------------------------------------------------------------------------------
Report ID agesexrace
Category Demographic Reports
Report Title Age By Sex By Race Profile
Available Output Formats [PDF, Excel, XML, S.XML]
Optionally Customizable Header Fields [logo, Report Title, areadescription, address, subReport Title, longitude, locationReport ID, latitude, binarylogo]

--------------------------------------------------------------------------------
Report ID agesex
Category Demographic Reports
Report Title Age by Sex Profile
Available Output Formats [PDF, Excel, XML, S.XML]
Optionally Customizable Header Fields [logo, Report Title, areadescription, address, subReport Title, longitude, locationReport ID, latitude, binarylogo]

--------------------------------------------------------------------------------
Report ID pl_summary
Category Demographic Reports
Report Title Census 2000 Detailed Race Profile
Available Output Formats [PDF, Excel, XML, S.XML]
Optionally Customizable Header Fields [logo, Report Title, areadescription, address, subReport Title, longitude, locationReport ID, latitude, binarylogo]

--------------------------------------------------------------------------------
Report ID sf3_summary
Category Demographic Reports
Report Title Census 2000 Summary Profile
Available Output Formats [PDF, Excel, XML, S.XML]
Optionally Customizable Header Fields [logo, Report Title, areadescription, address, subReport Title, longitude, locationReport ID, latitude, binarylogo]

--------------------------------------------------------------------------------
Report ID stdb_execsummary
Category Demographic Reports
Report Title Executive Summary Profile
Available Output Formats [PDF, XML, S.XML]
Optionally Customizable Header Fields [logo, Report Title, areadescription, address, subReport Title, longitude, locationReport ID, latitude, binarylogo]

--------------------------------------------------------------------------------
Report ID housing
Category Demographic Reports
Report Title Housing Profile
Available Output Formats [PDF, Excel, XML, S.XML]
Optionally Customizable Header Fields [logo, Report Title, areadescription, address, subReport Title, longitude, locationReport ID, latitude, binarylogo]

--------------------------------------------------------------------------------
Report ID qrtlydemog
Category Demographic Reports
Report Title Quarterly Demographic Profile
Available Output Formats [PDF, Excel, XML, S.XML]
Optionally Customizable Header Fields [logo, Report Title, areadescription, address, subReport Title, longitude, locationReport ID, latitude, binarylogo]

--------------------------------------------------------------------------------

(LIST CONTINUES)
0 Kudos
TonyHowser
Esri Contributor
Section 1 - PART 4 of 5 (had to split this up)

(LIST CONTINUED FROM PREVIOUS)

Report ID cex_retail
Category Consumer Spending Reports
Report Title Retail Goods and Services Expenditures
Available Output Formats [PDF, Excel, XML, S.XML]
Optionally Customizable Header Fields [logo, Report Title, areadescription, address, subReport Title, longitude, locationReport ID, latitude, binarylogo]

--------------------------------------------------------------------------------
Report ID site_map
Category MAP_Reports
Report Title Site Map
Available Output Formats [PDF]
Optionally Customizable Header Fields [logo, Report Title, areadescription, address, subReport Title, longitude, locationReport ID, latitude, binarylogo]

--------------------------------------------------------------------------------
Report ID site_details_map
Category MAP_Reports
Report Title Site Details Map
Available Output Formats [PDF]
Optionally Customizable Header Fields [logo, Report Title, areadescription, address, subReport Title, longitude, locationReport ID, latitude, binarylogo]

--------------------------------------------------------------------------------
Report ID icubed04
Category MAP_Reports
Report Title Site Map i-cubed 0.4 Miles Wide
Available Output Formats [PDF]
Optionally Customizable Header Fields [logo, Report Title, areadescription, address, subReport Title, longitude, locationReport ID, latitude, binarylogo]

--------------------------------------------------------------------------------
Report ID icubed08
Category MAP_Reports
Report Title Site Map i-cubed 0.8 Miles Wide
Available Output Formats [PDF]
Optionally Customizable Header Fields [logo, Report Title, areadescription, address, subReport Title, longitude, locationReport ID, latitude, binarylogo]

--------------------------------------------------------------------------------
Report ID icubed16
Category MAP_Reports
Report Title Site Map i-cubed 1.6 Miles Wide
Available Output Formats [PDF]
Optionally Customizable Header Fields [logo, Report Title, areadescription, address, subReport Title, longitude, locationReport ID, latitude, binarylogo]

--------------------------------------------------------------------------------
Report ID acs_housing
Category ACS Reports
Report Title ACS Housing Summary
Available Output Formats [PDF, Excel, XML, S.XML]
Optionally Customizable Header Fields [logo, Report Title, areadescription, address, subReport Title, longitude, locationReport ID, latitude, binarylogo]

--------------------------------------------------------------------------------
Report ID acs_population
Category ACS Reports
Report Title ACS Population Summary
Available Output Formats [PDF, Excel, XML, S.XML]
Optionally Customizable Header Fields [logo, Report Title, areadescription, address, subReport Title, longitude, locationReport ID, latitude, binarylogo]
--------------------------------------------------------------------------------

Going back to our workflow example: â??I want to generate a Demographic and Income Report in PDF format of the City of Redlands, CA. To take it one step further, I also want to create the same report describing the Redlands ZIP codes, the county containing Redlandsâ?�. According to the list above, we want to generate the following report for all of those areas:
--------------------------------------------------------------------------------
Report ID dandi
Category Demographic Reports
Report Title Demographic and Income Profile (New Style)
Available Output Formats [PDF, Excel, XML, S.XML]
Optionally Customizable Header Fields [logo, Report Title, areadescription, address, subReport Title, longitude, locationReport ID, latitude, binarylogo]

--------------------------------------------------------------------------------
0 Kudos
TonyHowser
Esri Contributor
Section 1 - PART 5 of 5 (had to split this up)

(Step 4). Generate a summary report on the selected areas.

This is the final step. Using the information you looked in Steps 1-3, we going to leverage the Summary Reports service (REST: http://help.arcgis.com/en/businessanalyst/online%20apis/services/rest/reference/index.htm?SummaryRep... SOAP: http://help.arcgis.com/en/businessanalyst/online%20apis/services/soap/reference/index.htm?SummaryRep... ) to generate reports describing our study areas.

Letâ??s go back to our workflow example one last time and summarize what we collected. â??I want to generate a Demographic and Income Report in PDF format of the City of Redlands, CA. To take it one step further, I also want to create the same report describing the Redlands ZIP codes, the county containing Redlandsâ?�.

(Step 1). Determine which Online API Dataset you want to access.
Result:

Online dataset ID: â??USAâ?�

(Step 2). Look up the area IDs of the administrative areas you want to query/analyze.
Result:

Standard Geography Data Layer ID US.Places
Area Name Redlands city
Area ID 0659962

Standard Geography Data Layer ID US.ZIP5
Area Name Redlands
Area ID 92373

Standard Geography Data Layer ID US.ZIP5
Area Name Redlands
Area ID 92374

Standard Geography Data Layer ID US.Counties
Area Name San Bernardino County
Area ID 06071

(Step 3). Look up the IDs of the report you want to generate.
Result:

Report ID dandi
Report Title Demographic and Income Profile (New Style)


Now, to generate each of the four Demographic and Income Profile reports described above, we pass those parameters from Step 1-3 to the Summary Report service.

TO SEE THE OUTPUT IN REST, YOU CAN IMMEDIATELY SUBMIT THE FOLLOWING REST REQUESTS WITHOUT A SUBSCRIPTION TOKEN AND PRODUCE THE REPORTS THROUGH A REST DEMO VIEWER BY CLICKING ON THESE LINKS (and clicking on the output report link):


Working REST Summary Report requests:

1. Demographic and Income Profile Report describing the City of Redlands:


2. Demographic and Income Profile Report Describing the Redlands ZIP Codes



3. Demographic and Income Profile Report Describing the county containing Redlands (San Bernardino County)


Next week, for Section 2, I'll add the ASP.NET C# code to do the same in REST and SOAP.

Take it easy.
0 Kudos