String Parsing and Formatting
Learning Outcomes
After completing these module, you should be able to:
- Describe how strings are stored in a computer
- Define the terms string, character, and ASCII
- Customize the formatting of numbers and put them into strings so they are easy to read
- Write out text files
Applications
Most of the data we see in natural resource applications is actually stored as text or "Strings" inside a computer. The spreadsheet data, emails, and even this web page are stored as text. There are a huge number of programming challenges that require the ability to create formatted text strings. Many of these include writing out the strings into text files. This includes:
- Writing out data from real-time data logging stations to make the data available on the web
- Converting spreadsheet data from one format to another. This is extremely common and includes:
- Converting common names to scientific names
- Converting coordinate formats like Degree, Minute, Second to more computer-friendly forms (and back again).
- Converting date formats
- Converting units
- Creating "synthetic" data as you just did in the previous assignments except by putting it in a text file. These data are used for testing out enterprise-level GIS systems (big systems) and new statistical methods.