Читать книгу Getting to Know Web GIS - Pinde Fu - Страница 8
ОглавлениеChapter 2
Hosted feature layers and Esri Story Maps
Apps are important because they are the face of Web GIS: They bring Web GIS to life. You created a web app in chapter 1. The ArcGIS Web GIS platform offers far more web apps. This chapter presents an overview of ArcGIS configurable apps, which include apps from ArcGIS Online, Portal for ArcGIS, Esri Story Maps, and ArcGIS Solutions. The chapter then introduces the basic components in today’s Web GIS apps and the foundation supporting these components, which is web services technology. You’ll learn about feature services and feature layers, which are the most common types of operational layers. The chapter then teaches how to create a hosted feature layer, design layer styles using smart mapping, and configure layer pop-ups with ArcGIS Arcade. The tutorial section further illustrates how to use layers from the Living Atlas of the World, and how to create a web app using Story Map Journal .
Learning objectives
Understand the suite of ArcGIS configurable apps.
Understand the suite of Story Maps templates.
Grasp the concept of web services.
Create hosted feature layers using geocoding.
Design layer style using smart mapping.
Configure pop-ups with multimedia and Arcade.
Explore Living Atlas of the World contents.
Create an app using Story Map Journal.
ArcGIS offers many ways to build web apps. The green lines in the figure highlight the technology presented in this chapter.
Apps, the face of Web GIS
GIS apps are lightweight map-centric computer programs that end users use on mobile devices, in web browsers, or on desktops. Web GIS end users directly interact with apps. The back-end data, services, and server computation power of Web GIS become live and useful through GIS apps. ArcGIS provides ready-to-use web apps, including configurable apps, mobile apps, app builders, and more. Mobile apps and app builders such as Web AppBuilder for ArcGIS will be introduced in other chapters. This chapter focuses on configurable apps.
ArcGIS configurable apps enable the broad user community to build engaging apps with no GIS or web development skills. ArcGIS platform provides the following configurable apps:
ArcGIS Online and Portal for ArcGIS app templates: These apps are also called configurable apps.
Esri Story Maps: Some of the Story Maps apps have become ArcGIS Online and Portal for ArcGIS app templates.
ArcGIS Solutions apps: These apps provide data and map and app templates for you to quickly jumpstart your applications projects.
Using ArcGIS configurable apps generally takes the following three steps: choose, configure, and deploy.
Using ArcGIS configurable apps generally takes three steps: choose, configure, and deploy the app.
Choose: In this step, you discover the data, maps, and configurable apps that match your app requirements. Consider the following factors:Purpose: Who is your intended audience? Where and how will your audience use your app? What key points do you want to communicate?Functional requirements: What critical functionalities support your purpose?Aesthetic: How will the app’s layout and color scheme support your brand or message?
Configure: Configure the apps to use your data, and brand the apps for your organization.ArcGIS Online and Portal for ArcGIS apps templates typically have a configuration user interface.Esri Story Maps provide a builder user experience.Solutions apps provide a configuration file that often requires manual editing.
Deploy: Deploy your new apps for your end users.Esri automatically hosts apps created using ArcGIS Online and Portal for ArcGIS app templates and Story Maps in the cloud. If needed, you can download the source code for these open-source apps and host the apps on your own web servers.Solutions templates need to be deployed to and hosted on your own web servers.
ArcGIS Online and Portal for ArcGIS app templates
ArcGIS Online and Portal for ArcGIS provide many app templates. To help you choose the right one, ArcGIS organizes these apps based on their purposes in the following categories:
Build a story map: These apps are adopted from Esri Story Maps.
Collect and edit data: These apps primarily collect data. These apps fall into the subcategories of crowdsourcing and general editing.
Compare maps and layers: These apps are focused on comparing geographic phenomena.
Display a scene (3D): These apps allow you to interact with 3D scenes outside of scene viewer.
Explore and summarize data: These apps allow your users to interact with attributes and in some cases other services to facilitate a deeper exploration of the content in your web map.
Make a gallery: These apps create a gallery of maps, apps, or other content that can be used as a convenient access point for all your geographic content. These apps require a group.
Map social media: These apps include social media content to supplement your message with relevant content.
Provide local information: These apps highlight the resources available at a location. Options include highlighting all features within a certain distance of a location and communicating that a user’s address is located within a certain geographic area.
Route and get directions: Use these apps to provide driving directions from a user-defined starting point to the geographic features within your map.
Showcase a map: These apps include many options for presenting thematic or general maps. The apps include legends, descriptions, and other basic tools to assist users in understanding the message of the map.
Esri Story Maps
Every story happens somewhere. Web GIS can enhance storytelling by visually and intuitively illustrating the “where” component of every story. Esri Story Maps (https://storymaps.arcgis.com) are simple web apps that combine interactive maps, multimedia content—text, photos, video, audio, and intuitive user experiences—to tell stories about the world. Story maps use geography to organize and present information.
Esri Story Maps combine interactive maps, multimedia content, and user experiences to tell stories.
Main types of configurable app templates provided by Esri Story Maps | ||
Presenting sequential, place-enabled photos or videos | ||
Story Map Tour | Presents a set of photos or videos along with captions, linked to an interactive map | |
Presenting a rich multimedia narrative | ||
Story Map Journal | Creates an in-depth narrative organized into sections presented in a scrolling side panel, including media types such as a map, 3D scene, image, and video | |
Story Map CascadeSM | Creates a visually and editorially engaging full-screen scrolling experience blending narrative text, maps, 3D scenes, images, and videos | |
Presenting a series of maps | ||
Story Map SeriesSM - Tabbed Layout | Uses a set of tabs | |
Story Map Series - Side Accordion Layout | Uses an expandable panel | |
Story Map Series - Bulleted Layout | Uses numbered bullets, one per map | |
Presenting a dynamic collection of crowdsourced photos | ||
Story Map CrowdsourceSM | Publishes and manages a crowdsourced story to which anyone can contribute photos with captions. Display the collected photos along with their locations, captions, and descriptions. | |
A curated list of points of interest | ||
Story Map ShortlistSM | Presents a set of places organized into a set of tabs based on themes. | |
Comparing two maps or two layers of a single web map | ||
Story Map SwipeSM | Users can slide the swipe tool back and forth to compare one map theme to a second map theme. | |
Story Map SpyglassSM | Similar to Swipe but enables users to peer through one map to another using a spyglass function. | |
Presenting one map | ||
Story Map Basic | Presents a map via a very simple minimalist user interface. |
You can create a story map in either ArcGIS Online or Esri Story Maps:
ArcGIS Online: For example, you can share a web map, click Create a Web App, and choose a story map template.
Esri Story Map website: You can select a type of story map and follow the builder wizard.
ArcGIS Solutions apps
ArcGIS Solutions provides a gallery of free templates to jumpstart your projects. The templates typically include app source code. Some templates also include data models, layers, maps, and sample web services. The data model and map styles are created based on industry best practices and emerging trends. ArcGIS Solutions apps cover almost all industries. The apps focus mostly on the web and mobile platforms and occasionally on the desktop platform.
You can search for templates in ArcGIS Solutions by products, industries, and keywords. For each template, you can read its introduction, requirements, and contents in the package. You can also try the app live, download the template, configure the app, and deploy it.
ArcGIS Solutions provides a rich collection of configurable apps for almost all industries.
Configuring ArcGIS Solutions web apps typically involves editing the config.js file. In this file, you replace the default URLs of the maps and layers with those URLs of your maps and layers and replace the default attribute field names with those field names of your data. Deploying these web apps typically requires a web server such as Apache, Microsoft IIS (Internet Information Service), or other products. You can set up your own web server or purchase a web hosting service. Once you have a web server, deploying a JavaScript web app is essentially copying the files to a folder under your web server’s web root, for example, C:\inetpub\wwwroot for IIS.
Basic components of a Web GIS app
Today’s Web GIS best practices recommend that a Web GIS app should have basemaps, operational layers, and tools. ArcGIS supports this practice and makes it easy for you to create Web GIS apps.
The basic components of a Web GIS app.
Basemap layers
Basemaps provide a reference or context for your Web GIS app. ArcGIS provides a collection of fast-responding basemaps. Most of the time, you can use them without worrying about creating them.
ArcGIS provides a gallery of basemaps, including image tiles and vector tiles. These maps all have multiple scales with global coverage.
In addition, you can use your own map services as basemaps (open the map viewer, click Add > Add Layer from Web, and select the Use as Basemap box).
ArcGIS provides a global elevation service on which basemaps can be draped. This service supports 3D web scenes.
ArcGIS provides a gallery of basemaps and an elevation service to support both 2D and 3D web maps and apps.
Operational layers
Operational layers are theme layers that you and your end users mostly use.
You can use layers from ArcGIS Online, Living Atlas of the World, and ArcGIS Open Data (http://opendata.arcgis.com) as your operational layers. These layers span a range of subjects and can support maps and apps of almost every subject. You can search in these rich collections and discover layers that fit your needs.
You can also use your own data as operational layers. ArcGIS Online and ArcGIS Enterprise support operational layers from a variety of formats including CSV, TXT, GPX (GPS exchange), shapefiles, and a variety of web services types.
Tools
Tools perform tasks beyond mapping, including common tasks such as query, geocoding, routing, and more specialized tasks such as the workflows and big data analysis that implement specific logic for an enterprise.
Most ArcGIS web layers support flexible queries.
ArcGIS Online provides rich and extensive spatial analysis tools for you to ask questions and solve spatial problems.
ArcGIS Enterprise provides standard analysis tools, big data analysis tools, raster analysis tools, and allows you to publish custom web tools, in other words, geoprocessing services.
Web services, the foundation of today’s Web GIS
Web services technology is at the heart of today’s Web GIS. The previously mentioned three types of components of Web GIS apps are almost all based on web services. For example, basemaps are often tile services, operational layers are often feature services, and many tools are based on geoprocessing services.
Early Web GIS was not based on web services; instead, it consisted mostly of stand-alone websites where GIS data and functions were available only to their own clients and couldn’t be reused in other systems. This situation greatly limited the reusability of Web GIS resources. As a result, the level of effort to create Web GIS apps was high. In the later 1990s, web services technology was conceived. A web service is essentially a program that runs on a web server and exposes programing interfaces for clients to consume over the web. Web services have many advantages, especially their flexibility in being reused and remixed in many web apps.
Over the years, the main web services interface style has evolved from Simple Object Access Protocol (SOAP) to Representational State Transfer (REST). REST is considered “the command line of the web,” and relies on URLs to send requests and pass parameters. REST became the preferred web service interface type because of its simplicity and efficiency for the web environment. With REST, every resource has a URL, also called endpoint, and can be accessed via this URL. Therefore, you can add ArcGIS web services to the ArcGIS Online map viewer via their URLs. You will learn more about REST in other chapters later in this book.
The GIS industry quickly adopted web services technology and reformed Web GIS products based on web services architecture in the early 2000s. Today’s Web GIS products are designed to support the publication, discovery, and use of GIS web services. A GIS service represents a GIS resource—such as a map, locator, or toolbox—that is located on the server and is made available to client applications. For example, ArcGIS Online provides collections of ready-to-use GIS services. ArcGIS Online and ArcGIS Enterprise allow publishers to publish many types of GIS services. ArcGIS Online and Portal for ArcGIS allow users to discover and use GIS services in web maps, web apps, and mobile apps. This chapter focuses on feature services or feature layers. You will learn about other types of services in other chapters of this book.
Feature services and hosted feature layer
Feature services and hosted feature layers are the most commonly used layer type for operational layers. A feature service in ArcGIS often refers to a feature service published to ArcGIS for Server. A hosted feature layer refers to a feature service published to ArcGIS Online or Portal for ArcGIS. “Layer” here refers to a content item in ArcGIS Online and Portal for ArcGIS. “Hosted” refers to the fact that they are hosted in the ArcGIS Online cloud or the underlying data is stored in the ArcGIS Data Store. Feature services and hosted feature layers can support read and/or write data access. This chapter will focus on the read-only hosted feature layers. You will learn about the writable feature layers in the mobile GIS chapter.
You can publish hosted feature layers to ArcGIS Online or Portal for ArcGIS from ArcGIS Pro, or simply a web browser.
Create a feature layer from your own data (for example, CSV, shapefiles, GeoJSON, and file geodatabase): Go to ArcGIS Online or Portal for ArcGIS Content > My Content page, click Add Item (see section 2.1).
Duplicate an existing feature layer without needing your own data: This process will create a new empty layer of the same schema, in other words, containing the same attribute fields as the “mother” layer. This approach is useful if you can find a “mother” layer that matches your needs or if you want to use the “mother” feature layer again and again. You can go to ArcGIS Online or Portal for ArcGIS Content > My Content page, click Create > Feature Layer, and choose From Template, From Existing Layer, or From URL.
Create an empty feature layer and define your own fields interactively: You will go to the ArcGIS for Developers site (http://developers.arcgis.com), log in with your ArcGIS Online account, click the plus button at the top, and select New Layer. The website will walk you through the steps to create a new feature layer. You will have the chance to specify the layer title, feature type (points, lines, or polygons), extent, attribute fields, and its default symbols.
Create an empty feature layer and define your own fields interactively using ArcGIS for Developers site.
Living Atlas of the World
Traditionally, you had to collect or prepare all or most of the data for your application and analysis. Today, you can find rich content from the ArcGIS Online catalog. You can use Living Atlas contents as your operational and, occasionally, basemap layers.
Living Atlas of the World is a curated subset of ArcGIS Online information items contributed to and maintained by Esri and the ArcGIS user community. The Living Atlas has thousands of layers covering many topics.
Living Atlas is a dynamic collection of thousands of maps, data, imagery, tools, and apps produced by ArcGIS users worldwide and by Esri and its partners. Living Atlas is the foremost collection of authoritative, ready-to-use global geographic information ever assembled. You can combine content from this repository with your own data to create powerful new maps and apps. You can use these maps and apps when you perform diverse analyses in ArcGIS Online, without having to collect the data yourself.
Living Atlas provides the following content categories:
Basemaps: Reference maps for the world and the foundation for GIS apps.
Imagery: Recent high-resolution imagery for the world, daily multispectral imagery, and near real-time imagery for major events, such as natural disasters.
Demographics and lifestyles: Maps and data for the United States and more than 120 other countries reveal insights about populations and their behaviors.
Boundaries and places: Boundaries help define where people live and work, and these layers span a variety of scales, from neighborhood to continental extents.
Landscape: Data reflect both the natural environment and man-made influences to support land-use planning and management.
Transportation: The collection of maps and layers reveals how people move between places.
Oceans: Data on sea surface and floor temperature, distance to shore, ecological marine units, floor geomorphology, and various chemical concentration maps.
Urban systems: More than half of the world’s population now lives in cities, and these layers allow analysis of how population impacts the world.
Earth observations: These observations depict our planet’s extreme events and conditions, from severe weather to earthquakes and fires.
Historical maps: These maps reflect the changing physical, political, and cultural aspects of our world over time.
The word “living” in the name Living Atlas indicates that content is continuously updated in minutes or hours (for example, live traffic and real-time earthquakes), days or weeks (for example, remote sensing imageries), and regularly as new content becomes available from the contributing community. For more information on the Living Atlas, go to http://doc.arcgis.com/en/living-atlas/about.
Layer configuration
Smart mapping
Your layers must be displayed in appropriate styles for you and your end users to discover the hidden patterns and deliver the intended messages. If your layers do not come with styles or you do not like their existing styles, you can change styles (although not all layers allow style changing) using ArcGIS smart mapping capabilities.
Smart mapping aims to provide a strong, new “cartographic artificial intelligence” that supports map styles including a heat map, color map, size map, point map, color and size map, time map, predominance map, and more.
Smart mapping enables users to visually analyze, create, and share professional-quality maps easily and quickly with minimal mapping knowledge or software skills. Smart mapping uses a data-driven workflow to provide new and easy ways to symbolize your data and suggest the “smart” defaults. Smart mapping delivers continuous color ramps and proportional symbols, improved categorical mapping, heat maps, and new ways to use transparency effects to show additional details about your data via a streamlined and updated user interface. Unlike traditional software defaults that are the same every time, smart mapping analyzes your data quickly in many ways, suggesting the right defaults when you add layers and change symbolizing fields. The nature of your data, the map you want to create, and the story you want to tell all drive these smart choices.
Smart mapping doesn’t just style your layer. It also performs exploratory data analysis to help you and your users discover the science of where. Smart mapping does not oversimplify the map-authoring experience or take control away from you. You can still specify parameters manually to extend default capabilities. For more information on smart mapping, see http://www.esri.com/landing-pages/arcgis-online/smart-mapping.
Pop-ups
Pop-up windows are considered windows to show geographic information and deliver geographic insight. They are a common tool that your end users rely on to interact with your operational layers. Today’s users click or tap a location or feature on the map and expect to see a pop-up showing more information.
The default pop-up appearance for a layer is a plain list of attributes and values. You can configure the pop-ups to show custom-formatted text, attachments, images, and charts and links to external web pages. These pop-ups enhance the attributes associated with each feature layer in the map and present the information in more intuitive, interactive, and meaningful ways.
ArcGIS Arcade
How do you display data when there is no column in the schema containing that data? Traditionally you would have to alter the underlying data, such as adding a new column. But if you are not the owner or don’t have the privilege, you can’t alter the data. Arcade solves this common problem. Arcade is a portable, lightweight, and secure expression language written for use in the ArcGIS platform to style layers, label layers, and add values to layer pop-ups. With Arcade, you can build custom expressions based on existing fields and geometries without having to alter the data. Here are a couple simple examples:
Label the percentage of the young and elder in the total population.Round(($feature.AGE_5DOWN + $feature.AGE_65UP)/ $feature.TOTAL_POP * 100 ) + “%”
Calculate the weekday of the crime events in a layer.Weekday($feature.Reported_Date_Time)
You can almost think of Arcade as “Microsoft Excel for ArcGIS.” In much the same way that Microsoft Excel lets you write formulas to work with spreadsheet data, Arcade lets you do the same with layer attributes and geometries. Like other expression languages, it can perform mathematical calculations, manipulate text, and evaluate logical statements. It also supports multi-statement expressions, variables, and flow control statements. Arcade was designed specifically for creating custom visualizations and labeling expressions in the ArcGIS Platform, including ArcGIS Online and ArcGIS Enterprise.
With Arcade, you can build custom expressions, use them to configure your layer style and pop-up without having to alter the underlying data.
While the syntax contains similarities to other scripting languages, Arcade is not designed for writing stand-alone apps. It is intended solely for evaluating embedded expressions such as those used in visualization, labeling, and alias contexts within applications of the ArcGIS platform. For more details, refer to https://developers.arcgis.com/arcade/guide.
Web app user experience design principles
User experience is an important factor when you configure your web layers, maps, and apps. A good Web GIS app should deliver informative content and enhance necessary functionality for a fast, easy, and fun user experience. Story Maps facilitate your creation of web apps with pleasant user experiences.
Fast: “Don’t make me wait,” say today’s users. Web GIS apps should use caching, database tuning, appropriate client/server task partitioning, and load balancing to achieve optimal performance, scalability, and availability. When you use ArcGIS Online, these are mostly taken care of by Esri for you automatically. But these aspects are important checkpoints when you use ArcGIS Enterprise to host your own layers and apps.
Easy: Today’s users also say, “Don’t make me think about which button to click,” and “If I don’t know how to use your site, it’s your problem, and I will leave the site quickly!” Web GIS apps should focus on a specific purpose. Do not overwhelm users with unnecessary buttons and data layers. Make the user interface intuitive. The interface should provide feedback, such as visual cues, that lead users through a well-defined workflow and assure them that they are on the right track.
Fun: Integrate photos, charts, videos, and animation into your web apps. Used properly, these media enhance user engagement, convey your key information, and improve user satisfaction.This tutorial
In this tutorial, you will learn how to create a Web GIS app that presents the spatial patterns of US population growth, explore the reasons behind the patterns, and share what you found with the public using Story Maps. In the process, you will learn the skills to create a feature layer using geocoding, style your layer using smart mapping, configure layer pop-ups using Arcade, and create a Story Map Journal web app.
Data: For the operational layers, you are provided with a CSV file, C:\EsriPress\GTKWebGIS\Chapter2\Top_50_US_Cities.csv, which contains the 2010 to 2016 population and housing information of the 50 most-populated cities in the US.
There are no latitude and longitude fields in the CSV.
Other operational layers are not provided. You will find them in the Living Atlas.
Requirements:
Your map symbols should be easy to understand.
If a city or region is clicked, your app should display associated details in intuitive ways.
Your app should present the population change patterns and the reasons behind the patterns in story maps format.
System requirements:
An ArcGIS Online or Portal for ArcGIS publisher account. You can use the trial account you created in chapter 1.
A web browser.
Microsoft Excel or a text editor.2.1 Create a feature layer using geocoding
In this section, you will create a hosted feature layer, which will be your main operational layer.
1 In Microsoft Excel, navigate to C:\EsriPress\GTKWebGIS\Chapter2\Top_50_US_Cities.csv, and study the data fields. Note: There are no latitude and longitude fields in the CSV file. The file contains the following fields:Rank: A city’s 2016 rank by population.City: City name.State: Name of the state in which the city resides.Census2010: City population as of April 1, 2010.Estimate2010, Estimate2011, Estimate2012, Estimate2013, Estimate2014, Estimate2015, Estimate2016: Estimated population as of July 1 in 2010, 2011, 2012, 2013, 2014, 2015, and 2016.OccHouseUnit: Occupied house units in 2010.OwnerOcc: Owner-occupied house units in 2010.PopOwnOcc: Population in owner-occupied house units in 2010.SizeOwnOcc: Average house size of owner-occupied house units in 2010.RenterOcc: Renter-occupied house units in 2010.PopRentOcc: Population in renter-occupied house units in 2010.SizeRentOcc: Average house size of renter-occupied house units in 2010.Wikipedia_URL: URL to the city’s Wikipedia page.Picture_URL: URL to the image of the city’s seal or flag.
2 Open a web browser, navigate to ArcGIS Online (http://www.arcgis.com) or your Portal for ArcGIS, and sign in.
3 Click Content.
4 Click Add Item , and then click From my computer.
5 In the Item from my computer window, perform the following tasks:For File, browse to C:\EsriPress\GTKWebGIS\Chapter2\Top_50_US_Cities.csv, and click it. If you have published a file of the same name to your content before, rename your Top_50_US_Cities.csv file to a unique name, and then select it.For Title, use the default, or specify a new one.For Tags, specify keywords, such as US cities, Population change, GTKWebGIS, and your organization name, as illustrated. Separate the keywords with commas.Make sure the check box next to Publish this file as a hosted layer remains selected.Leave the Address option selected.For Country, select US.Review the field types and location fields, and make corrections if needed.Click Add Item.
This CSV does not have latitude/longitude fields. ArcGIS Online and Portal for ArcGIS will geocode your data. Geocoding converts addresses and other identifiers (such as place-names and postal codes) into coordinates. If your data contains addresses for a single country, select its name from the Country list. If the addresses refer to multiple countries or to a country that is not on the Country list, select World. If ArcGIS Online didn’t pick up the correct location fields, you can click the wrong fields to make corrections.
Note: Geocoding a CSV or a table is considered batch geocoding, which will cost you ArcGIS Online credits if you use ArcGIS Online’s geocoding service. You can configure your ArcGIS Online and Portal for ArcGIS to use your own geocoding service.
1 When prompted to review addresses, click Yes.The feature layer will be added to the map viewer for you to review the geocoding results. You can click each of the matched addresses in the matched table at the bottom of the map and review its placement on the map. You can also click each of the unmatched addresses in the unmatched table, fix it by choosing a suggested address, or Edit the address information and choose a suggested address, or directly add a point to the map.In the tutorial data, all cities are matched to their correct locations.
2 Click Done Reviewing.You have created a hosted feature layer using geocoding.
3 Click the Save button to save your web map.
4 In the Save Map window, enter the appropriate title and tags, and then click Save Map.
You have created a hosted feature layer using geocoding. You can go to the layer details page to share the layer with everyone or other audience you select. In this tutorial, you will share the layer together with your web map later.
2.2 Configure layer style
In this section, you will explore smart mapping and configure your layer to display the population change rates in the 50 cities in your layer.
1 With the map viewer open, in the Contents pane, point to Top 50 US Cities Population, and then click the Change Style button .
2 In the Choose an attribute to show text box, choose Estimate2016 as the field to show in the Change Style pane.Note that smart mapping automatically selects Counts and Amounts (Size) as the default style for this numeric field. This style uses an orderable sequence of different sizes to represent your numerical data or ranked categories. You can symbolize points, lines, and areas using this approach. The proportional symbols make the map intuitive. On this map, can you easily tell the top three most populated cities in the US?Next, you will style the layer based on the ratio of two fields. You can do so using Arcade or selecting two fields. Here, you will select two fields.
3 Click Options in the Counts and Amounts (Size) style to further configure the layer style.
4 Set Divided By to Census2010.The map now displays the ratio of population 2016 to 2010, which is a good indicator of population growth over the years. Bigger circles indicate bigger increases, and smaller circles indicate smaller increases and even decreases. A value of 1.0 means there was no population change; numbers greater than 1.0 indicate population growth; and numbers less than 1.0 indicate population decline. This ratio is a good approach to reveal how things change over time without having to create multiple maps. This approach works for any numerical data from two time periods.You may also change the Min and Max symbol sizes and adjust the two handles on the histogram slider to exaggerate the cities with the most and the least population growth. Smart mapping easily emphasizes certain ranges of the data and uncovers subtle details.Smart mapping also uses continuous sizes and colors automatically, but it does not remove any of the traditional methods to break features into a set of classes and show them with a limited number of sizes and colors. Next, you will manually break the cities into classes and assign symbols for these classes.
5 Scroll down in the Change Style pane and select the box next to Classify Data. Select manual breaks with 4 classes and Round classes to 0.01 (in other words, round the class break values to 2 decimal points).
6 Starting from the bottom, set the class break values to 1, 1.1, and 1.15. You can set the values by clicking the existing break values and typing in the new values as illustrated or by dragging the handles on the histogram slider in Change Style.Note the Symbols and Legend icons in the figure. Clicking the Symbols icon allows you to set a symbol for all the classes. Clicking the Legend icon allows you to set an individual symbol and label for each class.All the classes are using the same symbol with gradual sizes. Next, you will set each class to use a different symbol.
7 Click Legend.This step allows you to edit the symbol for each individual class.
8 Click the biggest circle, in other words, the one next to > 1.15 to 1.2.A window appears showing the available point symbols.
9 After clicking the list to choose Arrows, click the solid red up arrow, set its size to 36, and click OK.The map viewer provides a collection of symbols for business, damage, disasters, infrastructure, recreation, people places, points of interest, health, transportation, and other categories, as shown in the list of options. You can browse through these categories and get a sense of the variety of available symbols. To browse, you can click the symbol list to access the options.
10 Similarly, make the following changes:For the > 1.1 to 1.15 class, change the symbol to a brown upper arrow in the Arrows group, set its size to 24, and click OK.For the > 1.0 to 1.1 class, change the symbol to a purple upper arrow in the Arrows group, set its size to 16, and click OK.
In addition to the collections of symbols, the map viewer allows you to use your own images as symbols. You will do so in the next steps.
1 Click the symbol for the 0.94 to 1 class, click Use an Image, specify https://i.imgur.com/OS8tZpq.gif (or the short equivalent http://bit.ly/2F0fQVq) as the URL, click the Plus icon, set its size to 16, and then click OK.The last class lost population from 2010 to 2016, so the class was symbolized using a solid down arrow.
2 Click OK, and then click Done to exit the Change Style pane.
3 In the Contents pane, point to the Top 50 US Cities layer, click the More Options button , and click Save Layer.This step saves the style to the layer item itself. When you add this layer to any web maps, the layer will carry the style you defined in this section as the default style.Next, you will change the basemap to a neutral background.
4 Click the Basemap button on the map viewer toolbar, and click Light Gray Canvas.This basemap provides a neutral background with minimal colors, labels, and features. This background allows your operational data layer to stand out clearly.
5 Save your web map.
You have configured the style of your operational layer. With this map, you can quickly and easily see which cities had population increases or decreases.
2.3 Configure a layer pop-up using ArcGIS Arcade
In this section, you will decide what information to show and how you will show the information in the cities’ pop-ups.
1 With your web map open in the map viewer, click one of the 50 cities to see the default pop-up.If a pop-up window does not appear, it may be disabled for this layer. You can enable the pop-up by pointing to the layer, clicking the More Options button and clicking Enable Pop-up.This default pop-up is useful, but you can enhance the window to communicate information in more intuitive and engaging ways.
2 In the Contents pane, point to the Top 50 US Cities layer, click the More Options button , and click Configure Pop-up.The Configure Pop-up pane appears, in which you can configure the pop-up’s title, contents, and media sections. Next, you will configure the title, which can be static text, a set of attribute field values, or a combination of the two.
3 Click the Plus button under Pop-up Title to select the City field. Type a comma and a space, and click the Plus button again to select the State field.Next, you will configure the pop-up contents, which can include a list of attribute fields or a custom description based on attribute values. You will first create a couple attribute expressions using Arcade.
4 Under Attribute Expressions, click the Add button.The expression editor window appears. Next, you will build the expression Round($feature .Estimate2016 / $feature.Census2010, 2), which calculates the ratio of population 2016 and 2010 for each city, and rounds the result to two decimals.
5 In the expression editor, do the following:Click the Edit link by the title Custom and change the title to Population Ratio 2016/2010.Click in the Expression text area.Click Functions, search and click Round.In the Expression area, remove fieldOrValue.Click Globals, find and click $feature.Estimate2016, press the / key, and find and click $feature.Census2010.Click numPlaces and change it to 2.Click Test to verify if the results look correct. If not, correct the expression based on the error message.Click OK.
Next, you will build an expression like Round($feature.PopOwnOcc / $feature .Census2010, 2) * 100, to calculate the percentage of population-owned housing in 2010 for each city.
1 Under Attribute Expressions, click the Add button again. In the expression editor, perform the following actions:Change the title to % Population Own Houses.Set the expression to Round($feature.PopOwnOcc / $feature .Census2010, 2) * 100.Click Test to make sure the results look correct.Click OK.
2 In the Display menu under Pop-up Contents, make sure A list of field attributes is selected, and then click the Configure Attributes link.In the Configure Attributes dialog box, make the following choices:Select {Rank} and set its alias as Rank 2016.Select the expression field Population Ratio (2016/2010).Select the expression field % Population Own Houses, and set its format to 0 decimal places.Clear the check boxes for the rest of the fields.
Some of the fields already appear in the title, and some others will be displayed in charts and image links. Thus, you unselect these fields.
Hiding them from the attribute list will make your layer pop-up simple and clear.
Click OK to close the Configure Attributes window.
1 At the bottom of the Configure Pop-up pane, click OK to apply your pop-up configuration.
2 Click any city on the map to review the new pop-up.You will see that the pop-up window is simpler and easier to read than the default pop-up. Also note the pop-up includes the custom expression you built with Arcade.
3 On the map viewer menu bar, click Save to save your changes.2.4 Add images and charts to pop-up windows
Media, such as images and charts, can more effectively engage users and improve their understanding of your data.
The tutorial CSV contains two URL fields, Wikipedia_URL and Picture_URL. You will use the first URL to add a picture to the city layer’s pop-up and the second URL to link the picture with the city’s Wikipedia page so that users can gather supplementary information about the city’s population changes. Charts require numeric attribute fields. The US cities layer contains several of these fields. You will display them in appropriate charts to exemplify the cities’ population trends.
1 In the Contents pane, point to the Top 50 US Cities layer, click the More Options button, and click Configure Pop-up.
2 In Pop-up Media, click Add, and then click Image.In the Configure Image window, make the following changes:Enter About the city as the title (leave the Caption window blank).In the URL box, click the Plus button, and click the Picture_URL field.In the Link (optional) box, click the Plus button and click the Wikipedia_URL field.
3 Click OK to close the Configure Image window.The image title, caption, image URL, and link URL can all take the form of static text, attribute field values, or a combination of the two. If you do not have image and link URL fields when you do the assignment, specify a static URL instead. For example, you can use http://www.census.gov/history/img/Census_Logo.jpg as the image URL, and http://www.census.gov as the Link URL. This way, the pop-up windows for all cities display the same image and link to the same web page. You can add additional images to your pop-up window simply by repeating steps 2 and 3.
4 In the Configure Pop-up pane, click the OK button to apply your pop-up configuration.
5 Click a city on the map to observe the new pop-up.The pop-up window displays the city’s seal or flag. If you click on the image, the city’s Wikipedia page will appear.
6 In the Contents pane, point to the Top 50 US Cities layer, click the More Options button, and click Configure Pop-up again. In the Pop-up Media section, click Add, and then click Line Chart.
7 In the Configure Line Chart window, make the following settings:For Title, specify Population Change (2010 - 2016).For Chart Fields, check the 2010, 2011, 2012, 2013, 2014, 2015, and 2016 population fields.
8 Click OK to close the Configure Line Chart window
9 Click OK to apply your configuration.
10 Click a city, for example, Detroit, Michigan, to see the new pop-up (use the Search box to find Detroit and other cities if necessary). In the pop-up, to the right of the city seal or flag image, click the right arrow to see the chart you configured.You will notice that the population of Detroit has been decreasing.
11 In the Contents pane, point to the Top 50 US Cities layer, click the More Options button , and click Save Layer.This step saves the pop-up configuration to the layer item itself. When you add this layer to any web maps, the layer will carry the pop-up you defined in this section as the default.
12 Save your web map.
The new pop-up you configured does more than display raw attribute values. The pop-up leverages the URLs stored in the attributes to display and link a picture to a website that provides additional details. The pop-up also charts the numeric fields to provide a visual interpretation of population changes.
2.5 Use layers from the ArcGIS Living Atlas of the World
You don’t always have to create your own layers. You can use layers from the Living Atlas as your operational layers. In this section, you will use a layer from the Living Atlas to further display the US population change patterns.
1 On the map viewer menu bar, click the Add button , and from the list, click Browse Living Atlas Layers.In the Living Atlas pane, you will explore the extensive categories and subcategories of layers available.
2 In the Living Atlas pane, click the Filter button to see the list of categories.
3 In the Filter pane, browse the Categories, Regions, and Item Type groups. Notice the options available, and click the X button to close the Filter pane.
4 In the search box, type population growth, and press Enter.
5 In the result list, click the 2017-2022 USA Population Growth layer to see the Item Details pop-up. Click Add to map, and then close the Item Details pop-up.If you added the wrong layer, you can remove that layer by clicking the Remove button.
6 In the Contents pane, point to the 2017-2022 USA Population Growth Rate layer you just added, click the More Options button , and click Show Item Details.This action will bring up the item details about the layer. This map layer shows the estimated annual growth rate of the population in the US from 2017 to 2022 in a multiscale map by state, county, ZIP Code, tract, and block group.
7 Go back to the map viewer by clicking the corresponding browser tab. Zoom in and out of the map to examine the population change patterns. Click a state, county, zip, tract, or block group to see the information in the pre-configured pop-ups.You should see that the population change trends of the 50 major cities generally agree with the trends of their counties, zips, tracts, and block groups. Note: You may see multiple features at the location you clicked. In such cases, the pop-up will show one feature at a time. You can click the arrow in the pop-up header to navigate through the features. You may also see pop-ups of multiple layers. You can disable the pop-up for a layer in the layer’s more options context menu.
8 Zoom the map to show all the 50 cities and click Save to save your web map.The map extent saved is the default extent of your web map.
9 Click the Share button .
10 In the Share window, share your web map with everyone (public).
11 When prompted to update the sharing level of your layer in the web map to be the same as the web map, click the Update Sharing button.
You have configured your layer’s style and pop-up, and used the layer in a web map. Next, you will use this web map in your web app.
2.6 Create an Esri Story Map Journal web app
In this section, you will create an app to showcase the US population change pattern and the reasons behind it. To keep the tutorial short, a side-by-side comparison web app and a swipe comparison web app have been created for you.
In the process, you will embed two pre-created story maps into the journal.
1 In a web browser, go to the Story Maps website (https://storymaps.arcgis .com), sign in with your ArcGIS Online account, and in the top menu, click Apps.
2 Find Story Map Journal and click Build.
3 In the Welcome window, select Side Panel, and click Start.You will be directed to the map journal builder.
4 Enter your map journal title, type Story of US Population Change, and click the Continue button.The Add Home Section window appears. A Story Map Journal is made up of sections. The home section will act as the cover page of your story. Each section has a main stage and a side panel.
5 For Step 1: main stage content, set these parameters:For Content, select Web page.For Webpage URL, type https://www.census.gov/popclock, and click Configure.Leave Fill as the position choice.For Load page over a secure connection (HTTPS), unselect the check box if your current page uses HTTP; otherwise, select the check box.Click Next.
The Census webpage supports both HTTP and HTTPS. Remember that web browsers don’t allow mixed HTTP and HTTPS contents. If your current page URL uses HTTPS, the web page you want to use here must also support HTTPS and you must use the HTTPS URL. If the web page you want to use doesn’t support HTTPS, you need to reload your current page using HTTP. Refer to chapter 1, “Questions and answers,” regarding HTTP and HTTPS settings.
The main stage is configured. The builder now leads you to the side panel configuration.
1 In the side panel text area, type Population in the world and in the US are constantly changing.
2 Click Add.The home section displays.
3 Click Save (the button at the upper-right corner) to save your app.Save your app after adding each section to avoid losing your work accidently.
4 Click Add Section. In the Add Section window, select the following settings:For Section title, type Not all cities change in the same way.For Content, leave Map selected.For Map, choose Select a map.
1 In the Select a map window, select the US Population Change web map you created in section 2.5.
2 If you don’t have that web map, search in ArcGIS Online for “chapter2 population change owner:GTKWebGIS,” and then select the found web map.You can configure how you want the web map to be shown, including the location, content, pop-up, and extras. Here you will leave them as the default.
3 Click Next.
4 For Step 2: Side Panel Content, type Can you tell several cities with the most population increase and decrease? in the text area.
5 Click Add.Section 2 is added.
6 Click Add Section. In the Add Section window, set the following parameters:For Section title, type More discoveries;For Content, select Web page;For Webpage URL, type https://arcg.is/2xWlvaj, click Configure, leave Fill as the position choice;For Load page over a secure connection (HTTPS), clear the check box if your current page uses HTTP, otherwise, select the check box;Click Next.
7 For Step 2: Side Panel Content, in the text area, type the following text:Cities with more population increase tend to havemore people own housing than renting on the predominant mapowners occupy relative larger housing size on the house size maplower unemployment rates
8 Click Apply.
9 Click Add.Next, you will add a new section to summarize your story.
10 Click Add Section. In the Add Section window, do following:For Section title, type Why;For Content, select Web page;For Webpage URL, type https://bit.ly/2GZhdov, click Configure, leave Fill as the position choice;For Load page over a secure connection (HTTPS), clear the check box if your current page uses HTTP, otherwise, select the check box;Click Next.
11 For Step 2: Side Panel Content, click the Insert an image, video, or web page button , and click Upload.
12 Browse to C:\EsriPress\GTKWebGIS\Chapter2\images\reasons-why -people-move.jpg, leave the Image caption as is, and click Apply.
13 Click Add.The section is added.The pie chart image shows that people move because of housing, family, and employment. The app on the right is an Esri® Story Map SwipeSM app. The app lets users compare the housing affordability layer and the unemployment rate layer by sliding the swipe bar back and forth. Refer to the “Questions and answers” section for how to create a swipe web app.The swipe web app has bookmarks defined. The first bookmark, which is the default map extent of the swipe web app, is Denver.
14 Click areas in Denver to see the housing affordability index in the pop-up, then move the vertical bar in the swipe web app to see the unemployment info in the pop-up.The Denver area has relatively high housing affordability values and low unemployment rates, which are the main reasons for its population increase.