Comprehensive Guide to CSV Data Creation, Georeferencing, and ArcGIS Pop-up Customization
Fundamentals of CSV Files and Point Data Creation
Creating point data in Geographic Information Systems (GIS) can be accomplished through four primary methods:
- Existing Feature Layers: Importing pre-made layers that already contain digitized point features.
- Manual Digitization: Creating a blank feature layer, defining a schema, and manually clicking on a map interface to place points, lines, or polygons.
- Batch Loading via CSV: Uploading structured point location datasets rapidly using a spreadsheet or text file containing addresses or spatial coordinates.
- Mobile Point Collection: Gathering field data directly using mobile location tracking and mapping applications.
A Comma-Separated Values (CSV) file is a plain-text, ASCII-based data format used by computer systems to exchange structured data across different software platforms.
Historical and modern applications of CSV files include:
- HVAC Control Systems: Building management systems, such as school climate controls, utilize large CSV files containing up to lines of instructions to regulate individual room temperatures.
- Automotive E-Commerce Systems: Online inventory platforms (e.g., vehicle sales databases) populate web pages by ingesting CSV files organized with specific field headers:
year, make, model, description, price.
Text-Based CSV vs. Spreadsheet CSV Formats
- Plain Text (.txt / .csv): Values are delimited exclusively by commas. Data alignment varies based on character length, making visual inspection and manual updates difficult for humans.
- Spreadsheet Software (Google Sheets / Microsoft Excel): Data is parsed into visible columns and rows. This format preserves spatial alignment for human readability while maintaining the underlying CSV structure upon export.
Technical Syntax and Formatting Rules for Plain Text CSVs
When writing a CSV file manually within a plain-text editor or document editor, strict computer syntax must be followed to avoid file ingestion errors.
Header Syntax Rules
- Header Line Placement: The very first line of the document must contain the field names (headers). No blank lines or text justification are permitted above or on this line.
- Space Prohibition: Spaces are strictly prohibited anywhere in the header string. A space placed before or after a comma alters the field string and causes field type misclassification during software ingestion.
- Allowed Separators: Fields must be separated strictly by commas
,. - Allowed Characters: Headers must consist entirely of alphanumeric characters (letters and numbers) and must start with a letter. Special characters such as asterisks
*or parentheses()are prohibited. - Underscores: The underscore character
_is the only non-alphanumeric character permitted in headers to separate words (e.g.,site_name,site_type,year_built). - Capitalization: Headers are case-insensitive regarding syntax execution, though consistent casing improves readability.
Data Record Rules
- Delimiters: Each data record occupies a new line below the header, with individual attribute values separated by commas.
- Spaces within Records: Spaces are permitted within text data values in records (e.g.,
Trevi Fountain). The software recognizes the comma as the structural boundary between fields. - Commas within Text Fields: If a text value contains an internal comma (e.g.,
Trevi Fountain, Rome), the entire string must be enclosed in double quotation marks"Trevi Fountain, Rome"to prevent the software from interpreting the comma as a column delimiter.
Spatial Data, Coordinate Systems, and Georeferencing
Tabular data without geographic coordinates cannot be automatically mapped as point features. Adding spatial attributes requires precise georeferencing.
Geocoding vs. Exact Coordinate Plotting
- Placing text addresses (e.g.,
Rome, Italy) into a dataset requires an automated geocoding engine to match strings to locations. - Providing explicit latitude and longitude coordinates bypasses geocoding errors and plots exact spatial locations directly in software clicks.
Coordinate Formats
GIS applications encounter over distinct coordinate reference systems (e.g., Universal Transverse Mercator [UTM], military grid reference systems). The three standard public formats are:
- Degrees, Minutes, Seconds (DMS): Expressed with symbols and cardinal directions (e.g., ).
- Decimal Degrees (DD): Expressed as positive or negative floating-point numbers (e.g., ).
- Universal Transverse Mercator (UTM): Expressed as easting and northing values in meters within defined zones.
GIS mapping engines require Decimal Degrees (DD) stored as double-precision floating-point numbers. Symbols (such as degree signs °, minute marks ', or cardinal letters N, S, E, W) cannot be processed as numerical spatial data.
Geographic Angular Calculations
- degree contains minutes of arc.
- minute contains seconds of arc.
- hour of rotational time equates to degrees of geographic longitude.
Coordinate Sign Conventions and Quadrants
Spatial placement depends on positive and negative mathematical signs relative to the Equator ( latitude) and Prime Meridian ( longitude):
- Quadrant 1 (Northern & Eastern Hemispheres): Positive Latitude (), Positive Longitude (). Example: Italy ().
- Quadrant 2 (Northern & Western Hemispheres): Positive Latitude (), Negative Longitude (). Example: Kentucky, USA ().
- Southern Hemisphere: Negative Latitude ().
- Western Hemisphere: Negative Longitude ().
Swapping latitude and longitude values, or omitting negative signs, results in geographic projection errors, placing features in wrong hemispheres or oceans.
Building and Uploading CSVs via Plain Text and Google Sheets
Method 1: Creating a CSV via Google Docs (Plain Text Method)
- Open a blank document named
sites in Rome. - In line 1, enter the exact header string with no spaces:
site_name,site_type,year_built,latitude,longitude - Enter the data records on lines 2 through 4:
- Line 2 (Pantheon):
Pantheon,temple,126,41.899,12.47 - Line 3 (Colosseum):
Colosseum,amphitheater,80,41.890,12.492 - Line 4 (Trevi Fountain):
Trevi Fountain,fountain,1762,41.901,12.483
- Line 2 (Pantheon):
- Export the document: Select File > Download > Plain Text (.txt).
- Convert file extension: Open the local file directory on the Chromebook. Perform a right-click (two-finger tap or
Alt + Click), highlight the file extensionsitesinrome.txt, and rename it tositesinrome.csv.
Method 2: Creating a CSV via Google Sheets
- Open a blank spreadsheet named
sites in Rome. - In Row 1, populate columns A through E with headers:
A1:site nameB1:site typeC1:year builtD1:latitudeE1:longitude
- Populate data rows 2 through 4:
- Row 2:
Pantheon|temple|126|41.899|12.47 - Row 3:
Colosseum|amphitheater|80|41.890|12.492 - Row 4:
Trevi Fountain|fountain|1762|41.901|12.483
- Row 2:
- Export file: Select File > Download > Comma-separated values (.csv). Save as
sites in Rome 2.csv.
Ingesting CSV Files into ArcGIS Online
- Navigate to the ArcGIS Online Content page and open Folder 3 (
learn CSVorBuild CSV). - Click New Item > Select Your Device (or drag and drop the
.csvfile). - Select Create a hosted feature layer.
- Field Schema Verification: Confirm data types are accurately assigned by the parser:
site_name: Stringsite_type: Stringyear_built: Integer (whole numbers)latitude: Double (decimal coordinates)longitude: Double (decimal coordinates) Note: If a space exists before a numeric header or cell value, the software misclassifies the field as a String, disabling spatial mapping and numerical mathematical operations.
- Location Fields Matching: Verify that spatial field dropdowns correspond correctly (
latitudemaps to Latitude;longitudemaps to Longitude). - Item Metadata Setup:
- Title:
sites in Rome [User Initials](Titles must be unique across the organization). - Folder:
Folder 3 - Tags:
FHSGA,CSV,Rome - Summary:
CSV layer of places in Rome, Italy
- Title:
- Save and Publish as Hosted Feature Layer.
Configuring Pop-ups, Image URLs, and Citations in ArcGIS Online
Image URL Integration Rules
To display images inside map pop-up windows, direct web links to raster image files must be embedded into the CSV dataset.
- Copy Image Address: When sourcing web images, users must right-click the expanded image preview and select Copy Image Address (or Copy Image Link). Copying the image file directly or copying the website URL will fail.
- Image Resolution Guidelines: Image files should be kept to a maximum resolution around pixels or smaller to avoid rendering latency or display issues within the GIS pop-up interface.
GIS Citation Standards
Traditional academic citation formats (e.g., MLA or APA) contain internal commas, periods, and quotation marks that break plain-text CSV parsing. In GIS tabular datasets:
- Citations require a clean, functional web link and the plain-text name of the host domain under a dedicated field.
Expanding the Google Sheet Schema
In sites in Rome 3, add two new headers in columns F and G:
F1:image URLG1:credit
Populate Rows 2 through 4 with direct image addresses and credits:
- Pantheon (Row 2):
image URL: Direct image link ending in.jpgor.png(e.g., sourced fromancient.euorwikipedia.org)credit:ancient.eu
- Colosseum (Row 3):
image URL: Direct image link (e.g., sourced frombritannica.com)credit:britannica.com
- Trevi Fountain (Row 4):
image URL: Direct image link (e.g., sourced fromtravelandleisure.com)credit:travelandleisure.com
Export the file as sites in Rome 3.csv and upload it to ArcGIS Online as a Hosted Feature Layer named sites in Rome 3 [User Initials].
Advanced Pop-up Customization and Formatting Fixes
Docking Pop-up Windows
By default, map pop-ups float adjacent to selected feature points, obstructing data visualization.
- To lock the pop-up location, open a feature pop-up and click the Dock icon in the upper-right corner of the pop-up header. This anchors all attribute views to a fixed corner of the map frame.
Displaying Images in Pop-ups
- Open the layer in ArcGIS Online Map Viewer.
- On the right-hand toolbar, select the Pop-ups menu.
- Click Add Media > Select Image.
- In the URL setting, select the
{image URL}field from the attribute dropdown. - In the Caption setting, select the
{credit}field from the attribute dropdown. - Save changes. Clicking a feature point will now display the embedded image with its attribution source below.
Removing Thousand Separators from Year Fields
By default, numerical integer fields (such as year_built) automatically format with commas as thousand separators (e.g., displaying the year as or year as ).
Step-by-Step Fix:
- Open the Pop-ups pane on the right-hand toolbar.
- Select Fields list or click directly on the
year_builtfield configuration. - Locate the Thousand Separator formatting option.
- Toggle the setting from "Always show" to "Never show".
- Save the map as
sites in Rome.