Inspiration

When looking up medications, people often come across long lists of side effects filled with unfamiliar medical terms. Even though the FDA makes medication safety reports publicly available, this information can be difficult to understand without a medical or technical background.

We wanted to make this information easier to explore, especially for people interested in understanding how reported reactions differ across age groups and sexes.

This inspired us to create MedLens, an interactive tool that makes medication safety data more accessible through simple explanations, demographic comparisons, and visualizations.

What it does

MedLens turns a dataset of 528,000 FDA adverse-event reports from 2015–2025 into an interactive website where users can:

  • Compare medications: Select two medications and view their most commonly reported adverse events side by side.
  • Filter by demographics: Explore reported reactions across different age groups and sexes.
  • View interactive visualizations: Understand how often certain reactions appear in reports through clear charts and comparisons.
  • Understand medical terminology: Switch between technical terms and simpler, everyday language.
  • Explore reporting patterns: Use Proportional Reporting Ratios (PRR) to see which reactions appear more frequently in reports for certain medications compared to others.
  • Track changes over time: Explore how medication reporting patterns have changed across different years.
  • Understand the data: View plain-language summaries, downloadable tables, and explanations of missing information.

We also made sure to explain that reported adverse events do not necessarily mean a medication caused them. MedLens is designed to help people understand public medical information, not provide medical advice.

How we built it

We started with a Kaggle dataset containing 528,000 FDA adverse-event reports collected between 2015 and 2025.

Using Python, pandas, and NumPy in Jupyter Notebook, we cleaned and analyzed the data, focusing on medication names, reported reactions, patient demographics, and reporting trends.

We also used statistical methods, including Proportional Reporting Ratios (PRR), to explore which reactions appeared more frequently for certain medications.

After analyzing the data, we organized the results into a smaller JSON file covering the 150 most-reported medications. This allows the website to load results quickly without needing to process the entire dataset every time.

We then built our interactive website using Streamlit and Altair, adding medication comparisons, demographic filters, charts, and plain-language explanations.

Finally, we deployed MedLens through Streamlit Community Cloud and published our code on GitHub.

Challenges we ran into

One of our biggest challenges was working with such a large medical dataset. We ran into issues loading the CSV file, cleaning inconsistent data, and handling missing demographic information.

Another challenge was making sure our results were accurate and easy to interpret. FDA reports don't necessarily mean that a medication caused a reaction, so we had to be careful not to present reporting patterns as actual medication risks.

We also noticed that some reported reactions were actually conditions that the medications were meant to treat. We addressed this by labeling those conditions to help users better understand the results.

Finally, we had to balance including meaningful data analysis with keeping the website simple and accessible, especially within the limited time of the hackathon.

Accomplishments that we're proud of

We're proud that we were able to turn a large, complicated medical dataset into a working website that people can actually use.

Some of our main accomplishments include:

  • Analyzing 528,000 FDA adverse-event reports.
  • Building an interactive tool that compares medications across different demographic groups.
  • Making medical information easier to understand through plain-language explanations.
  • Creating clear visualizations, summaries, and tables that make the data easier to explore.
  • Including explanations of the dataset's limitations to help users interpret results responsibly.
  • Successfully deploying MedLens as a publicly accessible website.

We're especially proud that we focused not just on analyzing the data, but on making the results accessible to people without a medical or technical background.

What we learned

Through MedLens, we gained more experience with data cleaning, statistical analysis, data visualization, and building interactive applications.

We also learned how important it is to present medical information responsibly. Just because certain patterns appear in data doesn't mean one factor caused another, especially when working with adverse-event reports.

One of our biggest takeaways was that making information public doesn't automatically make it accessible. How information is explained and presented can make a huge difference in whether people can actually understand and use it.

What's next for MedLens

With more time, we'd love to continue improving MedLens by:

  • Adding more medications and regularly updated FDA data.
  • Including more detailed demographic comparisons.
  • Adding multilingual explanations and text-to-speech features.
  • Improving cybersecurity through additional dataset integrity checks and security testing.
  • Gathering user feedback to make the website even more accessible.

Ultimately, we hope MedLens can help make medication safety information easier for more people to understand and explore.

Built With

Share this project:

Updates

Submission history