Wednesday, September 21, 2011

5-layer limit for Google Fusion Tables

My "learning the hard way" lesson yesterday was discovering that you can only have five Google Fusion Table layers on a map at one time.

I was working on a map for an upcoming story that used both polygon areas and points. I needed to break the polygons into five different groups, and planned to do the same with the points. I figured I could create different layers in ArcMap using Select by Attributes, import each layer into Fusion Tables and then color them appropriately.

All that was fine as I worked on my five polygon layers first, but as I tried to add my first point layer, it wouldn't show up and I was at wit's end. I checked to make sure the layer was public, and that I hadn't copied and pasted the two sections of code incorrectly in my HTML file. I then backed down to my original five layers and swapped a point layer table ID in and it worked, so I knew it wasn't the table layer, it was something else.

Fearing there was some kind of limit, I searched around and found a couple of blog posts and this reference in the Gooble Maps Javascript API (under the headline Limits) that says "Up to five Fusion Tables layers can be added to a map."

What was my solution? For my polygon layers, luckily I had all the data in an single layer in ArcMap to begin with ... I had been trying to separate them so I could color them separately in Fusion Tables. What I did was add a new column to the data and made up my own numbering system to designate the different layers. Then, once in Fusion Tables, I set the fill color to use Buckets and then picked that column and set the colors manually based on the numbering system I had come up with.

I did the points more or less the same, adding a "marker" column based on this reference.

I'll publish a link to the map once the story runs.

Monday, September 12, 2011

Exporting to KML, putting layers together

I'm still learning quite a bit about using ArcMap and Google Fusion Tables together to publish  maps online of the homes destroyed in the Bastrop County Complex fire, and two things came up late last week that are worth sharing.

First, I usually use a wonderful tool called Shape To Fusion (or SHaPeEscape as we call it, after the domain name to upload my ArcMap shapefiles (my map data with points, polygons and other such goodies) to Google Fusion Tables. It's a freaking awesome tool by Josh Livni that is free to to use. But on this particular day, there were several files in the queue and/or it was backed up, so my files were not processing quickly enough for me.

I figured there had to be a way to export KML (the map file format that Fusion Tables/Google Earth needs) directly from ArcMap. I searched around and found this Export to KML 2.5.4 script for ArcGIS Desktop. It's a public domain plugin that you can download and install, allowing you to export our ArcMap layers into KML. I found it a little clunky, and it didn't seem to export all my other data -- just the columns with the shapes -- but it got me where I needed to be in a time of need. I still prefer ShpEscape, but the Export to KML plugin is worth playing with. Are there other, better plugins out there for this?

My next challenge was to layer together a shapefile of the fire boundary behind the dots of all the houses. For this, I used the Fusion Table Layer Builder tool. This allows me to show a single map with two (or more) different Fusion Tables. I thought at first I would just merge the tables, as I've done in the past with Census shapefiles data, but in this case there wasn't a foreign key to merge on. (In other words, I didn't have something in the boundary table that was the same in the list of houses.) The layer builder allowed me to start with the fire boundary, and then add the house list on top of it, giving me resulting javascript code that I could publish and pull into my site as an iframe. You can also set the size of the map, the centerpoint, the zoom level and what other Google Maps controls you want to display. It's a sharp little tool.

Wednesday, September 07, 2011

Two more days of fire mapping

Another day (or two) and another fire map (or three).

Tuesday I spent the day searching official data on where fires have been burning in Central Texas. I wanted outlines or addresses, something better than the dots the Texas Forest Services provides, or than the InciWeb data I wrote about the other day.

I spent the most time working with the USDA Forest Services's Remote Sensing Applications Center site, working with the Current Large Incident data. What was really nice about this was I could download the KML directly from them and load it into Fusion Tables. The result was this map of fire centerpoints which gives the scope of the large fires, but misses some others that were important to our area, like the Steiner Ranch fire. Even though our fire officials said it was a 162-acre fire, it didn't show up even though they are supposed to show fires over 100 acres. The other issue is the map doesn't update on it's own. Pity.

Of course, about the time I did that, someone pointed us to this Google Crisis Center map, which does update as more data becomes available, so that is nice. I like the Red Cross shelters, too, though I could've figured that out.

But today, we finally got some official releases of damaged houses from Bastrop County. I had hopes we could just upload the addresses into Fusion Tables, but as usually some of the addresses didn't map well. Mockingbird Ln addresses ended up on Mockingbird Hill several miles away, and some county roads didn't do well, either.

I put the address list into ArcGIS and geocoded them there, and got better results on all but three addresses. I ended up just hand-plotting those based on the maps from Bastrop County and publishing a map here.

Monday, September 05, 2011

Mapping the Central Texas Wildfires

There are a series of wildfires burning around Central Texas right now, and first and foremost I offer up prayers and condolences to those who have lost property in the fires. It's been a catastrophic weekend.

In response to the fires, I created two news applications involving maps ... one that allows readers to file reports about fires and damage that we can map, and the other that takes Texas Forest Service fire data and maps it.

The reader reports app (Submit fire reports | Mobile friendly form | Map of reports) was really a reworking of a Caspio database I had done last winter to map rolling blackouts by ERCOT. They ended by the time I built it, and I thought we would use it this summer during our record heat, but it appears we've escaped the summer without blackouts (let's hope!) Anyway, it took me about an hour to edit the forms and map to collect fire data instead of blackout data.

Caspio does a good job with their map mashup directions, making user-generated content like this pretty easy.

The second app of Texas Wildfire Incidents was created using a GeoRSS feed from InciWeb, fed into MapChannels and embeded on our page. Unfortunately, the data from the Texas Forest Service is not very comprehensive (descriptions are cut off; geolocations not always there) and the MapChannels map is buggy as a result. I just found that MapChannels site today and that bears some more investigation.

There is definitely more to be done with this story. Will have to dive into it some more tomorrow.

Saturday, September 03, 2011

Using ArcGIS, Fusion tables for Census story

I was recently able to attend to workshops sponsored by Investigative Reporters & Editors at the University of Missouri ... one on computer assisted reporting (really Excel and Access training) and one on mapping (using ArcGIS.) Both courses were great, but I was quite brain dead after seven solid days of training.

The the first fruits of that labor was published Saturday in the Austin American-Statesman and in a story about same sex households in Texas by Juan Castillo. In addition to helping Juan with deciphering and ranking the U.S. Census data, I created two online maps showing the change of same sex households in Texas counties and Central Texas communities.

Other than the program ArcGIS, I used several online tools to make the maps. I used IRE's project to download the data and shape files I needed. If you know what you are looking for, it's much easier than the Census Bureau's American Factfinder2. After doing some clipping and joining in ArcGIS, I created new shapefiles, which I then pushed to Google Fusion Tables using and awesome tool by Josh Livni called Shape to Fusion (or Shape Escape).

The display design on was lifted from my colleague Gerald Fullam from the Dayton Daily News, who modified code originally by the Chicago Tribune.

I'd done work with Fusion Tables before but this was a little more complicated because I had to snip the "places" shapefiles to include just communities in our five-county MSA, a task that ArcGIS makes much easier than trying to go through a massive file in Excel. It was cool.

So, I get a byline of sorts on and justify my existence and the training my paper paid for me to attend (thank you!)

(After looking at my colleague's print graphics, I wish I had done same sex household percentages for tracts in our 5-county MSA, and if I can get some other stuff out of the way this weekend or Tuesday, I might try to whip that up. )


  © Blogger template 'A Click Apart' by 2008

Back to TOP