Tag Archives: Google Maps API

Data Analytics & API Applications

Possibly the most well known APIs (Application Programming Interface) are the Google APIs. Among these, the Google Maps API, or its use, might be the most familiar. See about integrating political/statistical geography and Google Maps API. This section reviews different types of APIs.

Data Analytics and APIs
API technology/tools play an important role in accessing and integrating geographic, demographic and economic data. APIs offer two types of benefits. For Web-based applications, APIs provide the ability for on-the-fly access to selected demographic-economic buried in otherwise large datasets that typically otherwise involve downloading and preprocessing. A second important benefit/use is to extract data from those same datasets, reconfigure the structure of the data retrieved by API and create a new dataset structure that lends itself to analytical applications.

ProximityOne Data Analytics sessions review purpose, scope, strengths, advantages & limitations of APIs described in this section. Topics included in the related Web section include:
Federal Geographic-Demographic-Economic Data Access Using APIs
Federal Communications Commission
Bureau of the Census … much more than Census
Bureau of Economic Analysis
Bureau of Labor Statistics
Data Access & Analytics Applications
There are hundreds more APIs available from Federal agencies and wide-ranging sources.

Using APis and GIS: Visualizing Patterns; Geospatial Analysis
The following graphic has been developed first using API tools to create the underlying datasets. While the source data used in this application could have been downloaded and processed in legacy manner, the API tools provide on-the-fly development of the data in a structure required by the GIS software. These data are then integrated into shapefiles for use with the GIS software. Once the datasets are developed, they can be used in a myriad of application, GIS and otherwise.

Patterns of Male Hispanic Population Age 5 Years by ZIP Code
— Houston, TX Area

• Click graphic for larger view with ZIP Code labels and more detail.
• The graphic shows patterns of the Male Hispanic population 5 years of age as of Census 2010.
• The view illustrates how single year of age by gender by race/origin can be visually analyzed.
• See more about these data and single year of age demographics

Examples and More Detail
See the corresponding Web section on Data Analytics & Using APIs. Many See application examples are shown there.

About the Author
— Warren Glimpse is former senior Census Bureau statistician responsible for innovative data access and use operations. He is also the former associate director of the U.S. Office of Federal Statistical Policy and Standards for data access and use. He has more than 20 years of experience in the private sector developing data resources and tools for integration and analysis of geographic, demographic, economic and business data.

Extracting Shapefile Geometry & Google Maps

Geography, and geographic data, play an indispensable role in the development and use of decision-making information. Almost all business, demographic and economic data relate to location(s) or area(s).

The Census Bureau TIGER/Line data, predominately made available for public use as shapefiles, are equally or more valuable than the Census Bureau demographic-economic data. These geographic data are the source for almost all online map services now in existence. The Census Bureau releases thousands of public use shapefiles annually that reflect changing geography — changes to political and statistical boundaries and changes to roads and earth surface geographic attributes. Use the Shp2XML software to extract shapefile geometry and output those data to XML-structured file.

Shapefile Geometry as XML File with Google Maps API
Integrate the shapefile geometry into a Google Maps API application.

Click graphic to view as dynamic Google map.

Shapefile Geometry
Shapefiles do not contain the geometry coordinates in the shapefile DBF. The geometry coordinates (e.g., latitude and longitude of vertices) are not directly viewable or extractable without specialized software. Many applications require coordinates only available in shapefiles. For example, an XML file with coordinates can be used as a polyline or marker file with Bing or Google maps. The coordinates list can be processed by wide-ranging geospatial applications.

Extracting Shapefile Embedded Geometry
Use the Shp2XML software to extract shapefile geometry and output those data to XML-structured file. Shp2XML generates an XML file (text file) that contains the coordinates of the each shape in the user selected shapefile (or a subset of shapes in the shapefile if a query is applied). Optionally save the XML file in XLS format.

Using Shp2XML — an example of exporting census tract boundaries
The Shp2XML start-up view is shown in the following graphic. The map view shows Washington, DC by Census 2010 census tracts. The view is based on the shapefile (cb_2013_11_tract_500k.shp) included with the installer,

Click graphic for larger view
User controls and legend panel are shown to the left of the map view panel. The XML file generated is shown to the right of the map view.

Using Shp2XML — an example of exporting roads/line segment geometry
The following view shows Washington, DC by ZIP Code area (ZCTA) and all roads/edges shapefiles as layers. The view uses the shapefile ZCTA shapefile (cb_2013_11_tract_500k.shp) and the EDGES shapefile (tl_2010_11_zcta510.shp) both included with the installer.

Click graphic for larger view
This view was developed using these steps:
• Use File>Open Shapefile to open the ZCTA shapefile.
• Use Add Shapefile (+ button at top of left panel) to add the EDGES shapefile.
• Modify attributes of the ZCTA layer to set as transparent/red boundary with ZIP Code as label.
• Add the query “roadflg=’Y’ and ZIPL=’20010′” (this results in only meeting roads this criteria to be exported.
• Select a field to be used as NAME (NAME) and field to be used as CODE (TLID) using list boxes.
• Click the Shp2Xml Convert button.

Installing and Using Shp2XML
Shp2XML Level 1 is available at no fee to members of the ProximityOne User Group (no fee, join now).

See more information about installing and using Shp2XML.