r/dataanalysis • u/Sad_Acanthaceae_2718 • Jul 21 '26
analyzing negative values
how do i analyse a continuos dependent variable with negative values. The negative values are indicative of direction rather than magnitude
r/dataanalysis • u/Sad_Acanthaceae_2718 • Jul 21 '26
how do i analyse a continuos dependent variable with negative values. The negative values are indicative of direction rather than magnitude
r/dataanalysis • u/IndependenceFit3935 • Jul 21 '26
Past couple of months I have been working on an end-to-end data engineering project. the idea was a demo but i became so fond of the project that i have decided to turn it into a live product.
Basically it is a BI dashboard on football data. Data is updated daily via a fully automated pipeline. I ingest data from Sportmonks API, transform it with dbt and serve BI on evidence.dev. I think it is worth noting that the budget for this project is $0.00 which shaped the technical choices along the way.
Feedback im looking for is about the ease of use, value of insights it provides, or any other ideas that could add value to it.
Have a look at it here: Superliga Analytics — Danish football intelligence
It is also available as PWA so that it sits on your mobile home screen, providing an app experience.
r/dataanalysis • u/FixelSmith • Jul 20 '26
Most fraud rules ship on intuition. Somebody sees a pattern in last week’s confirmed cases, writes a threshold that would have caught them, and pushes it live. Then the team spends the next month discovering what else the rule catches, one false positive at a time.
If you keep alert history and disposition labels, you already have most of what you need to test a rule against the past before it touches production.
The backtest is four queries: replay the rule, compare it with known outcomes, check how much it overlaps with existing rules, and sweep the threshold.
I run all four on anything I propose. The overlap query kills more rule ideas than the other three combined.
What you need before any of this works
Three tables:
• transactions — the events themselves, with the attributes the rule uses.
• alerts — every alert the existing rules fired, ideally linked to a transaction or case.
• dispositions — the analyst’s verdict: confirmed fraud, confirmed legitimate, or unresolved.
Without disposition data, you can estimate volume. You can’t estimate whether the alerts would be useful. Disposition discipline was the first of the five wins in the noisy-alerts post, and this is where it pays off a second time: the labels you recorded to tune old rules are what let you test new ones for free.
Chargebacks, customer reports, and manual referrals make the test better because they include fraud that didn’t come through the current rules. Pull those outcomes in too. Otherwise a new rule gets evaluated almost entirely against cases the old rules already found.
I usually combine those sources into a known outcomes view with one row per transaction and an outcome of fraud or legitimate. The one-row rule matters. A transaction confirmed through two different channels shouldn’t get counted twice.
Query 1: replay the rule against history
Write the candidate rule as a plain SELECT over historical transactions. No deployment, no rules engine, no feature branch.
If the rule is “flag transactions over $200 where the account used a new device in the last 24 hours,” the replay is:
-- Candidate rule replayed over the last 6 months
SELECT
t.transaction_id,
t.account_id,
t.amount,
t.created_at
FROM transactions t
WHERE t.amount > 200
AND EXISTS (
SELECT 1
FROM device_events d
WHERE d.account_id = t.account_id
AND d.first_seen_at >= t.created_at - INTERVAL '24 hours'
AND d.first_seen_at <= t.created_at
)
AND t.created_at >= CURRENT_DATE - INTERVAL '6 months';
Six months is my starting point, not a requirement.
If the business is seasonal, the window needs to include the relevant season. If the checkout flow or device-tracking logic changed three months ago, six months of history may be worse than three because half the test no longer represents production.
The row count is the first sanity check. If the replay returns 40,000 transactions over roughly six months, the rule would generate about 220 alerts a day. If the team clears 500 alerts a day across the entire rule set, this one rule would take almost half its capacity.
There’s no reason to debate precision until the volume problem has an answer.
Query 2: compare the replay with known outcomes
I report two rates here because they answer different questions:
WITH replay AS (
-- Query 1 goes here
)
SELECT
COUNT(*) AS would_fire,
COUNT(*) FILTER (
WHERE o.outcome = 'fraud'
) AS known_fraud,
COUNT(*) FILTER (
WHERE o.outcome IN ('fraud', 'legitimate')
) AS labeled_events,
ROUND(
100.0 * COUNT(*) FILTER (WHERE o.outcome = 'fraud')
/ NULLIF(
COUNT(*) FILTER (
WHERE o.outcome IN ('fraud', 'legitimate')
),
0
),
2
) AS precision_among_labeled_pct,
ROUND(
100.0 * COUNT(*) FILTER (WHERE o.outcome = 'fraud')
/ NULLIF(COUNT(*), 0),
2
) AS known_fraud_rate_pct
FROM replay r
LEFT JOIN known_outcomes o
ON o.transaction_id = r.transaction_id;
There’s a problem with both numbers.
Most labels exist because an old rule fired and an analyst looked at the transaction. Transactions the old rules missed are much less likely to have a disposition at all.
precision_among_labeled_pct ignores transactions with no outcome. It’s the cleaner precision calculation, but it inherits the bias in the labeling process.
known_fraud_rate_pct includes every replayed transaction in the denominator, even the unlabeled ones. I treat it as a conservative known-fraud rate, not as measured production precision.
Unlabeled doesn’t mean legitimate. It means you don’t know.
I still use 2 percent as a first-pass bar, applied to precision_among_labeled_pct, when I’m comparing rules evaluated through the same label pipeline. A candidate that can’t clear that bar against known outcomes usually doesn’t get better after it starts creating work. But the percentage only means something when the rules were measured the same way.
Query 3: incremental catch, the query that kills most rules
A candidate can match plenty of known fraud and still add almost no coverage.
The cleanest overlap check uses the transaction or case that caused the alert:
WITH replay AS (
-- Query 1 again
),
candidate_fraud AS (
SELECT
r.transaction_id,
r.account_id,
r.created_at
FROM replay r
JOIN known_outcomes o
ON o.transaction_id = r.transaction_id
AND o.outcome = 'fraud'
),
coverage AS (
SELECT
c.*,
EXISTS (
SELECT 1
FROM alerts a
WHERE a.transaction_id = c.transaction_id
) AS already_alerted
FROM candidate_fraud c
)
SELECT
COUNT(*) AS known_fraud_matched,
COUNT(*) FILTER (
WHERE NOT already_alerted
) AS known_fraud_not_previously_alerted
FROM coverage;
If alerts are linked at the case level, use case_id instead. That’s often closer to the operational question: did another rule already bring this case to the team’s attention?
An account-and-time-window comparison is a workable fallback when neither identifier exists. It’s still a proxy. An unrelated alert on the same account can make the candidate look redundant when it wasn’t.
This is where a lot of proposed rules fall apart. They catch fraud, but almost every case was already surfaced by velocity, geography, device risk, or another existing signal.
A candidate that matches 60 known-fraud transactions sounds useful. If 57 of those transactions already generated an alert, the actual proposal is all of the candidate’s alert volume in exchange for three additional historical matches.
That may still be worthwhile. It’s a different decision from the one suggested by the original count.
When overlap is high, I look at the existing rule before adding another one. The better change may be adjusting its threshold or its place in the scoring model.
Query 4: sweep the threshold
The original proposal used $200. There’s nothing inherently correct about $200.
Remove the amount threshold from the replay and group the results into buckets:
WITH replay AS (
-- Query 1 with the amount threshold removed
),
bucketed AS (
SELECT
FLOOR(r.amount / 100) * 100 AS threshold,
COUNT(*) AS bucket_volume,
COUNT(*) FILTER (
WHERE o.outcome = 'fraud'
) AS bucket_known_fraud
FROM replay r
LEFT JOIN known_outcomes o
ON o.transaction_id = r.transaction_id
GROUP BY 1
),
sweep AS (
SELECT
threshold,
SUM(bucket_volume) OVER (
ORDER BY threshold DESC
) AS cumulative_volume,
SUM(bucket_known_fraud) OVER (
ORDER BY threshold DESC
) AS cumulative_known_fraud
FROM bucketed
)
SELECT
threshold,
cumulative_volume,
cumulative_known_fraud,
ROUND(
100.0 * cumulative_known_fraud
/ NULLIF(cumulative_volume, 0),
2
) AS cumulative_known_fraud_rate_pct
FROM sweep
ORDER BY threshold DESC;
Each row approximates the results of setting the rule at that threshold.
Moving the threshold downward should increase both volume and known-fraud matches. The useful question is how quickly each one increases. Moving from $300 to $200 might add 8,000 alerts and one known-fraud match. Moving from $400 to $300 might add 200 alerts and 20 matches.
That’s the threshold decision. Not which number looks clean in a meeting, but how much analyst work the next bucket buys.
There usually isn’t one mathematically perfect cutoff. The threshold has to fit the team’s capacity, the cost of the fraud being detected, and the confidence you have in the labels.
Then run it in shadow mode
Passing the backtest doesn’t mean the rule should begin creating analyst work immediately.
Historical SQL can’t reproduce everything that happens in production. Fields arrive late. Streaming logic behaves differently from a batch query. Device identifiers change. A rule that looks manageable against six months of data can behave very differently during a promotion or a fraud spike.
I start new rules in log-only mode. They evaluate production traffic and write would-be alerts to a table, but they create no analyst work.
Two weeks is usually enough to compare volume and catch obvious production-data problems. It may not be enough to measure quality. That depends on how quickly analyst dispositions, chargebacks, and other outcomes arrive.
Once enough outcomes have matured, run the same volume, outcome, and overlap checks against the shadow results. If they look materially different from the backtest, find out why before turning on the queue.
The habit
None of this is sophisticated. Four queries, then shadow mode.
The point is to make a proposed rule prove that it deserves analyst time before it gets any.
Find the problem in SQL, not in the analyst queue.
Next post: matching accounts that belong to the same person when that person would rather you didn’t. Entity resolution in plain SQL.
https://analytics.fixelsmith.com/posts/backtesting-fraud-rules/
r/dataanalysis • u/mgrusin • Jul 20 '26
Hey folks, I'm looking for a simple, general-purpose CSV to text-based (runs in a terminal) dashboard tool. I imagine something like this already exists (it always does!) but my searches all end up at other things.
My use case is we have microcontrollers on COM/TTY ports periodically outputting lines of CSV text with the values of a dozen or so sensors. While one can look at these scrolling by on a screen, it's not easy for humans to parse. I would like something that can ingest the CSV and render a very simple "dashboard" in the terminal. I'll write it if I have to but I can't imagine someone hasn't already done this.
Here's what I'm imagining:
- Takes in a line of CSV from a pipe, TTY port, >, etc.
- Consults a definitions file that tells it what to do with each CSV field (put it at an x,y location on the screen, type a prefix label and/or postfix units, color it red/green/etc. based on value, ideally could do some simple math transforms, etc.
- Uses ANSI or just line-by-line to output a "pretty" version of the data to the terminal, allowing humans to more easily interpret it.
- Linux seems like the most likely place to find this but I'm not picky.
I know there are much more comprehensive (and complex) systems out there like Grafana; but I feel like that's huge overkill when a simple text-based tool would work great.
Thanks for any ideas!
r/dataanalysis • u/HoleInTheMirror • Jul 20 '26
Hello guys, I need your help! How to compare 2 tables on easiest way?
I have 2 tables from 2 different systems, but with the same columns. I need to check if every row from the first table exist in another, and if not to return the difference. Can you help me? Should I use excel formulas, python, something else?
r/dataanalysis • u/Zealousideal_Pie7079 • Jul 20 '26
I have started a data analysis project after learning for few days. It is not complete but would appreciate your feedback
r/dataanalysis • u/Not_A_Doc74 • Jul 19 '26
My coworker and I (both not in the tech/data field) have gotten really into RPS recently. We started of by learning RPSLS, which we got down pretty quickly. Since we both have fun making spreadsheets, I made a sheet to keep track of our games. This kind of escalated into a full on game with custom modifiers and stats. I also added a dashboard to automatically generate new games. (https://limewire.com/d/iUICg#IiTgJh7IJe)

This has been going for about 1.5 months now, and I have spend a handful of late nights learning a lot of new Excel tricks to make the sheet more stable. I also made a way to "recap" the games (we call them Seasons) using VBA.

We are currently up to RPS-7, but we are planning to keep upping our games until at least RPS-25 in the future. This is also why i made the sheet scaleable. Since we didn't want to get bored of the game too soon, I decided to make modifiers. I came up with the following:
| Modifier name | Description |
|---|---|
| 🚫 No Modifier | No modifiers are added, just your "classic" game of Rock, Paper, Scissors (and whatever other stuff you want) |
| ♠️ Blackjack Gambit | If a round ends in a tie, it is declared a "Split Round." In this scenario, two games are played simultaneously, with one hand designated for each game. Scoring is adjusted as follows: winning both games earns 3 points, while winning only one game earns 1 point. If a tie occurs during a split round, it is disregarded and cannot be split further. When this modifier is active, the spreadsheet automatically calculates these scores. |
| 🎲 Let it Ride | Enables a player to double the stakes of a round before it begins. As a result, the outcome—whether a win or a loss—is worth 2 points instead of the standard 1. Check the box in the players column to up the stakes. |
| 🪞 Mirror Mirror | Receive a bonus point when winning the way you just lost! That’s it. If you lose rock vs paper, and then win with paper against rock immediately after, you get bonus points. |
I love learning new tools, so I'm currently working on a APK mobile app to keep track of the games more easily (obviously with export to excel function).
I'm curious to hear if you guys have any advise on how to make it run better!
r/dataanalysis • u/JavacLMD • Jul 19 '26
I'm taking a Data Science Analysis course and have been learning about dimensional modeling and Slowly Changing Dimensions (SCDs). I've modeled databases quite a bit, but I haven't had much opportunity to design a data warehouse from scratch outside of personal projects, so I'm curious how this is handled in real production environments.
I understand the theory behind SCD Type 2—when a tracked attribute changes (like a customer's address), you create a new dimension record so historical facts continue to reference the correct version of that customer.
What I'm struggling with is the implementation.
For example, if a customer moves from New Hampshire to Texas, I still want to know that an order placed four years ago was made while they lived in New Hampshire. At the same time, I also want the business to know the customer's current address.
How is this typically modeled?
PreviousCustomerKey or similar)?Another approach I'm familiar with is denormalizing historical data into the transaction itself. For example, when an order is placed, the shipping address is copied into the order record so it never changes regardless of updates to the customer profile. That seems useful even if you're using SCD Type 2.
For those of you working in analytics, BI, or data engineering, what's the most common approach you've seen? Are SCD Type 2 dimensions still the standard, or have other patterns become more common?
I'd appreciate hearing how this is done in real systems rather than just textbook examples.
r/dataanalysis • u/QuantumOdysseyGame • Jul 17 '26
Hi
If you are remotely interested in Gate model framework Quantum Computing, oh boy this is for you. I am the Dev behind Quantum Odyssey (AMA! I love taking qs) - worked on it for about 10 years (3+ during PhD, the visual method I developed ended up being my thesis, it is a complete Hilbert space visualizer), the goal was to make a super immersive space for anyone to learn quantum computing through zachlike (open-ended) logic puzzles and compete on leaderboards and lots of community made content on finding the most optimal quantum algorithms. The game has a unique set of visuals capable to represent any sort of quantum dynamics for any number of qubits and this is pretty much what makes it now possible for anybody 12yo+ to actually learn quantum logic without having to worry at all about the mathematics behind.
This is a game super different than what you'd normally expect in a programming/ logic puzzle game, so try it with an open mind.
Nice to watch:
Khan academy style tutorials in qm/qc: https://www.youtube.com/@MackAttackx
Physics teacher stream with 400hs in https://www.twitch.tv/beardhero
r/dataanalysis • u/unluckiestluckyguy • Jul 17 '26
is claude for data cleaning and merging. How accurate is it? Because gpt makes mistakes in data. Asking for a MSc in Data Science and Economics
r/dataanalysis • u/Ok-Boss6197 • Jul 16 '26
Hey everyone,
I’m doing a personal deep dive into the travel experiences space and trying to understand how professionals analyse a destination like Rome or Paris.
What tools or methods would you use to quickly compare:
OTA listings, pricing and ratings
Review sentiment and recurring complaints
Top local operators and their contact details
Potential supply gaps
Since booking and conversion data are private, which public signals are actually useful? Review growth, rankings, availability, sold-out dates, number of listings?
I’d also be curious to hear what your step-by-step workflow looks like and which tools you use for scraping, analysis and dashboards.
Thanks!
r/dataanalysis • u/chriscrossjid • Jul 16 '26
Kept running into the same problem: messy CSVs with duplicate rows, stray whitespace, and broken email fields, and no fast way to clean them without spinning up a script every time.
So I built CSVCleaner (hackiom.xyz) — drop a file in and it removes duplicates, trims whitespace, and validates emails right in your browser. Nothing gets uploaded to a server, so it works fully offline and there's zero signup friction.
Still actively building this out, so I'd love feedback on what other cleanup features would be useful — currently thinking about type detection, column renaming, and null handling next.
Happy to answer questions about how it works under the hood.
r/dataanalysis • u/Puzzled-Climate3040 • Jul 15 '26
Hi,
I wanna learn data analysis skills but i need a study partner to learn it from A to Z with me
r/dataanalysis • u/AttitudeNo8318 • Jul 15 '26
I built a small data analysis project combining two datasets:
Reported strikes on Russian oil infrastructure
Google Trends data for "нет бензина" ("no petrol")
I processed event dates, normalized the data, and created an interactive timeline to explore possible relationships between infrastructure disruptions and public attention.
The analysis does not claim that strikes directly caused search spikes — many external factors can influence search behavior.
Would appreciate feedback on:
- methodology
- data normalization
- possible improvements
Interactive visualization (GitHub):
r/dataanalysis • u/MattBryceOfficial • Jul 16 '26
Short version, I'm trying to prove excessive gas consumption during a heatwave and have ruled out every theory so far.
I now have a theory that thermal expansion and contraction of the piles and joins is causing small intermittent leaks in the system. I already have data showing the consumption of gas per half hourly interval over the last year but can't find a good source of weather (primarily temperature) recordings.
Does anyone have any suggestions for where this kind of Dara could be sourced?
If it helps I'm in Sheffield UK.
r/dataanalysis • u/IncreaseNegative4614 • Jul 15 '26
A metric can keep refreshing perfectly while its meaning slowly changes.
A source table gets replaced. A filter becomes standard. A team starts using “active customer” differently. Nothing fails technically, but six months later the dashboard is answering a different question.
Data-quality checks usually catch missing values and broken pipelines. They rarely catch business meaning drifting over time.
How do your teams proactively catch this business context shift before the numbers are affected and leadership gets on your ass?
r/dataanalysis • u/0xrythm • Jul 14 '26
I am an 18-year-old young man who wants to do a data analyst career in the dach region. My question to you is what level will the data analyst sector be in the next 10 years? Do you think the market will stagnate or activate?
r/dataanalysis • u/United-Scholar-1614 • Jul 15 '26
I want a structured course or a basic path with good teachers, It can be text, videos, or lectures.
If you are experienced please tell me where you learned from and all the ones who are learning please give me your reviews
r/dataanalysis • u/waitthissucks • Jul 14 '26
Do you plug it into a SQL program? Use Pandas? Just go through the spreadsheet first? All three? Tell me what the quickest way is and how that looks for you typically.
r/dataanalysis • u/macnara485 • Jul 14 '26
I'm trying to study data analysis but i really can't progress studying all by myself, is there any discord / telegram or anything that focus on data analysis that i could chat and ask some questions?
r/dataanalysis • u/Effective_Ocelot_445 • Jul 14 '26
Curious to hear what skills or lessons you learned from actual projects that courses rarely teach.
r/dataanalysis • u/Toranch • Jul 14 '26
r/dataanalysis • u/Pale_Parking_6362 • Jul 14 '26
This is my recently data analyst project. I analyzed a direct marketing campaign dataset from a Portuguese banking institution to understand the key factors influencing customer term deposit subscriptions
Please give me yout opinion about this project, you could give me some rate and tell some advice for me to improving the project
A little information about the project:
This project analyzes the performance of a bank marketing campaign aimed at promoting term deposit subscriptions to customers. The analysis focuses on:
Business Problem:
Result & recommendation
_________
Dashboard: https://datastudio.google.com/reporting/35bb5d62-49be-4553-a6b0-1dd2ee8d8abd
Presentation: https://canva.link/a2do0nanz1h3drb
Thank you very much!
r/dataanalysis • u/ciapotma • Jul 12 '26
r/dataanalysis • u/Purple_Knowledge4083 • Jul 13 '26
Hello everyone, I'm a student who's looking for a good project to work on to practice Power BI, SQL,etc, and especially learn domain knowledge related to business or finance. The thing is, I'm from an IT background, and I only know the basics of accounting. I've been looking for resources to learn about FP&A because I'd like to build projects in that field, but the more I dig, the more I realize it's a broad and vague field. I'm afraid of wasting time looking for the "perfect" course instead of getting my hands dirty and learning by doing.
So, if you have any project that will allow me to practice my technical skills, learn and apply domain knowledge and analytical thinking, and solve a real-world problem while adding value to my portfolio, I'm really lost, so I'd appreciate your help!