Public API
Every function below has its own reference and a runnable synthetic-data exploration. Start with a question, follow a story, or go straight to an argument. All pages describe Fieldwork 0.3.2 and its recorded source.
Use import fieldwork as fw. Analyses take pandas dataframes and preserve source values. Each walkthrough explains its population, shows real output, and includes a downloadable script that follows the same steps.
Find a starting point
Section titled “Find a starting point”| Your question | Tool | Walkthrough |
|---|---|---|
| What should I investigate first? | fw.explore |
Municipal service requests and missing photos |
| Which measurements are available together? | fw.missingness |
Marsh monitoring visits and station coverage |
| What determines this value, and what breaks the rule? | fw.discover_dependencies |
Warehouse receipts and packaging conventions |
| What order makes this table readable? | fw.suggest_paths |
Museum storage from collection to object |
| What conventions hide in populated values? | fw.value_patterns |
Sensor exports, formats, and measurement relationships |
| Which values occur, and what does a short list omit? | fw.levels |
Repair-cafe intake, outcomes, and omitted categories |
| What sits inside each group? | fw.census |
Library borrowing and selected cohorts |
| What does a proposed key determine? | fw.grain |
Books, editions, copies, and a binding discrepancy |
| How do two dimensions relate? | fw.pairs |
Transit routes, tickets, and three kinds of absence |
| What counts sit behind one association? | fw.joint_counts |
Bakery orders by pickup window and bread |
| How do my chosen dimensions fit together? | fw.profile |
Service requests by channel, service, and photo |
| Which column roles deserve review? | fw.infer_schema |
Manufactured parts and accidentally unique measurements |
| How has availability changed? | fw.compare |
Festival registrations and a changing channel mix |
| Do two tables connect through a key? | fw.relate |
Tool-library loans, members, and buddy pairs |
Present and preserve evidence
Section titled “Present and preserve evidence”| Output | Function | Use it for |
|---|---|---|
| Bounded text | fw.render_plaintext |
Terminal, notebook, and text reports. |
| Vector figure | fw.render_svg |
Static documents and webpages. |
| Standalone report | fw.render_html |
Sharing expandable evidence without Python. |
| Presentation dictionary | fw.visualization_data |
A custom view of saved evidence. |
Save result.to_dict() when you need an analytical archive. Presentation output can omit quantities or findings; it is not a substitute for the full result. See results and configuration for source-bound scopes, inspection, selection, recipes, and serialization.
Signature lookup
Section titled “Signature lookup”These entry points link to complete argument tables, return contracts, and worked examples. explore and profile also document their option mappings explicitly.
explore
Section titled “explore”Orient yourself in an unfamiliar table.
missingness
Section titled “missingness”Understand which information arrives together.
discover_dependencies
Section titled “discover_dependencies”Find mappings and the rows that break them.
suggest_paths
Section titled “suggest_paths”Choose an order that makes a table readable.
value_patterns
Section titled “value_patterns”Read the contents behind populated cells.
levels
Section titled “levels”See the distribution of each field on its own.
census
Section titled “census”Walk from broad groups to specific combinations.
Test what a supplied key really determines.
Separate observed mappings, association, and absence.
joint_counts
Section titled “joint_counts”Inspect one two-way table without hiding its cells.
profile
Section titled “profile”Explain a table through dimensions you have chosen.
infer_schema
Section titled “infer_schema”Review column-role proposals before choosing dimensions.
compare
Section titled “compare”Explain changes in availability between deliveries.
relate
Section titled “relate”Check how two tables connect through a key.
render_plaintext
Section titled “render_plaintext”Format a readable terminal report.
render_svg
Section titled “render_svg”Create a static figure from saved evidence.
render_html
Section titled “render_html”Share an explorable evidence report.
visualization_data
Section titled “visualization_data”Use the labels and values behind a figure.
For runtime feedback and cancellation, see Progress, cancellation, and work budgets, including ProgressEvent, ProgressDisplay, CancellationToken, AnalysisCancelled, and the safe_errors control with its AnalysisError. Public signatures and editor documentation describe the supported controls; fieldwork.typing provides reusable option dictionary types.