Accessing and Mapping Geospatial Data in ArcGIS Online
A vast array of geospatial data is available on the web, most notably from open data portals provided by agencies at all levels of government.
Because of the diversity of ways that geospatial data can be distributed, some understanding of the architecture of web maps and the techniques for processing geospatial data is needed to be able to effectively use that data in ArcGIS Online.
This tutorial will cover some basic techniques on how to acquire data from online sources for mapping in the ArcGIS Online Map Viewer.
ArcGIS Online Map Architecture
When working with computers, an architecture is "the manner in which the components of a computer or computer system are organized and integrated" (Merriam-Webster 2022).
Since most GIS endeavors involve some measure of collaboration, most architectures separate components in the client-server model. (Techopedia 2020).
- The internet is an example of a network, which is communications infrastructure that connects computers.
- Servers are computers on a network that are dedicated to managing network resources.
- Clients are user computers and computer apps (like web browsers or cellphone apps) that need those services.
- Services are how server computers make resources housed on the servers available to clients through a network.
The ArcGIS Online Map Viewer is a web app that runs in a client after being downloaded from a server. The app then accesses additional services from the server to render the map in a browser window.
- The user enters the URL or clicks on a button to request a map from the server.
- The server responds with the map app and a map layout (JSON data) that contains information about the content of the map and what services should be used to access data for mapping.
- The map app makes additional requests from the server(s) to get data for mapping.
- The map app renders the map data in the browser.
- As the user interacts with the map app, the map app may request additional data from the servers.
The separation of the service (the data) from the map layout (the visualization) has the following advantages.
- Consistency: Keeping the data in a feature service allows you to create multiple views (maps and apps) of the same data without having to worry about discrepancies between redundant versions of the data.
- Timeliness: Similarly, if you need to update or modify your data, you can do it in the feature service, and all maps and apps that use that feature service will have those updates. This is especially useful for real-time data like weather information that is constantly changing.
- Performance: If the data set is large, the map or app only needs to load the data in the area currently visible on the map, which speeds load time, especially on slow mobile networks.
Open vs. Proprietary Data
Open data is "data that can be freely used, re-used and redistributed by anyone - subject only, at most, to the requirement to attribute and sharealike" (Open Knowledge Foundation 2018).
Open data is free in two different ways:
- Free as in cost: You do not pay anything to use it.
- Free as in speech: You can use that data in any way you want.
A fundamental value of open data is interoperability. Interoperability is "the ability of diverse systems and organizations to work together" and intermix different datasets (Open Knowledge Foundation 2018).
- When people can work together with a minimum of restrictions, this results greater individual productivity that, ideally, benefits society as a whole.
- Governments that make their data openly available are more transparent and, ideally, government leaders are more accountable to the people they govern.
The concept of open is often contrasted with proprietary. Proprietary data is data where access is controlled, usually to subscribers who pay to license use of that data.
- Proprietary data can be free (as in cost) but will probably not be free (as in speech).
- Free (as in cost) proprietary data is often subject to license restrictions (often loosely enforced) on how the data can be used and / or redistributed.
All data requires effort (and, therefore, money) to capture and maintain. So while data may be available to you at no direct cost, there are still costs associated with free data. Ultimately somebody has to pay to create, maintain and distribute that data.
- In the proprietary model, the users of data users pay the costs for data, plus a profit to the company controlling the data.
- In the open model, the cost is paid for by the public as a whole (such as with taxpayer-supported government data), and / or by individual companies that build business models that leverage open data with their own contributions (such as with OpenStreetMap).
Despite the ideal of perfectly interoperable systems built on open data, the current reality is that free and open geospatial data is commonly made available across a variety of different types of website in a variety of different formats.
Unlike proprietary data which is carefully processed for specific uses by paying customers, open data organization varies widely and open data often needs tedious cleanup. Although estimates vary and are primarily anecdotal, a common view is that data scientists spend 80% of their time finding, cleaning, and reorganizing data, and only 20% of their time doing meaningful data analysis (Ruiz 2017).
Open Data Portals
Many organizations, notably government agencies, make data available to the general public through open data portals, which are websites that permit easy navigation through available data sets, and provide capabilities for examining, visualizing, and/or downloading those data sets.
Open data portals use content management systems (CMS) to organize and provide access to their different data sets.
ArcGIS Hub is a proprietary CMS which is tightly integrated with ArcGIS Online and ArcGIS Server software and which is commonly used by US government agencies.
A common open source CMS used by government agencies for disseminating geospatial and non-geospatial data is Socrata.
Large organizations commonly maintain their own custom CMS. For example, the US Census Bureau CMS is designed specifically provide easy exploration and access of the wide variety of different social and economic data maintained by the agency.
Mapping Data from Services
Feature Services
Feature services are streams of vector data (points, lines, and polygons) that can be accessed by GIS software directly through application programmer interfaces (APIs).
Feature services are accessed through REST endpoints, which are named based on the type of communications protocol they use (representational state transfer). A REST endpoint is a URL to a service on the server that includes subfolders and parameters needed to identify a specific service.
This is an example REST endpoint URL for the US Energy Information Administration's power plants feature service:
https://services7.arcgis.com/FGr1D95XCGALKXqM/arcgis/rest/services/Power_Plants_Testing/FeatureServer/0/
When using a feature service, the data is downloaded on demand as the user navigates around the map. The mapping app sends a request to the feature service, and the service responds with the requested data.
Mapping with Open Feature Services
Open feature services are feature services provided to the public free of charge. Open feature services provide significant advantages over embedding the data as part of the map:
- Data can be added to an ArcGIS Online map easily without the tedium of downloading and cleaning data files.
- Data provided in feature services can be very large and detailed since the map app only downloads data as needed.
- Changes to data can published as needed, and any maps that use that data will be automatically updated. This is especially valuable with real-time data like traffic or weather conditions.
With this flexibility comes some disadvantages:
- Feature services are dependent on the provider and can disappear at any time.
- Feature services can change at any time, which will likely be undesirable if you want specific controls over what version of the data your map users see.
- You do not have access to old versions of the data in case you need to compare the data across time.
- Feature services are often not designed for high volumes of mission-critical activity, so they can be slow and give unreliable performance.
An example of a collection of open feature services is the US Energy Information Administration's U.S. Energy Atlas. This video demonstrates how to create an ArcGIS Online map using an open feature service.
- Go to the website containing a link to the feature service (US Energy Atlas, Power Plants).
- Find the web page with the feature service URL (I want to use this, View API Resources, GeoService).
- Create a new map in ArcGIS Online.
- Add layer and Add layer from URL using the feature service URL. If the URL has a query string at the end, remove it.
- Save the map under a meaningful name (Minn 2024 Power Plants).
- Adjust Share map as needed.
- Copy the URL from the location bar to share the map.
Mapping with Proprietary Feature Services
Proprietary feature services are provided by organizations that restrict access to those services, usually to subscribers who pay to license use of that data.
Perhaps the most notable example of a proprietary feature service in the ESRI world is ESRI's Living Atlas of the World, which is a collection of geospatial data feature services that can be accessed in ArcGIS Pro or in ArcGIS Online. Some of the services in the Living Atlas are freely accessible to the general public, while other are proprietary and accessible only to licensed users.
In addition to the general advantages listed above for open feature services, proprietary services like the Living Atlas contain a wide variety of useful proprietary data that is not available from open data sources.
However, with those advantages come some disadvantages:
- Access to many Living Atlas layers will be limited to people with paid ESRI licenses, or the map author will have to pay a small fee (in credits) when users access the data through the author's map.
- As with any feature service you do not control, proprietary layers can be changed or retracted at any time and with no advance notice.
- Many Living Atlas layers do not permit download of the underlying data for analysis in software outside of ArcGIS Online.
- Many Living Atlas layers have predefined styling that cannot be changed by the map author.
To create a map using a layer from the Living Atlas:
- Start a new Map in ArcGIS Online.
- Click Add, Browse layers, and Living Atlas.
- Search for the desired data (median household income).
- If needed, click the title to view item details. The type of service will be listed at the top along with a description of the contents. Feature services are listed as Feature Service or Feature Layer.
- On the ellipsis (...) beside the layer, select Show Properties and change the Blending to Multiply so you can see the underlying base map through the features.
- Save the map under a meaningful name (Minn 2023 Income).
- Adjust Share map as needed (Everyone).
- Copy the URL from the location bar to share the map.
Mapping with Tile Services
A tile service provides map images divided into 256 x 256 pixel map tiles that the browser or mobile map app stitches together into a complete map image for the viewer. This technique for delivering web maps was first developed for Google Maps in 2005 and ultimately became a ubiquitous technique for web mapping (Forrest 2021).
With a tiled web map, the map app client makes a request for tiles that cover a specific geographic are at a given level of detail (zoom level) and the server responds with the tiles needed to cover that area. Tiles are pre-rendered and stored in a cache. The map app only needs to request new tiles as the user scrolls to new areas or zooms to new levels of detail.
Tiled web maps (also called slippy maps) load quickly and allow facile user interaction. The downside of tiled web maps is that the developer is dependent on the design choices of the tile provider and has no control over symbology or level of detail. Also, map tiles are designed for use on web maps and will be fuzzy if printed to higher-resolution paper or posters.
ArcGIS Online uses map tiles for most of their base maps and many of the layers in the Living Atlas.
Users can publish tile services from ArcGIS Pro.
Tile services are commonly used for data that changes infrequently, for base maps that have complex symbology, or for raster data that does not have discrete vector features. In the Living Atlas, you can identify whether a layer is a tile service by viewing the item information and looking for Imagery Layer or Raster Layer.
This video demonstrates adding the USA NAIP Imagery: NDVI imagery layer from the Living Atlas. Note that when the map is shared, a warning is issued that this is a proprietary layer that will be visible only to users who are logged into an ArcGIS Online account.
Custom Feature Services
Publishing a feature service is the process of making data available as a feature service. The publication process can involve uploading data, setting symbology, defining interactive capabilities (like pop-ups), and restricting access with permissions.
ESRI's cloud environment, ArcGIS Online, provides users with the capability to publish their own data as feature services. The data is kept on the same server (or set of servers) and within the same organization as the map. Feature services can be published through the ArcGIS Online web app or from the ArcGIS Pro desktop software.
Most of the examples given below involve creating custom ArcGIS Online feature services, and then using those feature services to create web maps.
The advantages of custom feature services over proprietary or open feature services include:
- You (or other people who you share with) can create new maps with the same data and present that data in different ways without having to repeatedly download files or extract the data from an existing map.
- You have control over the availability of the data.
- You have control over the styling of the data.
- You have control over when the data gets updated, which is useful if you want a stable map of a particular point in time.
- If you make updates to the published data, those changes will automatically be made available to everyone using your feature service.
- Feature services can be configured for editing if you have multiple users that need to work on the same data set simultaneously.
However, with freedom comes responsibility:
- Creating and maintaining feature services can require a considerable amount of effort compared to the ease of outsourcing that effort to a proprietary or open feature service provider.
- As with Living Atlas layers, the map author will have to pay a small fees (in credits) to store the data, and to provide the data to users when they access the data through the author's map. While this is usually a trivial cost, with high volume maps it can add up.
Geospatial Data File Formats
If you want to make an ArcGIS Online map of open data, and either that data is not available through a feature service, or you do not want to use that feature service, you will need to download the data and create your own feature service.
The easiest data to work with in GIS is data that is provided in a format specifically designed for geospatial data.
Shapefiles
The shapefile (PDF) is a proprietary ESRI format that is supported by a wide variety of software from other vendors, and as such has become, probably, the most common format for distributing geospatial data through open data portals.
While the age of the shapefile format is reflected in its numerous limitations (most notably a column name length limit of 10 characters), this format is supported by a wide variety of GIS software and is a safe format that is still commonly used for distributing open geospatial data by government agencies.
The term shapefile is a misnomer since a shapefile is actually a collection of at least three (and usually more) separate files that store the locational data, the characteristics associated with those locations, and other information about the data. When copying a shapefile, it is critical that you include all of these different files, or the file will either not open or be missing important components.
Some common files associated with a shapefile include (listed by the file extension):
- .shp: Contains the feature geometry (points, lines, polygons)
- .shx: An index file that indicates where specific features are in the .shp file
- .dbf: A dBase IV database file of attributes associated with each of the shapes in the .shp file
- .prj: The coordinate system and projection used by the feature geometry (optional)
- .cpg: The character encoding used by the attributes (optional)
- .qpj: The coordinate system and projection in a format used by QGIS (optional)
For convenience, the separate files in a shapefile are usually compressed into a single .zip archive file for distribution on websites and servers.
Creating a Map from a Shapefile
.zip files of shapefiles can be downloaded from data portals and uploaded to ArcGIS Online to create custom feature services that can then be imported into maps.
For example, the Chicago Open Data Portal uses the Socrata CMS, and geospatial data sets usually have an export option for shapefiles.
- Acquire the data: Download the zipped shapefile from the portal (Park Boundaries).
- Store the data: Create the feature service.
- Create a new Map in ArcGIS Online.
- Browse to find the zipped shapefile on your hard drive.
- Give it a meaningful name (Minn 2023 Chicago Park Boundaries).
- Add metadata (summary, description, credits).
- Adjust the sharing as needed.
- Communicate: Create the map.
- From the feature service information page, Open in Map Viewer.
- Under Properties, set the Blending Mode to Multiply so the base map is visible through the polygon fill.
- Change the styling if desired and Save the layer so that styling is the default when the layer is loaded in the future.
- Save the map under a meaningful name. Using the same name as the feature service will aid in remembering the two items are connected (Minn 2023 Chicago Park Boundaries).
- Adjust Share map as needed (Everyone).
- Copy the URL from the location bar to share the map.
ArcGIS Hub Shapefiles
Another content management system commonly used by city governments for their open data portals is ArcGIS Hub.
Because ArcGIS Hub is implemented with ArcGIS Enterprise server software, ArcGIS Hub sites will often be configured to give you the option to use a feature service or download a data file (usually a shapefile).
For this example, we use a shapefile from the Rochester (NY) Open Data Portal for abandoned buildings slated for demolition because of safety or health threats (Demolition Case Parcels: Live).
- Acquire the data: Download the zipped shapefile from the portal.
- Store the data: Create the feature service.
- On your ArcGIS Online Content page, click New Item.
- Browse Your Device to find the zipped shapefile on your local machine.
- Under How would you like to add this shapefile, select ...create a hosted feature layer.
- Give the feature service a meaningful name (Minn 2023 Rochester Demolition Parcels).
- Add metadata (summary, description, credits).
- Adjust the sharing as needed.
- Communicate: Create the map.
- From the feature service information page, Open in Map Viewer.
- Change the styling if desired (Total Tickets).
- Save Layer so that styling is the default when the layer is loaded in the future.
- Save the map under a meaningful name. Using the same name as the feature service will aid in remembering the two items are connected (Minn 2023 Rochester Demolition Parcels).
- Adjust Share map as needed (Everyone).
- Copy the URL from the location bar to share the map.
Metadata
Metadata is data about your data, such as a description of what the data set contains, where the data originally came from, when the data was captured and/or published, and who the person and/or agency is who published the data.
Metadata is important so that users of your data can know whether the data is trustworthy and know how old the data is.
Because metadata is not a directly integrated part of the processing of geospatial data, it is commonly neglected, which leave data sets that are useless or untrustworthy because there is no metadata indicating where the data came from or how old it is.
When you create a feature service in ArcGIS Online, you are often prompted at creation time for metadata. If you need to update feature service metadata or if you run a tool that assigns nondescriptive metadata, you can view the item information page for your feature service and edit fields as needed.
This video demonstrates changing the title, summary, description, and credits information on a feature layer item information page.
Other Common Geospatial Data Formats
Although the shapefile is the most reliable format to use when you have a choice, geospatial data files are made available in other formats that may be useful depending on your application.
- GeoJSON is a contemporary open format based on the web data format JSON (JavaScript object notation) that was finalized in 2008. GeoJSON files are most useful when working with geospatial data with Python or R, but ESRI software will erratically fail to import some GeoJSON files.
- KML (Keyhole markup language) is a format used by Google Maps. Although developed as a proprietary format, it was adopted by the Open Geospatial Consortium as an open standard in 2008. Because KML is designed specifically to work with Google Maps, KML can often import with missing or difficult-to-use fields, and shapefiles are usually preferred when working with ESRI software.
- File Geodatabase (PDF) is a proprietary ESRI format that provides features specific to ESRI desktop software. Unless you are working in ArcGIS Pro and need these proprietary features, you will generally want to use one of the other download options when they are available.
Tabular Data
Some data portals provide data that has a mappable geospatial component, but only provide it in table form.
The comma-separated variable (CSV) format is a text format that arranges data in rows, with column cells separated by commas. CSV files can be thought of as spreadsheets, and they are commonly edited using spreadsheet software like Microsoft Excel, but CSV files do not preserve formatting information.
CSV files can be used for geospatial data with columns of latitude and longitude associated on each row with specific attributes at those latitudes and longitudes. Most CSV files can only represent points, so for lines (like roads) and areas (like neighborhoods or census tracts) you need to save data in a specialized geospatial data file format like the shapefile.
Mapping CSV Files with Latitudes and Longitudes
Point data in data portals like Socrata is sometimes made available as tables with latitudes and longitudes rather than in geospatial data formats like shapefiles.
For this example, we create a feature class of locations with radiation producing equipment in New York City from the NYC Open Data Socrata portal.
- Acquire the data: Download the CSV for Excel file from the portal.
- Store the data: Create the feature service.
- On your ArcGIS Online Content page, click New Item.
- Browse Your Device to find the CSV file on your local machine.
- On the How would you like to add this CSV file? screen, select Add CSV and create a hosted feature layer.
- On the Fields screen, verify that all fields are appropriate types. Note that codes like ZIP Codes and may display better (with no comma thousands separators) if brought in as String rather than Integer.
- On the Location settings screen, make sure the latitude and longitude fields are automatically selected.
- Give the new layer a meaningful name (Minn 2023 NYC Radiation Producing Equipment).
- When the service information page pops up, add metadata (summary, description, credits).
- Adjust the sharing as needed.
- Communicate: Create the map.
- View the feature service with Open in Map Viewer.
- Change the styling if desired and Save Layer so that styling is the default when the layer is loaded in the future.
- Save the map under a meaningful name. Using the same name as the feature service will aid in remembering the two items are connected (Minn 2023 NYC Radiation Producing Equipment).
- Adjust Share map as needed (Everyone).
- Copy the URL from the location bar to share the map.
Mapping CSV Files by Geocoding
Locations in a CSV file can also be specified with location names like street addresses, city names, country names, etc. The process of converting from location names to latitude/longitude is called geocoding. Because place names are often inexact, geocoding always involves some level of uncertainty, and geocoded points will often be misplaced and require cleaning if the spatial accuracy of your data is important.
When your table contains place names, you can map the table as a bubble map (graduated symbols) by geocoding the place names into latitudes and longitudes. Geocoding is an imperfect process and if you have something like a country code that can be joined more accurately, that may be a better option.
- Alternative spellings, abbreviations, and name variations can confuse the geocoding software.
- Geocoding can be costly if you have very large numbers (tens or hundreds of thousands) of addresses to geocode.
- Because geocoding is commonly implemented with public servers, Geocoding can violate privacy if you are working with confidential data (like medical records).
For example, the Food and Agriculture Organization of the United Nations (FAO) collects a vast array of open country-level agricultural data and makes it available to the public through their FAOSTAT web portal.
This example uses FAO data for almond production by country. While almonds are delicious and nutritious (THC School of Public Health 2023) growing almonds is very water-intensive (Fulton, Norton, and Shilling 2019), so knowing where almonds are grown can point us to areas where agriculture may have a detrimental water footprint.
The only geospatial components the FAO tables contain are country names and FAO country codes, so one approach to bubble mapping is to geocode by country name to create points that can be used for bubble maps.
- Acquire the data: Download the table and open it in a spreadsheet program like Excel.
- Process the data:
- Remove all unneded rows and columns.
- Make sure the top header row should contain your variable names (Country Name, Almond Tonnes).
- Make sure all rows in the location column have valid location names. Note that almond trees are native to the Mediterranean and require warm weather, which limits the number of countries where they can be grown.
- Save As the spreadsheet as a Comma Separated Variable (CSV) file.
- Store the data: Create the feature service.
- On your ArcGIS Online Content page, click New Item.
- Browse Your Device to find the CSV file on your local machine.
- On the How would you like to add this file? screen, select Add...and create a hosted feature layer or table.
- On the Fields screen, verify that all fields are appropriate types. Make sure all numbers have a type Double (double precision floating point).
- On the Location settings screen, go into Advanced location settings and make sure the appropriate locator Region is selected so the geocoder knows where to look for your place names. For this country-level data, we use the World region.
- For Location fields, we choose the Country Name field.
- Save the new layer under a meaningful name (Minn 2022 Almond Production).
- Add summary metadata so a potential user can know what the data contains and where it came from.
- Communicate: Create the map.
- View the feature service with Open in Map Viewer.
- If needed, you can delete unneeded locations.
- Change the styling if desired and Save Layer so that styling is the default when the layer is loaded in the future.
- Save the map under a meaningful name. Using the same name as the feature service will aid in remembering the two items are connected (Minn 2022 Almond Production)
- Adjust Share map as needed (Everyone).
- Note that at least two countries are geocoded incorrectly (China Mainland and Georgia as a state rather than a country). If misgeocoded points are important, you will need to edit the layer and move the points.
- Copy the URL from the location bar to share the map.
Mapping CSV Choropleths Using Attribute Joins
Geocoding only converts place names to points, so if you want to create a choropleth with tabular data, you will need to join it to a layer of polygons based on a common attribute.
A join is a common database operation where two data sets are connected to form a single data set. An attribute join connects two datasets based on common key values.
One challenge is that attribute joins need to have a variables in both layers that match exactly. Variations in country names and abbreviations can cause gaps in the data because of failure to match and if you have standardized codes like ISO3 country codes, those are preferred.
- Acquire the data: Download the table and open it in a spreadsheet program like Excel. For this example we will use annual primary energy consumption for EU countries.
- Process the data:
- Remove all unneded rows and columns and make sure the columns you keep have meaningful names (Country Name, Primary Energy TJ).
- Review the location names to catch any possible problems. In this case we correct Bosnia and Herzegovina (abbreviated Bosnia and Herz. in the polygon data). Turkey, and Kosovo (remove the asterisk). If you are unfamiliar with your polygon location names, you may need to perform an initial join to find the mismatched names, update your data, and repeat the join to get matches for all areas.
- Save As the spreadsheet as a Comma Separated Variable (CSV) file.
- Store the data: Create an ArcGIS Online table.
- On your ArcGIS Online Content page, select New item and browse to open the CSV file.
- Keep the default option to Add...and create a hosted feature layer or table.
- On Location settings select the dropdown and choose None to create a data-only table.
- Give the table a meaningful name (Minn 2019 EU Primary Energy).
- Process the data: Join the data table and polygons to create a new feature service.
- On the information page for the data table, Open in Map Viewer.
- Add the layer of polygons. In this example it is the Minn 2023 World Polygons layer from ArcGIS Online.
- Under Analysis, select Tools and Join Features.
- The Target layer should be the polygon layer.
- The Join layer should be the data table.
- Under Join Settings, keep the default Use attribute relationship.
- The Target field is Country Name.
- The Join field is NAME.
- Under Result layer, provide a meaningful Output name (Minn 2019 EU Primary Energy).
- Select Estimate Credits to make sure your join settings are appropriate. The credits should be in single digits for a join like this.
- Run the join.
- Click the History icon to check the status. The new layer will be automatically added to your map when the tool completes.
- Communicate: Create the map.
- Remove all the layers except the joined layer.
- Change the styling to the desired default variable.
- Save the map under a meaningful name. Using the same name as the feature service will aid in remembering the two items are connected (Minn 2019 EU Primary Energy).
- Adjust Share map as needed (Everyone).
- Copy the URL from the location bar to share the map.
Mapping HTML Tables
Data is sometimes made available on websites as HTML tables on web pages. As with the tabular data above, it is possible to copy that data into CSV files and geocode it for mapping.
For example, Wikipedia pages commonly contain tables of data with place names that you can import into ArcGIS Pro. However, note that Wikipedia is an online encyclopedia and the data in Wikipedia usually comes from some other original source. Before using data copied from Wikipedia, you may want to look at the references for the original data source and use that instead so you can be assured of the most current and accurate data.
This example uses data for the notorious 1876 US Presidential Election, a closely-contested contest which was settled with the Compromise of 1877 that ended post-civil-war reconstruction and began the Jim Crow era.
- Process the data:
- Select the data on the web page and copy it into a blank spreadsheet.
- Remove all unneded rows and columns.
- Make sure the top row contains only the names of your variables. Rename as needed.
- Make sure all rows in the location column have valid location names.
- Save As the spreadsheet as a Comma Separated Variable (CSV) file.
- Store the data: Create the feature service.
- On your ArcGIS Online Content page, click New Item.
- Browse Your Device to find the CSV file on your local machine.
- On the How would you like to add this file? screen, select Add...and create a hosted feature layer or table.
- On the Fields screen, verify that all fields are appropriate types. Make sure all numbers have a type Double (double precision floating point).
- On the Location settings screen, go into Advanced location settings and make sure the appropriate locator Region is selected so the geocoder knows where to look for your place names. For this US state-level data, we use the default United States region.
- For Location fields we choose the State field.
- Give the new layer a meaningful name (Minn 1876 US Presidential Election).
- When the service information page pops up, add metadata (summary, description, credits).
- Adjust the sharing as needed.
- Communicate: Create the map
- View the feature service with Open in Map Viewer.
- Change the styling as needed.
- Save the map under a meaningful name. Using the same name as the feature service will aid in remembering the two items are connected (Minn 1876 US Presidential Election).
- Adjust Share map as needed (Everyone).
- Copy the URL from the location bar to share the map.
Mapping Manually Entered Data
In some situations where governments or organizations either do not have the resources or the ideological inclination to support open data portals, data may only be available as tables in Portable Document Format (PDF) files. Even in places with open data portals, some agencies may make their data only available as PDF files, especially historic documents.
While tables can sometimes be copied directly from PDF files into a CSV file for import into GIS, PDF is a format designed for print and the data must either be copied with a significant amount of clean up, or in the worst cases may have to be entirely entered by hand. However, if you need the data and you can't find another electronic source, you may not have a choice.
For example, the US Census Bureau has published a variety of statistical abstracts since the late 19th century that summarize data about the US. The older documents are scanned into PDF files. This video shows manual entry of data about the number of miles of railroad in operation in 1877 by state, which is then geocoded for mapping in ArcGIS Online.