source: kdnuggets: mocking a year of iot sensor time series data with mimesis
level: technical
this guide shows how to create a full year of fake iot temperature data. the method uses mimesis for synthetic data, pandas for the timeline, and numpy for math. it starts by making a fake device profile with an id, location, firmware version, and ip address. then it builds a sine wave equation to mimic seasonal temperature changes. the equation includes a base temperature, amplitude, phase shift, and random noise. the noise comes from mimesis and makes the data look real, not a perfect curve.
the process loops through 365 days starting january 1, 2026. for each day, it calculates a seasonal temperature from the sine function. it adds sensor noise between -2.0 and 2.0 degrees using mimesis. it also generates a random network latency value per day. all readings are stored in a pandas dataframe with timestamps, device id, location, temperature, and latency. the output shows winter temperatures around 3-5°c and summer temperatures around 26-29°c. a plot of the data reveals a clear seasonal wave with daily fluctuations.
the final dataset can be used for testing forecasting models or dashboards. it includes realistic metadata and noise to simulate real sensor behavior. the approach is flexible and can be adapted to other iot scenarios. the code is simple and relies on open-source libraries. this makes it easy to replicate or extend for different projects.
why it matters: synthetic iot data with realistic patterns helps test models and dashboards without needing real sensor hardware.
source: kdnuggets: mocking a year of iot sensor time series data with mimesis