Tuesday, June 25, 2013

ArcGIS Skills for Hawaii

Do you want to learn ArcGIS for Desktop GIS Software?


I teach a night class for the PCATT program at Honolulu Community College that introduces students to ArcGIS for Desktop using Esri's Virtual Campus supplemented with additional Hawaii-specific "Show & Tell" information and "Challenges".

This summer (2013) I'm working on a GIS project with several students from Maui and the Big Island - Hawaii GeoTeam 2013 - and they needed to learn ArcGIS for Desktop. Since we're working remotely, I've moved a lot of my "Show & Tell" and "Challenge" content to a GeoTeam 2013 blog.

Special thanks to Alex, Jeremie, Josiah and Lotus for working on this project and helping me test the online content, and to Bill and Ria for giving me the idea to make the materials available to others.

You're welcome to use these materials to support your own self-study. You'll need to purchase the online class "Learning ArcGIS Desktop (for ArcGIS 10)". If you don't have the ArcGIS for Desktop software, you can request a copy after you register.

The online class was prepared with Desktop version 10.0 but works just fine with version 10.1. I've posted some notes where there are differences.

There are three types of blog entries: notes, show & tell and challenges.

   - Notes are used to show where version 10.0 and 10.1 are different

   - Show & Tells are used to give materials that supplement what you've learned in the online class modules.

   - Challenges are used for you to practice what you have learned using Hawaii examples.

Here are the blog entries, in order, to go with the eight modules in the online class. Modules 1 thru 4 are treated as a unit.

Modules 1 - 4 (Introduction to GIS, Features and Attributes)

   Notes on differences between 10.0 and 10.1

   Quiz

   Answers to Quiz

   Show & Tell for Modules

   Challenge for Modules

Module 5 (Editing)

   Notes on differences between 10.0 and 10.1

   Show & Tell

   Challenge

Module 6 (Tables, Analysis)

   Show & Tell on Safe Relationships

   Show & Tell on Census Data

   Challenge

Module 7 (ModelBuilder, Analysis)

   Show & Tell on Parcel Data

   Challenge

Module 8 (Layouts, Maps and Reports)

   Show & Tell on Election Data

   Challenge

Extra Credit (ArcGIS Online) - Free online tutorial, instructions in Show & Tell

   Show & Tell

Friday, June 7, 2013

DOH Flu Vaccinations Sites - Embedded Map Example

Here's a blog post for web designers on how a web map can be embedded in a web page and then linked to a mapping application.

Muggle Warning - HTML code will be used in this blog

For this example I'm going to use a web map and a mapping application used by the Hawaii State Department of Health to show flu vaccination sites.  Here are the web IDs for the two items:

   web map ID:                 webmap=cda25f51ce994443a592011ecec15e03

   mapping application ID:   appid=8d6af87ca1f249878b2e6beb9a38ebec

Starting in the web map editor on ArcGIS Online, you click the "Share" button and then click the "Embed in Website" button. That opens up a window to configure the embedded web map.

You can use the radio buttons to configure the tools that will be available on the embedded web map.

As you turn various tools on and off, the code in the HTML window will change accordingly.

For example, here you can see I've turned on the zoom control, legend, description and search tools.

I've also set the size to 500 x 400 pixels and added a link to "View Larger Map".

When you're finished configuring your embedded web map, you can copy the code in the HTML window and paste it into your web page.

Here's the web map for flu vaccination sites embedded into this web page using the configuration example above (modified as described below):


View Larger Map

This is a live map, the user can pan, zoom, search and click on a star for more information.

But there's one further modification you can do. By default, the "View Larger Map" link opens the web map in the web map editor. It is usually better to open the web map in a mapping application. You can do this by changing the HREF link that you copied from the HTML window.

Let's deconstruct the code from the HTML window and you'll see what I mean. Here's the code split into sections:

1) set up the iframe size and other parameters:
<iframe width="500" height="400" frameborder="0" scrolling="no" marginheight="0" marginwidth="0"
2) use the embed template from ArcGIS Online:
src="http://histategis.maps.arcgis.com/home/webmap/templates/OnePane/basicviewer/embed.html?
3) put the flu vaccination sites web map inside the template:
webmap=cda25f51ce994443a592011ecec15e03
4) open the map at an extent that shows the eight main Hawaiian islands:
&amp;gcsextent=-160.3411,18.6238,-154.6612,22.7594
5) add the tools selcted during configuration:
&amp;displayslider=true&amp;displaylegend=true&amp;displaydetails=true&amp;displaysearch=true">
6) close the iframe that contains the embedded map:
</iframe>
7) start on a new line and make the font smaller:
<br /><small>
8) use the viewer template from ArcGIS Online:
<a href="http://histategis.maps.arcgis.com/home/webmap/viewer.html?
9) put the flu vaccination sites web map inside the template
webmap=cda25f51ce994443a592011ecec15e03
10) open the map at an extent that shows the eight main Hawaiian islands:
&amp;extent=-160.3411,18.6238,-154.6612,22.7594" 
11) set the color of the text and set it to open in a new window:
style="color:#0000FF;text-align:left" target="_blank">
12) show the text and close the hyperlink and set the font back to what it was
View Larger Map</a></small>

To change the "View Larger Map" hyperlink to open a mapping application, you need to change parts 8 - 10 as follows:

8) change from the viewer template to the OnePane basicviewer app template:
<a href="http://histategis.maps.arcgis.com/apps/OnePane/basicviewer/index.html?
9) change the template contents to the app:
appid=8d6af87ca1f249878b2e6beb9a38ebec
10) and you don't need the extent at all (the app knows the extent) but keep the close quote:
&amp;extent=-160.3411,18.6238,-154.6612,22.7594

So now the HTML text to copy and paste looks like:

<iframe width="500" height="400" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://histategis.maps.arcgis.com/home/webmap/templates/OnePane/basicviewer/embed.html?webmap=cda25f51ce994443a592011ecec15e03&amp;gcsextent=-160.3411,18.6238,-154.6612,22.7594&amp;displayslider=true&amp;displaylegend=true&amp;displaydetails=true&amp;displaysearch=true"></iframe><br /><small><a href="http://histategis.maps.arcgis.com/apps/OnePane/basicviewer/index.html?appid=8d6af87ca1f249878b2e6beb9a38ebecstyle="color:#0000FF;text-align:left" target="_blank">View Larger Map</a></small>

Copy and paste the above code into your web page and you'll have an embedded web map just like the one above.

Use the comments if you have any questions on this.

A hui ho!

Thursday, June 6, 2013

National Day of Civic Hacking Honolulu: The Mapping Guy

Looking for the links to State of Hawaii and City and County of Honolulu map services? They're about half way down through this blog. I hope you'll read the whole blog, but if you need the links quickly, here they are:


                                                                                                                            

On June 1, 2013, Honolulu held an event as part of the National Civic Day of Hacking. Thanks to Burt Lum and the Code for America Honolulu Brigade for organizing and sponsoring Honolulu's event.  About half of the 50 or so people at the event were software developers, the other half were government representatives and interested citizens.

Burt introduced me as "the mapping guy" and it's true, my passion is maps and now online maps and mapping applications.

I've given talks at Hon*Celerator, Unconferenz 2013 and the PCATT IT Summit where I talk about the importance of maps and how lists of locations are good, but maps of locations are better. And dynamic maps based on map services and map applications that provide search and analysis tools are the best. Many of my past blogs have been on this same theme:


So I wanted to talk about three things, a bit different, but related, on this day of civic hacking. "No FTP / Download" is for the software developers. "Gov Apps = Citizen Apps" is for government and citizens. "Vote" is for everyone.

NO FTP / DOWNLOAD

Government is opening up more and more data and sharing it with the public. Why do I say "NO FTP / DOWNLOAD"? It was interesting how many other presentations during this national day of civic hacking involved maps. But if you stop and think about it, this makes perfect sense. Much of the data that citizens are interested in is data on places close to where they live, work, go to school and play - yes, maps!

The mapping community has been sharing open mapping data for a number of years now and one of our lessons learned is that data gets stale, it gets old, it gets outdated. At first, all we could do was go back to the ftp site regularly and check if there was an update. If there was, we'd download and process it.

But as internet connection bandwidth increased it became possible to make current mapping data available as map services. No more FTP, no more downloads, no more stale data! There are still times when I need to download mapping data, but more and more I'm able to work with the map services directly. The State of Hawaii and all four counties (Hawaii, Maui, Honolulu and Kauai) have started publishing mapping data as RESTful map services.

And it's not just mapping data. Both the City and County of Honolulu and the State of Hawaii use Socrata to host their open data portals. Data on Socrata can be downloaded, but is also available via their SODA RESTful services.

Software developers need to know how to use these RESTful services so they can decide when it's best to download data and when it's best to connect to a service. Here are a couple of examples where connecting to a map service is better than downloading.

Oahu Tsunami Refuge Centers

When a tsunami watch or warning is given, residents and visitors in tsunami evacuation areas need to leave the area. Residents often go to a family or friend's home that is outside the evacuation area. Visitors can evacuate to the upper floors of their hotels. Another option is to go to a tsunami refuge center. These centers are not shelters, they don't provide food or services, but they do provide a safe place, usually with restroom facilities, to wait until the danger has passed.

An earthquake in Canada on October 27, 2012 caused a tsunami and Hawaii received a tsunami warning. All I could find online was a list of the tsunami refuge centers, and since lists are good but maps are better, I created a mapping application that showed the evacuation zone and the refuge centers. I wrote about this on my blog and also in an article in Civil Beat that called for the government to make better use of map services to inform the public.

The City and County of Honolulu now publishes a tsunami mapping application similar to what I created during the tsunami event. Their application uses a web map with two map services also published by the City and County of Honolulu - one for the tsunami evacuation zones and one for the refuge center locations. Both these map services are open so that software application developers can use the data in their own apps.

So if you're developing an application using tsunami refuge center data, would it be better to download the data, or better to connect to the service provided and updated by the City and County of Honolulu? If you connect to the service, then as soon as the City makes a change to the data, your application will immediately see it. If you download the data then...

Hawaii Flu Vaccination Sites

The State of Hawaii Department of Health has taken what used to be a 14 page PDF list of flu vaccination locations and turned it into a mapping application that shows the locations, whether a prescription is required, whether an appointment is required, and lots of other useful information. Similar to the tsunami application, this application uses a web map with a map service of flu shot locations that is published and updated by the Hawaii Department of Health. This map service is also open so that application developers can use the data in their own apps.

The data behind the map service is updated regularly and of particular interest is a data field or column called "ShotsAvail". This column has two possible values - "Yes" or "No". If your app connects to the service, then you can use this information to correctly show which locations have either flu shots or flu mist available (Yes) and which have neither available (No). In the mapping application, only those sites where "ShotsAvail" = 'Yes' are shown. But the map service contains all the locations so you as an app developer need to pay attention to this value.

State of Hawaii and City and County of Honolulu Open Mapping Data

Hawaii, Maui and Kauai are just getting started with their open mapping portals, but the State of Hawaii and the City and County of Honolulu have published quite a few map services along with web maps and mapping applications. I showed these at the civic hacking event but the URL was too long for people to copy down, so here are the links:

   State of Hawaii Open Map Services (developers connect to these map services)

   City and County of Honolulu Open Map Services (developers connect to these map services)

These are the same links that are at the top of this blog post.

GOV APPS = CITIZEN APPS

In my Ignite talk at Unconferenz 2013, I talked about the importance of maps and open data, but also about the importance of open tools for analysis. Access to maps and data is great for citizens to have, but sometimes there are also analysis tools used by government to help understand data and to create future alternatives based on actual data. In my talk I urged that government provide these same tools to citizens.  

In my talk at civic hacking I explained in more detail a project I was involved in where this was done and how citizens used analysis tools, the same tools used by government, to provide informed public testimony that did influence government decisions.

My example was redistricting. I was the mapping guy supporting the State of Hawaii Reapportionment Commission. Reapportionment and redistricting is done every ten years following the decennial census to adjust political boundaries to balance population changes. I won't get into the details on the process, you can read more here if you're interested.

The Commission was using an online mapping application that had maps, census data and analysis tools to help them re-balance the political boundaries. What is interesting is that the Commission decided to make this same online mapping application available to the public. Anyone could get a login by providing their email address and then create their own redistricting plan using the same tools as the Commission.

The public responded! By the end of the process, 586 accounts had been opened and 845 redistricting plans were created. Members of the public came to public hearings and not only submitted oral testimony, they also submitted their maps and they submitted their plans. It was a great success. And because I was the map guy working with the Commission, I can say with confidence that these publicly created maps did influence Commission decisions and that the final maps adopted did contain changes that came from public input.

And because the Commission's mapping application was using map services, those same map services, open to the public, could be used to create other applications. I created a web map and mapping application that was published to desktop and mobile devices. Smartphone users could install an app and then open up the new political maps on their iOS, Android and Windows devices.

So "Gov Apps = Citizen Apps" is my way of saying that if the government is using apps (tools) as part of their decision making, that whenever possible, those same tools should be made available to the public.

VOTE

Hawaii ranks low nationally in percent of voter registration and voter turnout on election day. There are many reasons posited for this, but my hope is that better access to government data, maps and tools will help spur understanding of and interest in government.

We were asked to come to this meeting with ideas for civic hacking projects. I don't know what form it might take, but I'd be very interested to work with a team on civic applications to try and increase Hawaii's rate of voter participation. Maybe an app for voter education, maybe an app to encourage voter registration, maybe an app to make more information on candidates and issues easily available.

Feel free to use the comment section on this blog to post your ideas on how we might do this.

And if you are a US citizen and a Hawaii resident 18 years or older, and you haven't registered to vote, do it now!

A hui ho!