From Web Page to Table
Standard quoted exactly
Apply data acquisition, cleaning, and transformation techniques to prepare data for AI analysis.
Example from the standards. Use something like NotebookLM to scrape a website, then pull specific data out of the result for analysis.
Student-friendly learning targets
- I can acquire a table from a public web page or a printed excerpt and say how I got it.
- I can pull only the fields I need and transform them into typed columns ready for analysis.
- I can refuse login walls, student PII, and district-unapproved scrapers.
Essential questions
- What is the difference between viewing a web page and having a table a model can use?
- If scraping is blocked, how do we still acquire the data ethically?
- Which transformations happen after acquisition, and which should have happened at the source?
Objectives
- Acquire rows from a public, no-login Idaho page (or a printed excerpt / CSV export of that page).
- Select specific fields (station, timestamp, value, units) and write them into a clean table.
- Apply DA.1–DA.2 cleaning and type checks so the table is analysis-ready.
- Document the acquisition method, URL or handout ID, retrieval date, and any terms of use.
Key vocabulary
- Acquisition
- Getting data from a source into a file you control: download, export, scrape, or typed transcription from a printout.
- Scrape
- Programmatically or manually pulling structured fields out of a web page that was built for humans to read.
- Transformation
- Changing shape or type after you have the raw pull: split fields, parse dates, convert units, reshape long vs. wide.
- Field
- One kind of fact you extract (stage_ft, cfs, county). A web paragraph may hide several fields in one sentence.
- Terms of use
- The source's rules for copying. Public government pages are usually usable; login walls and paywalls are not in this class.
Teacher background
The standards example names NotebookLM-style scrape-then-extract. In an Idaho classroom that tool may be blocked, require a login, or violate district AI policy. The lesson must still run: a printed NOAA river-gauge page, an Idaho Fish and Game fishing-report excerpt, an Idaho Power public dashboard screenshot, or a CSV export the teacher downloaded ahead of time. Students practice the intellectual move — page to fields to typed table — not a particular brand. No login walls. No crawling behind CAPTCHAs. Spreadsheet-first: paste, Text to Columns, date parse, unit column. If a district-approved extract tool exists, use it as one station, not the gate. Python BeautifulSoup is an extension.
Materials and prep
Materials
- Teacher-captured public page packets: (1) USGS/NOAA gauge excerpt for the Snake or Boise, (2) ISDA or USDA crop brief, (3) NWS fire-weather headline block. HTML file or PDF plus a CSV export of the same.
- Blank target schema: station_id, datetime, metric, value, units, source_url, retrieved_on.
- Spreadsheet starter; printed excerpt with highlighter colors per field.
- Optional district-approved extract tool (NotebookLM or similar) on one station only, with the printed fallback at every other seat.
- Acquisition log half-sheet.
Before class
- Download and print the pages the night before so the lesson is offline-proof. Note retrieval date on every packet.
- Check robots/terms at a glance: prefer .gov and .edu. Do not use social media or school portals.
- If offering an approved extract tool, test it on the same page and save the output so a blocked login does not kill the period.
- Strip any accidental person names from screenshots.
Instructional sequence
Page vs. table
5 min- Project a river-gauge web paragraph: 'Boise River at Glenwood: 1,240 cfs, stage 4.8 ft, 14:00 MDT.'
- Students list the fields a model would want. Reveal a 1-row table with typed value and units.
- Name the gap: acquisition plus transformation.
Acquire, select, transform, document
10 min- Four verbs on the board. Acquire: download, export, approved extract, or transcribe from print. Select: only the fields in the schema. Transform: numbers, dates, units. Document: URL, time, method.
- Show a bad acquire: a login-walled dashboard and a social post. Both are out.
- Demo paste-from-PDF into a sheet, split on colons and commas, VALUE() the cfs, separate units.
- Remind: cleaning skills from DA.1–DA.2 apply immediately (1,240 has a comma; MDT is a timezone, not a number).
One paragraph, one row
12 min- Class extracts the Glenwood sentence into the schema together.
- Handle 1,240 → 1240, ft vs. cfs as two rows or two columns (decide as a class and stick to it).
- Fill source_url and retrieved_on. If using a printed packet, the 'URL' is the handout ID.
- Offline groups highlight fields in four colors instead of typing, then copy onto the schema card.
Build a five-row analysis table
10 min- Each pair gets one packet (gauges, crop, or fire weather) and must produce at least five clean rows.
- They run a type/range check on the value column (DA.2) and lowercase any text fields (DA.1).
- Acquisition log: method (print / CSV export / approved tool), date, and one field they refused because it was prose, not data.
Real-world examples
- USGS waterdata pages for the Snake, Boise, and Payette: the HTML is for humans; the tabulated instantaneous values are what a flood model wants.
- NWS Boise fire-weather forecasts bury red-flag wording in paragraphs; extracting RH, wind, and headline into columns is the AI-prep step.
- Idaho Fish and Game fishing reports mix narrative with numbers (cfs, water temp); a stocking-recommendation model needs the numbers pulled out.
- Idaho Power public energy dashboards: a screenshot is not a table until MW and timestamp are typed and time-zone aligned.
Hands-on activity
Ready-for-analysis stamp
8 min- Pairs swap tables and try to break them: mixed units, leftover commas, missing retrieval date.
- If the table survives, stamp 'ready for analysis' on the log. If not, one fix cycle.
- Stack the five-row tables; these can feed DA.5 as example quality talk, still public.
Discussion questions
- Is typing from a printout still 'acquisition'? Why might it be more ethical than a blocked scraper?
- The page has a chart image but no numbers. What are your legal options?
- If two pairs extract the same paragraph and get different cfs, whose table should a model trust?
- When does transforming (unit conversion) become lying about the source?
Differentiation
Support
- Highlight-by-color printout with a fill-in table; no live web.
- Provide the CSV export and ask only for column selection and one unit transform.
Challenge
- Reshape three metrics from one paragraph into long format (one metric per row) vs. wide; justify for a later model.
- Write a repeatable extraction recipe another pair could follow on next week's page.
Multilingual learners
- Packets include an English NWS excerpt and a Spanish public advisory if available; fields stay the same schema.
- Glossary strip: acquire, scrape, field, units.
IEP / 504
- One paragraph, two rows maximum; oral documentation of URL/handout ID.
- Avoid timed scraping; the printed excerpt is the default, not a consolation.
Assessment
Formative
- Glenwood we-do row and color highlighting.
- Acquisition log method box filled before independent rows.
Summative
- Five-row typed table matching the schema, plus log (source, date, method) and one type/range check.
- Using a login-walled tool or a personal account scores as a process miss even if the table looks clean.
Success criteria
- Rows have typed values, explicit units, and a documented public source.
- Student selected fields rather than dumping the whole page.
- Student can name the fallback they would use if scraping is unavailable.
Responsible use, ethics, and privacy
Responsible use
District-approved tools only. No login walls, no password sharing, no school accounts fed into third-party scrapers. Prefer teacher-downloaded public files.
Ethics
A page can be public and still wrong, copyrighted as a compilation, or harmful if republished out of context. Acquisition includes reading the terms and not hammering a small agency server.
Privacy
Never scrape a class page, grade portal, or anything with student emails. FERPA applies even when 'it's just a demo.' Public river and crop pages only.
Reflection
- What did the web page know that your table still does not?
- Which acquisition method would you trust in a rural lab with weak Wi-Fi?
- How would you explain 'no login walls' to a teammate who just wants the easy tool?
Homework
Using only the printed fishing-report or gauge excerpt in the packet, extract three rows into the schema on paper. Fill source and date. Do not log into any site from home for this assignment.
Closing
A web page is a story; a table is a contract. We acquired public fields, transformed them, and wrote down how. If the fancy scraper is blocked tomorrow, the printout still works. Next we ask whether the examples in a table are even fair.
Extensions and cross-curricular links
Go further
- 90-minute block: second source (crop + gauge) and a join on date; or a district-approved extract tool compared side-by-side with the print transcription (count mismatches).
- Python extension: read a saved HTML file (not a live scrape of a login page) and pull a table with pandas.read_html; still document URL and date.
- Card sort: 'legal acquire' vs. 'out of bounds' (school SIS, Instagram, .gov CSV, paywall PDF, printed NOAA).
- Teacher-exported CSV only, for buildings with no student web access.
- Journalism / media
- Citing the URL and retrieval date is the same discipline as quoting a source; tables need citations too.
- Earth science
- Gauge units and time zones are part of the measurement, not formatting trivia.
- Civics
- Public .gov data is a civic resource; scraping a private portal is not the same act.