LTARE Data Naming Conventions

When naming folders and files, use consistent and clear names that are findable and understandable by both humans and computers. A file name should convey what it contains and which file is the most recent version.

Why are conventions important?

  • Improves consistency and predictability, making it easier to browse folders and know what they contain.

  • Enables sorting files by date, conservation district, or another theme.

  • Facilitates collaboration so all team members can find the information they need.

  • Standardizes file paths and URLs for efficient programming and website hosting.

    • URLs and programming languages are case-sensitive. WaSHI-data.csv and washi-data.csv are completely different files.

    • URLs cannot have spaces in them. They must be escaped with this character entity %20. For example, wasoilhealth.org/producer spotlights would need to be wasoilhealth.org/producer%20spotlights.

For more web-specific naming conventions, see this Learn the Web webpage.

Documents, Randall Munroe’s xkcd

Best Practices

Some files and folders in our shared drive do not follow these best practices or naming conventions. We are learning and improving as we go.

These are just guidelines. Because naming things is hard, we only ask that you try your best. If you’re unsure about names or adding externally named files, the Data Scientist can support you.

See  for a table of examples of folder and file names following these best practices.

Meaningful name casing

Different conventions work for different purposes (folders and files versus programming objects).

  • kebab-case: all lowercase with hyphens separating words. Use for folders and files.

  • snake_case: all lowercase with underscores separating words. Only use for column names in spreadsheets and code, such as functions and variables in R. See  for example R errors when including hyphens in object names.

Artwork by Allison Horst

Delimiters convey meaning

Deliberately use underscores and hyphens so we can easily understand the contents and programmatically parse file and folder names.

  • Use underscores to delineate metadata elements (i.e. date from name from version date_name_version).

  • Use hyphens to separate parts of one metadata element (i.e. date YYYY-MM-DD or name wsda-washi-presentation).

No spaces or special characters

Avoid spaces and special characters (only use underscores and hyphens). Characters like / () ! ? % + " ' have special meaning to computers and can break file paths and URLs.

Character length matters

Computers are unable to read file paths and file names that surpass a certain character length. Be concise AND descriptive. Omit prepositions and articles when possible. Abbreviate long words. The path limit on Windows is 260 characters.

‘Back to front’ date

Express date ‘back to front’ like YYYY-MM-DD according to the ISO 8601 standard. Left pad single-digit months and days with zeros to maintain chronological order of records when sorting alphanumerically.

nc1

Group & sort files by name

Consider how folders and files should be grouped and sorted, and include the appropriate metadata at the beginning of the file name. See examples in the image to the right.

nc2

Version numbers

Including the date in the file name is one way to version a file. Alternatively, or in addition to, append a number. Consider how many possible versions there could be. If more than 10, use leading zeros so the numbers have the same length. v1 through v15 will not sort the same way as v01 through v15.

nc3

Literature and references

Including the date in the file name is one way to version a file. Alternatively, or in addition to, append a number. Consider how many possible versions there could be. If more than 10, use leading zeros so the numbers have the same length. v1 through v15 will not sort the same way as v01 through v15.

nc4

Collaboration

Add your initials to the end of the file name when “saving as” a file that multiple people are working on (i.e., 2023_sop-soil-health-monitoring_lm-jr.docx). This ensures a version is kept as a backup. Alternatively, use Track Changes if working in a MS Word document.