explaingit

schollz/howmanypeoplearearound

7,061PythonAudience · developerComplexity · 2/5LicenseSetup · moderate

TLDR

A Python command-line tool that estimates how many people are physically nearby by counting smartphones detected via WiFi probe requests, the signals phones broadcast when searching for known networks.

Mindmap

mindmap
  root((howmanypeoplearearound))
    How it works
      WiFi probe requests
      Device counting
      Signal strength filter
    Requirements
      Monitor mode adapter
      tshark installed
    Use cases
      Foot traffic monitoring
      Home presence detection
      Crowd logging
    Output
      Terminal count
      JSON export
      Browser chart
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Monitor foot traffic at a home or small venue using a Raspberry Pi running in the background

USE CASE 2

Check whether roommates or people are in a shared space without asking

USE CASE 3

Log crowd level data over time and visualize how foot traffic changes throughout the day

Tech stack

PythontsharkWireshark

Getting it running

Difficulty · moderate Time to first run · 30min

Requires a WiFi adapter that supports monitor mode (most built-in laptop cards do not) and tshark installed separately.

MIT License, use freely for any purpose, including commercial use, as long as you keep the copyright notice.

In plain English

This Python tool estimates how many people are physically nearby by counting smartphones detected over WiFi. It works by listening for WiFi probe requests, which are short signals that phones automatically broadcast when searching for known networks to connect to. By counting the distinct devices sending those signals, the tool produces a rough estimate of how many people with smartphones are in the vicinity. Since most people carry a smartphone, this acts as a practical proxy for crowd size. The README opens with a clear legal warning: intercepting WiFi signals from networks you do not own may be illegal depending on your country. In the United States it may violate federal wiretapping law, and the repository links to a discussion thread about the legal risks. This is a tool for monitoring your own space, not public networks. To run it you need a WiFi adapter that supports monitor mode, a special capability that most built-in laptop cards do not have but inexpensive USB adapters do. The README lists specific adapter models and chipsets that are known to work. You also need tshark installed, which is the command-line version of Wireshark, a standard network analysis tool. Installation is a single pip command. Once running, you type one command in a terminal, wait for the scan period to complete, and get a number printed back: something like "There are about 3 people around." Options let you set the scan duration, restrict the count to only nearby devices based on signal strength, output the raw data as a JSON file, or loop the scan indefinitely. If you collect data over time with the loop option, the tool can render a simple browser-based chart showing how crowd levels changed throughout the day. Practical use cases mentioned in the README include tracking foot traffic at home with a Raspberry Pi or checking whether roommates are in. The tool is licensed under MIT.

Copy-paste prompts

Prompt 1
Using howmanypeoplearearound, write a Python script that scans every 5 minutes and logs the estimated crowd count with a timestamp to a CSV file.
Prompt 2
Set up howmanypeoplearearound on a Raspberry Pi to continuously monitor foot traffic and generate a daily chart showing crowd levels over time.
Prompt 3
How do I configure howmanypeoplearearound to only count devices with strong WiFi signal, filtering out people passing by outside?
Open on GitHub → Explain another repo

← schollz on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.