ACP Consultants · Environmental Data Foundations · Version 1.0
ACP Consultants

Read before running an example

Using the environmental data starter pack

Back to the learning page · Answer notes · Browser lab

Run a supplied lesson

  1. Download and extract the complete ZIP. Keep the folder structure.
  2. Read the data dictionary. All six datasets are synthetic.
  3. Install Python or R from its official distribution if needed. Choose one language first.
  4. Open a terminal in the extracted folder.
  5. Run python learn.py --out outputs/python or Rscript --vanilla learn.R outputs/R.
  6. Open results.csv in the chosen output folder. Compare it with expected-results.csv.
  7. Open quality-audit.csv and observations.svg. Confirm the inclusion decisions.
  8. Read the answer notes before adapting a copied dataset.

Understand your files

data/: six small CSVs; retain the exact header names and units.

learn.py / learn.R: readable source, including checks and explanations.

expected-results.csv: checked reference values. Allow ordinary floating-point rounding; compare values to six decimal places.

run-manifest: software and input fingerprints, so another person can identify what was used.

observations.svg: a vector plot of valid monitoring readings. The Python and R figures have different appearances but the same values.

Re-running overwrites that output folder. Choose a different folder when changing inputs.

Field and inclusion conventions

Identifiers must be non-empty and unique within each file. The first column is the observation identifier. Numbers use a decimal point, CSV columns use commas, and text is UTF-8. The monitoring file uses valid, missing or excluded status. A missing record must have an empty value; a valid record must contain a finite non-negative value. The exclusion in the example represents a documented calibration fault.

The examples reject unexpected headers, duplicate identifiers and impossible ranges defined for the exercise. They do not verify sampling permissions, instrument calibration, site representativeness or whether the supplied method is suitable for a real project. Dates are documented metadata, not a fitted time-series model.

Using the browser lab

  1. Load the six-value monitoring example or enter 2–30 finite numbers separated by commas. This lab has no missing-value syntax.
  2. Enter a unit label and choose “Calculate and draw”. Inspect the mean, median, sample standard deviation and individual observations.
  3. Change 40 to 140 and calculate again. Explain why the mean and median respond differently.
  4. Export the results CSV and plot SVG. The SVG is a vector image; open it in a browser or compatible illustration program.
  5. Export the saved-example JSON if you want to reopen this exact example. Keep a copy on your device.
  6. Use “Reopen saved example” to select the JSON, and the tool recalculates automatically. It checks the version, array size and numbers before accepting it.

Inputs stay in the current page until you reload or leave. There is no account storage or automatic recovery. Download to preserve work. Exports identify the tool and units as entered; check the units and data origin before sharing. The exported chart is a descriptive scatter of records, not a fitted trend. On a small screen, swipe within the chart to read its labels, or export the SVG. If a download seems to do nothing, check for a Save As window and your browser downloads. The tool requests a download; it cannot confirm that you saved the file.

Troubleshooting

Command not found

Check that the selected language is installed. Use its full interpreter path, or use the Python py launcher on Windows. Run terminal commands in a terminal, not inside an interactive language prompt.

Cannot find data

Extract the whole pack rather than opening a script inside the ZIP. Keep data/ next to the scripts. The scripts locate their own data folder.

Unexpected header or invalid value

Compare with a fresh copy of the sample CSV. Check commas, decimal points, duplicate IDs, status spelling and units. Never remove a failed check just to produce an answer.

Blank NDVI result

The zero-denominator example intentionally returns a blank cell. It is undefined, not NDVI = 0. R uses NA internally and exports a blank.

Reuse and attribution

Original example code is available under the MIT licence. Original educational text, diagrams and synthetic datasets are available under CC BY 4.0. Credit ACP Consultants Ltd., link to this resource and state any changes. ACP logos and third-party material retain their separate rights. See the included reuse terms. Read REUSE.txt and CODE-LICENCE.txt. References retain their own ownership. Credit ACP for its original exercises, not for third-party documentation.