Turning grant prospect data into a transparent, actionable research plan.
GrantLens is a Python analytics prototype that helps teams understand their funding pipeline, identify unreliable records, and decide what to investigate next. It combines data validation, SQL summaries, interactive visualization, and transparent prioritization in a Streamlit workspace.
Built by V. Bryant as an ongoing portfolio project, GrantLens connects analytical work with the operational decisions facing small nonprofits and community organizations.
Grant prospect spreadsheets often contain useful leads alongside duplicate opportunities, uncertain award amounts, missing deadlines, and inconsistent assessments of fit. Summarizing those records without checking their quality can overstate funding potential or misdirect limited staff time.
GrantLens turns that uncertainty into practical questions:
- Which opportunities need attention soon?
- Where is recorded funding potential concentrated?
- Which records require verification?
- What should the next research sprint prioritize?
I developed GrantLens to connect grant research with practical decision support. My work brought together:
- Problem framing: translating prospect data into questions about pipeline health, deadlines, funding coverage, and follow-up.
- Analytical design: defining active prospects, excluding unresolved duplicate identities, and preserving unknown values.
- Technical implementation: building Python and pandas transformations, in-memory SQLite summaries, and a Streamlit interface with Plotly charts.
- Decision communication: pairing summary metrics with an action queue, data quality findings, and visible scoring assumptions.
- Validation: writing analytical tests and an application test covering demo metrics and empty filters.
| Capability | Decision It Supports |
|---|---|
| Active prospect count and known funding potential | Understand the recorded pipeline |
| Deadlines within 30 days | Identify near-term review needs |
| Funding type and pipeline stage filters | Compare pipeline segments |
| Ranked action queue and next-action labels | Plan research and verification work |
| Data quality findings with CSV row references | Trace problems back to source records |
| Analysis and quality CSV exports | Carry findings into team workflows |
The included demo dataset contains 14 fictional records with deliberate data quality problems.
Applying the documented rules as of October 29, 2026, with all filters selected, produces:
| Measure | Demo Result |
|---|---|
| Active prospects after identity and status exclusions | 10 |
| Known active funding potential | $475,000 |
| Active deadlines within 30 days, inclusive | 4 |
| Active prospects with usable amounts | 90% |
| Records excluded because of duplicate identity | 2 |
The analysis supports a concrete research plan:
- Review four near-term opportunities.
- Resolve one past-deadline record.
- Verify one unknown deadline.
- Assess one active prospect with an unusable fit score that remains unranked.
These results describe fictional demonstration data. They do not establish real funding availability, grants secured, user adoption, or measured time savings.
CSV input → pandas validation → filtered records → SQLite summaries → Streamlit and Plotly views → CSV exports
Require the seven-column schema, trim text whitespace, and flag:
- Missing opportunity identities
- Unknown pipeline statuses
- Missing or invalid amounts
- Invalid fit scores
- Missing or invalid deadlines
Exclude every repeated funder/program pair from metrics until resolved. Identity matching is case-sensitive after trimming whitespace.
Records with missing identities or unknown statuses are also excluded from metrics.
Missing or invalid numeric values remain unknown. A missing field does not automatically remove the entire opportunity from analysis.
Funding totals represent recorded amounts and may include overlapping opportunities. They are not revenue forecasts.
Active stages are:
- Research
- Qualified
- Preparing
- Submitted
Awarded and Declined prospects remain available for stage summaries but are excluded from active funding potential.
Past-deadline records remain active until their status is resolved. They receive a review action and no priority score.
Priority uses a transparent heuristic:
Priority = 0.8 × fit score + 0.2 × deadline urgency
Urgency declines linearly from 100 on the analysis date to zero at 90 days.
- Unknown deadlines receive zero urgency points.
- Missing fit scores remain unranked.
- Closed and past-deadline opportunities remain unranked.
This score supports research triage. It does not verify eligibility or estimate award probability.
The app displays the SQL executed against filtered, metric-eligible records in an in-memory SQLite database.
Data quality findings describe the entire imported file, independently of sidebar filters.
For organizations with limited capacity, an inflated pipeline or unexplained ranking can divert attention from appropriate opportunities. GrantLens makes assumptions and data problems visible so staff can assess the basis for follow-up decisions.
- Human judgment: fit scores are analyst assessments. A documented rubric and scoring sensitivity analysis remain future work.
- Honest interpretation: known funding potential is distinct from expected revenue or secured funding.
- Privacy: the demo uses fictional organizations. Uploads are processed in application memory and are not intentionally saved by the app. Hosted operators still process uploaded information.
- Safer exports: CSV export logic prefixes text beginning with common spreadsheet formula characters to reduce formula-injection risk.
This version uses deterministic Python and SQL logic. It does not use an AI model or automatically discover or verify grants.
Community relevance is the intended application context; community impact has not yet been measured.
- Python
- pandas
- NumPy
- SQLite
- Streamlit
- Plotly
- unittest
- Streamlit AppTest
| Current File | Purpose |
|---|---|
app.py |
Interface, filters, charts, action queue, and exports |
analytics.py |
Validation, scoring, SQL summaries, and export handling |
demo.csv |
Fictional 14-record demonstration |
Sample CSV.csv |
Additional sample file |
test_analytics.py |
Analytical unit tests |
test_app.py |
Application smoke and empty-filter test |
START.ps1 |
Windows startup helper |
checks.yml |
Intended automated test workflow |
config.toml |
Configuration file |
download |
Ignore-pattern text under a nonstandard filename |
The uploaded repository requires packaging repairs before the documented startup and full test workflow can be reproduced.
Required repairs:
- Place
demo.csvatdata/demo.csv, matching the application paths. - Add
requirements.txtwith validated versions of Streamlit, pandas, NumPy, and Plotly. - Move both test files into
tests/, matching their path logic and test discovery command. - Move
checks.ymlto.github/workflows/checks.yml. - Review
config.tomlfor placement at.streamlit/config.toml. - Rename
downloadto.gitignoreif it is intended to supply Git ignore rules.
Python 3.13 is specified in the existing project documentation and workflow.
python -m venv .venv
# Windows PowerShell
.venv\Scripts\Activate.ps1
# macOS/Linux
# source .venv/bin/activate
python -m pip install -r requirements.txt
python -m streamlit run app.pyKeep the analysis date at October 29, 2026 to reproduce the demo results.
To analyze another dataset, upload a CSV and select an analysis date. Uploaded files default to the current date.
python -m unittest discover -s tests -vTests are present in source. A successful test run and functioning continuous integration should be documented after the packaging repairs.
Headers are exact and case-sensitive. Extra columns are ignored.
| Column | Expected Content |
|---|---|
funder |
Nonempty funder name |
program |
Nonempty program name |
type |
Funding category |
status |
Research, Qualified, Preparing, Submitted, Awarded, or Declined |
amount |
Nonnegative numeric amount in USD; blank means unknown |
fit_score |
Analyst assessment from 0 to 100; blank means unknown |
deadline |
ISO date YYYY-MM-DD; blank means timing unknown |
Together, funder and program define opportunity identity.
Normalize currency strings, award ranges, and free-text deadlines before uploading. Use fictional or public information on public deployments.
- Repair packaging and document a reproducible test run.
- Add a hosted fictional-data demo.
- Include annotated screenshots of the overview, action queue, and quality findings.
- Define the fit rubric and compare alternative scoring weights.
- Add funding source URLs and verification dates.
- Map the earlier research spreadsheet to the import schema.
- Evaluate usability and measure task completion or time savings.
V. Bryant
Program management, data strategy, and responsible technology adoption.