We're thrilled to feature Shrenik Borad in this edition of the Preswald Community Showcase! π Shrenik has crafted an educational and visually rich Preswald app that analyzes meteorite landings around the globe, uncovering patterns in mass, time, and geography.
π Project Overview
π Preswald and Meteorite Analytics
This blog explores how Preswald is used to build an interactive dashboard around NASA's meteorite landings data, helping users explore thousands of meteorite records by mass, location, and year.
Project Name: Meteorite Landings Dashboard
Built by: Shrenik Borad
Dataset: NASA Meteorite Landings Dataset
Live App: Meteorite Dashboard
π Description
Shrenik's project allows users to:
-
βοΈ Filter meteorites by minimum mass using a slider
-
π Explore global distribution with an interactive map
-
π’ View the top 10 heaviest meteorites
-
π Analyze meteorite landings by year with a line chart
Using Preswald, Shrenik brings planetary science to life with stunning visuals and easy-to-use filtering tools, all powered by Python.
π Code Snippets
Load and Preprocess Meteorite Data
from preswald import text, plotly, connect, get_df, table, slider, query
import pandas as pd
import plotly.express as px
text("# βοΈ Meteorite Landings Analysis")
connect()
df = get_df('Meteorite_Landings_csv')
# Clean and preprocess
df["mass (g)"] = pd.to_numeric(df["mass (g)"], errors="coerce")
df["year"] = pd.to_datetime(df["year"], errors="coerce").dt.year
df = df.dropna(subset=["reclat", "reclong", "mass (g)", "year"])
Filter by Minimum Mass and Plot Locations
min_mass = slider("Select Minimum Meteorite Mass (grams)", min_val=0, max_val=50000, default=1000)
sql_query_filtered = f'SELECT * FROM Meteorite_Landings_csv WHERE "mass (g)" > {min_mass}'
filtered_df = query(sql_query_filtered, "Meteorite_Landings_csv")
fig = px.scatter_geo(
filtered_df,
lat="reclat",
lon="reclong",
size="mass (g)",
color="mass (g)",
hover_name="name",
title="π Meteorite Landings Across the Globe",
projection="natural earth"
)
plotly(fig)
Top 10 Heaviest Meteorites
sql_query_top10 = 'SELECT name, "mass (g)" FROM Meteorite_Landings_csv ORDER BY "mass (g)" DESC LIMIT 10'
top_10_df = query(sql_query_top10, "Meteorite_Landings_csv")
fig_bar = px.bar(
top_10_df,
x="name",
y="mass (g)",
title="π₯ Top 10 Heaviest Meteorites"
)
plotly(fig_bar)
Yearly Trend of Meteorite Landings
sql_query_yearly = "SELECT year, COUNT(*) as count FROM Meteorite_Landings_csv GROUP BY year ORDER BY year"
yearly_df = query(sql_query_yearly, "Meteorite_Landings_csv")
fig_line = px.line(
yearly_df,
x="year",
y="count",
title="π Meteorite Landings Over Time",
markers=True
)
plotly(fig_line)
π Key Insights
-
βοΈ Meteorites have landed all over the globe with variable frequency
-
π Heaviest landings tend to be well-documented and clustered
-
π A rise in observations appears post-20th century
-
βοΈ Most meteorites fall under 10,000g, with a few massive outliers
π What is Preswald?
Preswald is an open-source framework for building data apps, dashboards, and internal tools with just Python. It enables developers to turn any analysis script into a shareable app, with UI components like tables, charts, and forms.
Key Features
-
Visual apps from pure Python code
-
Automatic UI generation and interactivity
-
Simple one-line cloud deployment
-
Real-time filtering with dynamic updates
π Getting Started
Installation
pip install preswald
Start a Project
preswald init my_project
cd my_project
preswald run
Deploy
preswald deploy --target structured
Huge Thanks to Shrenik Borad!
A huge thank you to Shrenik Borad for bringing space science down to Earth with this immersive meteorite dashboard. Check out more of Shrenik's work:
Want to Contribute?
Got a cool idea for a Preswald app? We'd love to see it! Get started here: https://github.com/StructuredLabs/preswald and get featured in our next Community Showcase.
Happy building! π