• No results found

Quick and Easy Web Maps with Google Fusion Tables. SCO Technical Paper

N/A
N/A
Protected

Academic year: 2021

Share "Quick and Easy Web Maps with Google Fusion Tables. SCO Technical Paper"

Copied!
16
0
0

Loading.... (view fulltext now)

Full text

(1)

Quick and Easy Web Maps with Google Fusion Tables

SCO Technical Paper

Version History

Version Date Notes Author/Contact

1.0 July, 2011 Initial document created. Howard Veregin

1.1 Dec., 2011 Updated to reflect integration into Google Docs.

New sections added: additional symbolization methods; using KML and Shapefiles; heat maps;

and known problems.

John J Czaplewski

Copyright © 2011 The Board of Regents of the University of Wisconsin System

(2)

Quick and Easy Web Maps with Google Fusion Tables | SCO Technical Paper 2

Introduction: What are Fusion Tables?

One of the quickest and easiest ways to produce simple maps for your Web site is to use Google’s Fusion Tables. Fusion Tables is an online data management application designed for collaboration, visualization and publication of data.

Fusion tables allow you to:

 Upload and manage map data.

 Map points, lines or areas.

 Create pushpin, intensity, and other types of maps.

 Create other types of visualizations (charts).

 Embed your visualizations in a Web site.

 Share and collaborate with others.

For background on Fusion Tables see www.google.com/fusiontables. Google Earth Outreach

(earth.google.com/outreach/index.html) provides several useful tutorials on Fusion Tables to help you import, map and publish your data:

 Learn the basics and customize info windows:

earth.google.com/outreach/tutorial_fusion_sample.html

 Mapping your own data: earth.google.com/outreach/tutorial_fusion_yourowndata.html

 Sharing and publishing a map: earth.google.com/outreach/tutorial_fusion_publish.html Here are some simple use cases for Fusion Tables maps:

 A biogeographer creates a map of wolf sitings in Wisconsin, publishes the map to a Web site, and then updates the map as new sitings are made.

 A community maps the locations of available commercial properties and posts the map online to promote business development.

 A journalist creates a series of election maps for senate districts in the state and embeds the map in an online article.

 A non-profit organization creates maps of bicycle accident locations to raise awareness of bicycle safety.

Objectives of this Technical Paper

This SCO Technical Paper gives you a quick tutorial on the basic features of Fusion Tables for making simple Web maps. It does not give you all of the details on Fusion tables or discuss all map-making options. This paper shows you the basic steps for:

 Making a simple pushpin map from a spreadsheet.

 Customizing icons.

 Publishing this map to a Web site.

 Uploading KML and Shapefiles.

(3)

Quick and Easy Web Maps with Google Fusion Tables | SCO Technical Paper 3

Getting Started: Creating a Simple Pushpin Map

To create a simple pushpin map you will need a source of point data, and for this tutorial we will start with a Microsoft Excel spreadsheet of Wisconsin populated places from GNIS (Geographic Names Information System). GNIS is the official repository of place names in the United States. The data was obtained from the download link at geonames.usgs.gov/domestic/index.html and saved to an Excel file.

The data was then filtered to include only features with a class equal to Populated Place. The data includes a place name, county name, latitude and longitude, and several other attributes. Populated places in GNIS include incorporated places (cities and villages) as well as unincorporated places. There are 2521 records in the GNIS dataset for Wisconsin (at time of download).

The sample dataset is available for download at

www.sco.wisc.edu/images/stories/download/fusion_tables_sample_data.

Excel spreadsheet of GNIS populated places in Wisconsin

Fusion Tables accepts data in various formats, including Microsoft Excel files, OpenDocument Spreadsheets, delimited text files (such as .csv files), and KML files. See

support.google.com/fusiontables/bin/answer.py?hl=en&answer=171181 for more information on supported file types. There are size limits on most files (e.g., KML files must be smaller than 100MB) and an overall quota of 250MB per user.

To produce a map, Fusion Tables requires a field (or fields) that refers to the location of each feature. In this GNIS example, the latitude and longitude fields will be used. These fields are already in decimal degree format. If you have lat-long values that are not in decimal degree format, you will need to convert these to decimal degree format before importing into Fusion Tables.

Fusion Tables can also use an address field to locate data, and records will be automatically geocoded as the map is created. Likewise, Fusion Tables will recognize other location fields such as county names.

Fusion Tables is integrated into Google Docs. Before importing the Excel file, you will have to use your Google account to login to Google Docs at docs.google.com. (You will need to create a Google account if you do not have one.)

(4)

Quick and Easy Web Maps with Google Fusion Tables | SCO Technical Paper 4 Once logged in to Google Docs, click the Create button in the upper left portion of the window, and choose Table (beta) from the drop down menu (see figure below).

Creating a new Fusion Table

This will open a new tab in your browser, and you will be presented with the following window:

Importing a new table in Fusion Tables

(5)

Quick and Easy Web Maps with Google Fusion Tables | SCO Technical Paper 5 Now navigate to the file you want to import using the Browse button. When you click the Next button, you will be able to choose which columns to import using check boxes (see figure below).

Configuring the import

Additionally, you can specify the row in which the column names are located, as well as rename the columns by simply clicking on them. Clicking Next again takes you to a form that lets you add some simple metadata. Hitting the Finish button begins the file importation.

Once the file has been imported, choose Edit > Modify columns. In the GNIS example, both the

name_cnty column (county names) and the latitude column have been autodetected by Fusion Tables as Location fields. In addition, Fusion Tables has defined latitude and longitude as a two-column location field. (Note that longitude continues to be defined as a Number.)

Viewing and configuring columns in Fusion Tables

(6)

Quick and Easy Web Maps with Google Fusion Tables | SCO Technical Paper 6 Since Fusion Tables autodetected the location fields correctly, there is no need to modify any field definitions. But if needed, you could add or change the location fields. If you do not have latitude or longitude, you could use address data. Fusion Tables will geocode the data when the map is first made.

There are other attributes that can be adjusted from this box by using the Format drop down menu, such as specifying that a column contains an image or a link. This will ensure your data is properly visualized once a map is made.

Now you’re ready to make a map. To do so, simply choose Visualize > Map. Once the map is created, you can change the Location field value in the upper left to specify whether you want it to map by name_cnty or by latitude (the two alternate Location columns).

The resulting map is shown below.

A simple pushpin map of GNIS populated places in Wisconsin

(7)

Quick and Easy Web Maps with Google Fusion Tables | SCO Technical Paper 7

Next Steps: Customizing the Map

The map can be customized in a few ways. For example, click on Configure info window (just above the map) and click the check boxes to select or deselect attributes for display.

Configuring the information window for the map

Clicking on the Custom tab will allow you to modify the HTML code to change text styles, colors, etc.

Customizing the information window

(8)

Quick and Easy Web Maps with Google Fusion Tables | SCO Technical Paper 8 The map below has a customized information window.

The same map with a customized information window

The pushpin symbol can also easily be changed. To do this click on Configure Styles (just above the map).

Customizing the pushpin symbol

(9)

Quick and Easy Web Maps with Google Fusion Tables | SCO Technical Paper 9 In addition to these simple pushpin and dot icons, Fusion Tables supports 217 other basic Google icons that can be found at www.google.com/fusiontables/DataSource?dsrcid=308519

Click on the above link, select Visualize > Map, and zoom into the icon cluster to see what these icons look like. To insert these icons into your map you will need to return to your table and insert a new column by selecting Edit > Add column. To keep things simple, give this new column a Column Name of Icons and accept the defaults for Type and Format (see below).

Adding a new column

In this new column, add the name of the desired icon for each row using the exact format used in the table listed above in the link. For example, if you want to use a custom icon for Madison, find that row in the table, scroll over to the new Icons column, and type “capital_big_highlight”. If the Icon field is left blank for a row, the icon will default to the small red dot. Therefore, if a variety of icons are desired the Icon field needs to be filled out for every row.

Once an icon scheme is chosen, return to the map view by selecting Visualize > Map, and click on Configure styles near the top of the map. After the box opens, select the Column tab, click Use Icon specified in a column, and use the drop down menu to select your column named Icons (see below).

(10)

Quick and Easy Web Maps with Google Fusion Tables | SCO Technical Paper 10 Changing the way icons are specified

The map below has custom icons for all points.

A modified version with custom icons

This method works best when working with small datasets. If you wish to apply custom icons to larger datasets it is best to add a column and specify the names of icons for each row before importing your spreadsheet into Fusion Tables.

(11)

Quick and Easy Web Maps with Google Fusion Tables | SCO Technical Paper 11

Sharing and Publishing the Map

To share the map, click the Share button in the upper right. You can invite people to view or edit the map, and also specify the visibility. If the map is going to be shared on the Web or embedded in a Web site, it needs to be available with no signin required (i.e., Public or Unlisted).

Specifying sharing options

Now that the sharing options have been specified, the map can be embedded on a website. The first step is to specify the centering of the map. This can be done two ways. The easiest way is to zoom to the desired level and resize your browser window to create a frame for your map. The other, more

complicated, option will be discussed below. Next, click on Get embeddable link (just above the map).

Then, copy the HTML code from the small window that opens above the map. The code will look similar to the following:

<iframe width="500px" height="300px" scrolling="no"

src="http://www.google.com/fusiontables/embedviz?viz=MAP&q=select+col0%2C+col1

%2C+col2%2C+col3%2C+col4%2C+col5%2C+col6%2C+col7%2C+col8%2C+col9%2C+col10

%2C+col11%2C+col12%2C+col13%2C+col14+from+1164973+&h=false&lat=44.71983445

&lng=-89.89321955&z=7&t=1&l=col9"></iframe>

Parameters highlighted in yellow are ones that you may want to modify when embedding the map on a Web site. The width and height parameters define the size of the map. The lat and lng parameters define the center point of the map when it is first displayed, and the z parameter gives the zoom level (this is the other way to center and frame your map).

(12)

Quick and Easy Web Maps with Google Fusion Tables | SCO Technical Paper 12 For this example, we will simply embed the HTML code into a standard Web page.

Embedding the map using an HTML editor The resulting page would look something like this:

The embedded map

(13)

Quick and Easy Web Maps with Google Fusion Tables | SCO Technical Paper 13

Working with KML and Shapefiles

Fusion Tables also has the ability to work with other types of geodata, such as KML and Shapefiles. With these types of files, users can import line and polygon data. You can upload a KML (.kml) file to Fusion Tables with no conversion required. This is especially useful if you’re exporting from Google Earth.

However, Fusion Tables cannot natively handle Shapefiles (.shp) and to import these into Fusion Tables, a series of steps is required.

For this example we will work with a Shapefile of Wisconsin counties from the US Census Bureau. This Shapefile can be downloaded from www.census.gov/cgi-bin/geo/shapefiles2010/main. Under Select a layer type select Counties > Wisconsin and then download the shapefile. The sample dataset is also available for download at www.sco.wisc.edu/images/stories/download/fusion_tables_sample_data.

There are two ways to import a Shapefile. The first uses a combination of ArcMap and Google Earth to convert the file manually. The second method uses www.shpescape.com to automate the conversion of the Shapefile. Both methods will be discussed here. The choice of which to use will depend on your needs and level of technical expertise.

Manual Conversion. To convert your Shapefile manually, add it as a layer in ArcMap. Next, open ArcToolbox, and select Conversion Tools > To KML > Layer to KML.

Converting to KML

A dialogue box will open. For the Layer field select your Shapefile, for the Output File select the target directory and a name for the exported file, and for Layer Output Scale simply type “1”. Let all other fields default and select OK to run the script.

A box will pop up telling you the layer has successfully been converted to KML. Now open the target directory specified in the previous step and find your new file. Note that your exported file is actually a KMZ which cannot be read directly by Fusion Tables. To fix this, open the KMZ file in Google Earth. Select

(14)

Quick and Easy Web Maps with Google Fusion Tables | SCO Technical Paper 14 File > Save > Save Place As which will open a dialogue box. Pick a new name for the file and under “Save as type:” be sure to change it to KML. Save the file.

Now we can import the KML file into Fusion Tables. Following the instructions above, create a new table, but this time select the KML file as the table to import. Let everything else default and finish the import. Select Visualize > Map.

Imported KML file based on Shapefile

Automated Conversion. The automated method using shpescape is quicker than the manual method because you can directly insert a zipped shapefile into a Fusion Table. Another advantage is that, unlike the manual method, shpescape preserves the attribute table of the Shapefile. With the manual method, most of the data is merged into a single column with embedded HTML codes.

To use the automated approach, you must give the shpescape Web site permission to access your Google account. To do this, go to www.shpescape.com, and select Continue to give access to your Google account. Because the Shapefile must be zipped in order for this Web site to convert it, we can use the zipped package that came directly from the Census Web site. If you are using your own

Shapefile, you must create a zip file containing the Shapefile and all associated files (usually a .shx, .sbn, .prj, .dbf, .avl, and .shp).

To convert the zipped Shapefile in shpescape, navigate to the zip file and select Upload. After a few minutes, the conversion screen will show “Status Complete” and a link to the new Fusion Table will appear (the link will be a hyperlinked number).

(15)

Quick and Easy Web Maps with Google Fusion Tables | SCO Technical Paper 15 The completed conversion

Click on this link and you will be taken to your new table in Fusion Tables.

Whether you use the automated or manual method, once the new polygon map is visualized, selecting Configure Styles will allow you to change the fill color, border color, and border width of the polygons.

Creating a Heat Map

Fusion Tables can also be used to create a heat map. This is another method of point data visualization that shows the density of points in a given area. To make a heat map, simply check the Display as heat map box above the map. If you do not see anything, zoom out further. Using the populated places data from above, this heat map was created.

Heat map showing the density of populated places

(16)

Quick and Easy Web Maps with Google Fusion Tables | SCO Technical Paper 16

Known Problems

See code.google.com/p/fusion-tables for a discussion of software bugs, issues and feature requests.

 One problem with Fusion Tables currently is that when multiple points share exactly the same location, only one point is displayed.

 Attempting to visualize large data sets as a Line, Pie, or Bar graph crashes any and all Google products currently open in the browser.

 The intensity map visualization does not seem to work with custom enumeration units. Per the instructions at support.google.com/fusiontables/bin/answer.py?hl=en&answer=1032332, using the Buckets customization is the best way to create these types of maps. However, you must know the distribution and class breaks of the data you wish to visualize in order to take advantage of this feature.

Next Steps

There are many more options available in Fusion Tables for management, display, and sharing of your data.

Topics for future versions of this Technical Paper include:

 Creating other map types (e.g., intensity (choropleth) maps).

support.google.com/fusiontables/bin/answer.py?hl=en&answer=1032332

 Options for sharing your maps.

Additional information on fusion tables is available at www.google.com/support/fusiontables and there is a help forum at groups.google.com/group/fusion-tables-users-group. Also be sure to read Google’s privacy policy and terms of use at www.google.com/fusiontables.

References

Related documents

It is very important for an organization to seek feed back from its consumers and retailers to know the effectivity of their marketing strategies. Marketing Research

The present findings support earlier findings of the beneficial effects of positive youth development attributes and better family functioning on lower levels of pornography

Google Sheets is a spreadsheet program included as anchor of paper free web-based Google Docs Editors suite offered by Google The dim also includes Google Docs Google Slides

Google Maps integrates transit stop, route, schedule, and fare information to make trip planning quick and easy for everyone?. It epitomizes the premise that service planners know

!he action of this story, as with many of the stories written by 4l !ayeb Salih, occurs in the 6ctional setting of the village of ad &#34;amid, which is in (entral Sudan. !his

Google Maps is a free web mapping service application and technology provided by Google that powers many map-based services including the Google Maps website, Google Ride Finder

Creating Web and Mobile Maps Using ArcGIS Online | SCO Technical Paper 9 Unique Symbols allows the user to use a unique color ramp to represent different classes of data within

Google Maps screen capture image file Link to Google Maps Directions for Hotel Location. Registration web