Following up on my previous post about adding humidity data generation to Data Diluvium, I’m now adding temperature data generation. This completes the pair of environmental data generators I needed for my TimeScale DB setup. Temperature data is crucial for time-series analysis and works perfectly alongside the humidity data we just implemented.
Generating Realistic Humidity Data for TimeScale DB with Data Diluvium
For next steps of why I set up TimeScale DB up for local dev, and being able to just do things, I need two new data generators over on Data Diluvium. One for humidity, which will be this post, and one for temperature, which will be next.
Why Humidity Data?
When working with TimeScale DB for time-series data, having realistic environmental data is crucial. I’ve found that humidity is a particularly important parameter that affects everything from agriculture to HVAC systems. Having realistic humidity data is essential for:
- Testing environmental monitoring systems
- Simulating weather conditions
- Developing IoT applications
- Training machine learning models for climate prediction
The Implementation
I created a humidity generator that produces realistic values based on typical Earth conditions. Here’s what I considered:
- Average humidity ranges (typically 30-70% for most inhabited areas)
- Daily variations (higher in the morning, lower in the afternoon)
- Seasonal patterns
- Geographic influences
Setup TimescaleDB with Docker Compose: A Step-by-Step Guide
This tutorial will guide you through setting up and using TimescaleDB using Docker Compose.
Prerequisites
- Docker installed on your system
- Docker Compose installed on your system
Getting Started
-
Start the TimescaleDB Container
Navigate to the directory containing the
docker-compose.ymlfile and run:docker-compose up -dThis will start TimescaleDB in detached mode. The database will be accessible on port 5432.
-
Connection Details
- Host: localhost
- Port: 5432
- Database: timescale
- Username: timescale
- Password: timescale
-
Verify the Installation
You can connect to the database using psql or any PostgreSQL client:
docker exec -it timescale-timescaledb-1 psql -U timescale -d timescaleOnce connected, you can verify TimescaleDB is properly installed:
SELECT default_version, installed_extensions FROM pg_available_extensions WHERE name = 'timescaledb';
Staying in Software Dev? Best be able to just do things!
I sat down recently and started reading through some articles. Of all the articles of the 20 or so I was reading, one that stood out from the bunch was something Geoffrey Huntley wrote. In the article “The future belongs to people who can just do things” he brings up some points that I – and I think a LOT of people out there like Geoffrey and I – have been thinking in the preceding months. Let’s delve into a few of those thoughts, paraphrased, and elaborated on.
- First and foremost, for those coders that have been making a living writing those artisanal, bespoke, hand crafted, single lines of thought out code – your time is nigh.
- Second, if you’re one of those coders that churns out code, but you don’t care or don’t think about the bigger picture of the product you’re working on, you’re also in for a rude awakening.
- Third, if you have your environment or your stack that you build with, and don’t explore much beyond that stack (i.e. you’re specialized in .NET or Java or iOS) and rarely touch anything outside of that singular stack, you’re running straight at a brick wall.
- Fourth, if you’re pedantic about every line of code, every single feature, in a way that doesn’t further progress product but you love to climb up on that hill to die arguing about the state of the code base, you’re going to be left up on the hill to starve to death.
Beyond the developers. If you’re a technical product manager and can’t implement, or coder and can’t product, if you don’t understand the overlap then I’d bet you’ll run into some very serious issues in the coming years. If you’re a manager get ready to mitigate all of the above, and above all get ready to deal with a lot of upheaval. If you still focus on hiring the above focused and inflexible engineers, you’re likely to be falling on that sword for your team. Needless to say, there are very rough waters ahead.
That paints the picture of where the industry is right now and who is at greatest risk. Cast out and unable to realign and move forward with the industry – nay – the world in the coming weeks, months, and years. I’m not even going to mention why, what for, or how we got here. That’s a whole other article. I’m just going to focus on the now and the future.
Continue reading “Staying in Software Dev? Best be able to just do things!”Data Diluvium Utility, Schema, Notes, & Wrap Up
In my previous three posts, I covered the core functionality of DataDiluvium. In this follow-up post, I’ll explore the additional features, utilities, and implementation details that I’ve added to enhance the application’s functionality and developer experience.
SQL Sample Files
1. Sample Schema Repository
I’ve included a collection of sample SQL schemas in the sql-samples directory. These samples serve multiple purposes:
- Documentation examples
- Testing scenarios
- Quick-start templates for users
Here’s an example from the users table:
CREATE TABLE users (
id INT PRIMARY KEY,
username VARCHAR(50) NOT NULL,
email VARCHAR(100) NOT NULL,
created_at DATETIME DEFAULT CURRENT_TIMESTAMP
);
You must be logged in to post a comment.