The Byte Brigade: Saving the Day with Data – Chapter 1

The Fight that Started it all

The shrill ring of the school bell cut through the chatter and laughter on the playground, indicating the end of recess. Sugar grabbed her backpack and joined her friends as they made their way back to class. As they strolled along, they caught sight of a cluster of students encircling someone who seemed different from the others. Intrigued, Sugar and her friends approached the group to investigate.

“What’s going on over there?” Sugar asked, noticing the commotion.

“I don’t know, but it doesn’t look good,” one of her friends replied.

As they got closer, they heard the bullies making fun of a student’s appearance and behavior. Sugar felt a ton of anger and sadness. She knew all too well what it felt like to be different and be teased for it.

“Why are they being so mean?” Sugar asked, her voice shaking with emotion.

“I don’t think they understand,” another friend replied. “They’ve never seen someone like him before.”

Sugar looked at the student being bullied, who seemed to be trying his best to ignore the taunts and insults. She wondered what he was feeling, and wished she could do something to help him.

Suddenly, one of the bullies pushed the student, and in the scuffle that ensued, Sugar’s shirt got torn. She felt a rush of anger and fear, but also a sense of determination.

“This has to stop,” Sugar said to her friends. “We can’t let them treat him like this.”

But as they tried to intervene, the bullies only became more aggressive, pushing and shoving the students. Sugar knew they needed help but wasn’t quite sure what to do at the moment. 

Thankfully, they heard the sound of their PE teacher coming down the hallway and everyone disbursed quickly and started rushing back to their classrooms.

As she walked away from the altercation, Sugar couldn’t shake the feeling of injustice. She couldn’t understand why people would be so mean to someone just because they were different.

During class, Sugar found it hard to concentrate on the lesson. Her mind kept replaying the events of earlier in the day. It wasn’t until her friend Evyn sat down next to her that she was brought back to reality.

“What’s going on?” Evyn asked, noticing the look on Sugar’s face.

Sugar explained what had happened at recess – the student who was being bullied for being different, and how helpless she had felt.

Evyn listened attentively, feeling equally saddened by what had happened. As the class ended, they both collected their books and walked to the next building for their Math class. The heaviness they carried from the earlier incident remained with them, making it hard to focus.

As they walked, Evyn turned to Sugar and said, “Hey, I’ve been thinking. Maybe there’s something we could do to help prevent this kind of thing from happening again in the future. Do you have any ideas?”

Sugar paused, considering the question. “I’m not sure, Evyn,” she admitted. “But I want to do something. What do you suggest?”

Evyn’s eyes lit up. “Well, I’ve been reading about how we can use data to help people understand and accept differences. And, during our Math class, Mr. Lubilock was talking about how Math has applications in almost everything we do. It got me thinking.”

Sugar chuckled. “You want to use Math to solve this bullying problem?”

Evyn laughed too. “No, not exactly. I was thinking of using data and information to figure out a solution to the problem. We could create a survey to learn more about the kinds of differences people have, and then use that information to create educational materials for the school. What do you think?”

Sugar was intrigued. She had never thought about using data in that way before. “That sounds like a great idea,” she said. “Tell me more.”

Evyn went on to explain how data could be used to educate people about different cultures and experiences, and how it could help break down barriers of ignorance and prejudice.

As Sugar listened, she felt a sense of hope. Maybe there was a way to prevent bullying and promote acceptance and understanding. She was excited to learn more about the power of data and what it could do for her community.

For a moment, things felt like they were going to get better. She knew she had to take an active part in making things better…

… to be continued

DISCLAIMER: I used “AI as a Peer” for this post. In other words, the original ideas were created by me, but I used AI to suggest some dramatic elements to the story. I also used “AI as an assistant” for punctuation and grammar. The title of the story was suggested by AI.

Advertisement

How to block annoying ads in your home network and keep your kids safe !!!

If you’re concerned about the privacy and security of your home network, you may want to consider using Pi-Hole. Pi-Hole is a network-wide ad blocker that can prevent ads and tracking scripts from loading on any device that connects to your home network. In addition to improving the performance of your network by reducing the amount of data that needs to be transferred, Pi-Hole can also protect your privacy by blocking requests to known tracking domains.

Let’s start with the benefits

Benefits of Using Pi-Hole

Pi-Hole offers several benefits for home network users:

  1. Block Ads and Tracking Scripts: Pi-Hole can block ads and tracking scripts across your entire network, improving performance and privacy.
  2. Network-wide Protection: Unlike browser-based ad blockers, Pi-Hole can block ads and tracking scripts on any device that connects to your home network.
  3. Improved Network Performance: By blocking ads and tracking scripts, Pi-Hole can reduce the amount of data that needs to be transferred, improving the performance of your network.
  4. Customizable Blocklists: Pi-Hole allows you to customize the blocklists to block additional domains beyond the default ones.

What does it look like?

Here, take a look at my Yahoo Mail page

Before Pi-Hole: and then after Pi-Hole

Here is another example, for the CNN page today

Before Pi-Hole: and then after Pi-Hole

Intrigued how to get it started?

In this blog post series, I’ll walk you through the process of installing and configuring Pi-Hole on your home network.

Once it was done, my web UI, looks something like this

As you can see, the pi-hole has blocked more than 30K ad or unwanted website links at my home network just in the last 24 hours.

Before you begin, you will need

  • A functioning Raspberry Pi
  • Desire to make your home network safe
  • Time

You will need to know

  • Some basic networking knowledge, If you have very limited or no understanding of networking, it’s okay. I will try to outline the steps you need to perform
  • Physical access to our router
  • Access to admin credentials to your router

Installing Pi-Hole

I won’t repeat the good content that is already out there on Pi Hole website. Follow this link to get started. The entire process took less than an hour for me to finish

After the Install

The DNS server setting is something that will NOT automatically change on your devices. So, you can do one of two things:

a) Restart the router so that all devices can get the new configuration, or

b) Wait until the device (like your cellphone) restarts or reconnects to your router. At which point, it will get the new config

More importantly, remember to visit the Pi.Hole webUI so you can monitor the pages that we being blocked. The stock installs already creates a block list. I manually added a few more lists that I found on gitHub to make my ad blocker even more robust. Keep in mind, there are a few pages that might get blocked that you don’t want to block. For example, if you would like WhatsApp to work but only block Facebook and TikTok, you can play around with custom white-lists or black-lists.

Hope this helps. Happy Safe Surfing!!!

How to Solve Rubik’s Cube with your kids

“R U, R U crazy” said my wife to me, the other day.

“R U R U” were the sounds that we all kept hearing all this weekend at our house. Every one was pacing down the floor as we keep avoiding to crash into each other, while saying “R U R U”

Some of us were audibly loud, while the others were doing it in their head. If you are wondering what I am talking about, it’s about solving the Rubik’s Cube. I had recently written about the fact that our household is trying our hands at new things every week, as many of you have. My wife keeps coming up with new ideas every week, whether it was learning to count upto 20 in various languages when washing hands, or practicing tennis strokes in the garage (somehow) OR, like this week, Rubik’s cube.

Going back to “R U R U”, you will soon see that we used the beginner’s method to solve the Rubik’s cube. This method uses a lot of Right face turns (called R) and Upper face turns (called U) etc. When we needed to make the following movements (Right Upper Right Upper), we would say “R U R U” and so on on. Hence, the title.

Saying it out loud actually helped us remember those steps. So, we suggest that you do a lot of “R U R U” as well. It gets funny, and somehow addictive.

Back to the story about learning the solve the Beginner’s way.

Being a geek myself, when I saw that Rubik’s cube was on the list of things to try this week, I got excited about it and starting watching some YouTube videos that tried to explain the concepts to us.

Unfortunately, most of the videos we found online were trying too hard to keep the length of their videos rather short. The downside was that that sometimes, a key concept was not explained in detail, or assumed. The issue in that case is if you are trying to do this with elementary school kids (like mine), it can get frustrating.

But hey, we got time on our hands and after about 2 days of trying our hands at it, we are all Rubik’s Cube solvers.

Wifey, our 5th and 3rd grade daughters and myself have all learnt to do it. We used the beginner’s method to do this and we don’t need any notes to do it anymore. It’s all in our heads. And, we are going to make it easy for you

Kids are enjoying learning more and helping put more online resources to help other kids. So, we also invested the time in making detailed notes and steps to show you the steps so you can learn it easily.

Here are the series of videos you can watch and join us in the Rubik’s Cube Challenge. All you need is a cube, patience and practice. Hope these videos and notes help. Enjoy!!! Happy Cubing!!!

Understanding the Basics
Step 1: Daisy At Top
Step 2: Flower on Bottom
Step 3: Bottom Corners
Step 4: Edge Pieces on Middle Row
Step 5: Flower on Top
Step 6: Align Edge pieces to the Face Color
Step 7: Corner Colors in Place
Step 8: Solve the Top Face

Enjoy and Happy Cubing.

BTW, don’t forget to sign up for our newsletter by adding you email below

Our Data+Kids project continues to move into its 5th week as we learn how to use Tableau to learn about Data

My next post will be about “What does an Algorithm mean to a non techie person?”

Data+Kids: Their First Assignment

It’s amazing how much you can learn when you let others speak a bit more. I know this is something I struggle with; I often find myself dominating so many conversations at work and at home and I am trying to “learn how to listen”. I thought given my kids an assignment with Tableau and explaining what they did might be a great way for me to “learn to listen”… enjoy the videos

About the videos:-

So, after been doing a few things with Tableau, I asked the girls if they would like an assignment on the same. They liked the idea so I sent them a list of questions for each of their topics and asked them to present; “if they were able to get to the answers” and “What did they learn along the way”. As they presented, I definitely learnt a few things along the way. Hope you learn a few things as well.

Lavanya’s Assignment

a) Which singer has the most songs? (you can choose the chart type)

b) Which singer has the highest popularity? (on average across all their songs) (please create a bar graph for this)

c) Which year had the most number of songs with their popularity above 80?

Livienne’s Assignment

a. Create a pie chart showing which manufacturer has lowest sugar on average

b. Show which cereals have the highest level of potassium and lowest level of carbohydrates

c. Which cereal do you the think will be best (in your opinion) when eaten cold?

Again, don’t forget to check out the main project page and follow our blog using the signup below

Best Practices for Dashboard Performance – with the TC20-ish update

  • Do you have a problem with your tableau dashboards loading slowly?
  • But, not sure where you start?
  • What are the things I should try to optimize first?

Here is my talk from Tableau Conference 2019 (TC19) for you to watch. The Tableau Public biz has now been updated with new features from 2020.

And, here is a link to the tableau public Viz. Remember: each tip has a blog supporting the thought process. Click on it to read more

Factors affecting dashboard performance

PERFORMANCE SERIES:

If you wish to get directly to the blog series of the 42 tips, here is the blog series on Performance, where I will take up each of the items above and present my thoughts and experience with Tableau

US Election Results – with Tableau

Enjoy a Tableau visual showing results of all US elections till 2012

Customize Pi-Hole graphs with Tableau

Recently, I wrote this article about installing Pi-Hole on your Raspberry PI to keep your home network safe.

After installing and getting comfortable with the Pi-Hole and looking at all the data, I felt that I wanted to do a bit more with the data that it generates. After exhausting the options available within the Pi-Hole itself, I turned to my favorite Analytics platform, Tableau.

So, how do go I go about connecting Tableau to my Pi-Hole. After going through a bunch of research and implementing my solution, the final solution allows me to play with the data to my heart’s desire.

Have a look here

You can see how many requests from ad colony and google analytics are automatically being blocked. More importantly, I can now use the power of Tableau to identify trends and take action on my pi.hole

High level flow

Here is the high level flow for my process

  1. Connect to the pi.hole database on my raspberry pi
  2. Run a query that creates the data that you need
  3. Upload the data to Google Drive
  4. Connect Tableau to the Google Drive
  5. Create the dashboard against the data

Once I was comfortably with the entire process, I automated the entire process and now I have new files showing up my Google Drive and Tableau connects to the updated data.

Detailed Instructions

Connect to the pi.hole database on my raspberry pi

Command to connect to the sqlite db

sudo pihole-FTL sqlite3 /etc/pihole/pihole-FTL.db

Changing the options while connecting to the db

sudo pihole-FTL sqlite3 /etc/pihole/pihole-FTL.db -header -csv 

Run a query that creates the data that you need.

SQL query that I want to run

Select client.name, queries.*, datetime(timestamp, 'unixepoch', 'localtime') as datetime from queries, \
(select ip, max(id), name from client_by_id group by ip) client where client.ip = queries.client

I want to dump the results into a file, so I will add

> /pihole.queries/results/queries_with_ts_all_data.csv

To run a single command that connects to the DB, runs the SQL query and then exports it to a csv, run this

sudo pihole-FTL sqlite3 /etc/pihole/pihole-FTL.db -header -csv \
"Select client.name, queries.*, datetime(timestamp, 'unixepoch', 'localtime') as datetime from queries, \
(select ip, max(id), name from client_by_id group by ip) client where client.ip = queries.client" \
> /pihole.queries/results/queries_with_ts_all_data.csv

Upload the data to Google Drive

Okay, let’s be clear, if you want to just get all the data from the DB and then connect Tableau to it, you are done. You have the CSV file and Tableau connects to it natively. You can create any dashboard on that data.

CONGRATS!!!

However, if you would like to automate the process every day, you can use rclone to do just that. Here is the process for rlcone configuration

a. Install rclone on your raspberry pi. I believe I used this link for instruction.

b. Set up a new remote drive

rclone config

c. configure the google drive setup using this link

You don’t have to to create your own drive id in this case because I am only uploading files once every week, but if you want more control, you will want to do that using this link. FWIW, I ended up doing that just because I wasn’t sure if I wanted to use the global drive for security reasons

d. Create the command to upload the files


rclone copy -vv --drive-allow-import-name-change --drive-import-formats csv \
/pihole.queries/results/ gdrive:pi-hole

The above command will simply take all the files in the /pihole.queries/results/ directory and upload to a sub-folder that I have create in my google drive called “pi-hole”. Keep in mind, the word “gdrive” is the name of the new remote set that I created in rclone. If you don’t remember what name you gave in step b. above, you can simply type

rclone config 

to see the list of current remotes

Upload the data to Google Drive

Bringing it all together

Now, you can run a cron job that calls a script. The first command in the script will connect to the DB, export the dataset into a csv file and place it a location. The next command in the script will copy the file to Google drive using rclone.

Here is my script

. /pihole.queries/sql/export_daily_data.sql
. /pihole.queries/scripts/upload_daily_file_gdrive.sh

Let’s open both of those steps. the first step above is actually a script with these contents

sudo pihole-FTL sqlite3 /etc/pihole/pihole-FTL.db -header -csv \ "Select client.name, queries.*, datetime(timestamp, 'unixepoch', 'localtime') as datetime from queries, \ (select ip, max(id), name from client_by_id group by ip) client where client.ip = queries.client" \ > /pihole.queries/results/queries_with_ts_all_data.csv

The second step is a script with these contents

rclone copy -vv --drive-allow-import-name-change --drive-import-formats csv \
/pihole.queries/results/ gdrive:pi-hole

This is it, folks !!!. You have now configured your pi.hole to export the data you need and uploaded it to your Google drive so you can have fun with Tableau. The best part is that entire process is automated

CAN’T GET ENOUGH?

okay, you want to do even more or have some questions about this proces like I did.

  • Do I really want to export the entire data from pi.hole every day?
  • How long will that take?
  • Does it impact my pi.hole performance when I run the query?
  • Could I just get the data for one day at a time and upload that incremental data?
  • How big can this data get?
  • Will it affect how much data I am using from my ISP everyday but resending all the older data?

So, here’s where I went even further, I have scripts that are customized to create a new file every day with a date specific name. Here is that command

pihole-FTL sqlite3 /etc/pihole/pihole-FTL.db -header -csv \
"Select client.name, queries.*, \
datetime(timestamp, 'unixepoch', 'localtime') as datetime from queries, \
(select ip, max(id), name from client_by_id group by ip) client \
where client.ip = queries.client \
and strftime('%Y-%m-%d', datetime(timestamp, 'unixepoch', 'localtime')) \
= strftime('%Y-%m-%d', datetime('now', 'localtime', '-1 days'))" \
> /pihole.queries/results/daily/queries_with_ts-"$(date +"%Y-%m-%d").csv"

Conclusion

Benefits of Visualizing Pi-Hole Data with Tableau

Exporting the Pi-Hole data to a CSV file and visualizing it with Tableau can offer several benefits:

  1. Understand Network Traffic: By visualizing the Pi-Hole data in Tableau, you can gain insights into the types of traffic on your network and identify potential security risks.
  2. Monitor Performance: By tracking the amount of traffic and the types of requests being made, you can monitor the performance of your network and identify potential bottlenecks.
  3. Optimize Blocklists: By analyzing the data in Tableau, you can identify additional domains to block and optimize the blocklists to improve performance and privacy.
  4. Customize Visualizations: Tableau provides powerful visualization tools that allow you to create customized dashboards and reports to display the Pi-Hole data in a way that is most useful for you.

Benefits of Using Rclone

Using rclone to automatically upload the CSV file to your Google Drive offers several benefits:

  1. Automatic Backup: By automatically uploading the CSV file to your Google Drive, you can ensure that you always have a backup of the Pi-Hole data.
  2. Easy Sharing: By uploading the CSV file to your Google Drive, you can easily share the data with others or use it in other applications.
  3. Remote Access: By uploading the CSV file to your Google Drive, you can access the data from anywhere with an internet connection.

Helping Your Child Build Healthy Habits for Life


For many parents, part of raising a happy child means focusing on teaching them healthy habits they’ll be able to take with them into adulthood. While it’s a good idea to try to help your children make positive and healthy choices, it can sometimes be difficult to know where to start. 

The best way to start when teaching your child healthy habits is to lead by example. The truth is that your child, no matter how old they are, is watching you and your routines. If you’re doing what you can to live healthy, odds are that your child will emulate these behaviors later on. Here are a few tips on how to help your child build healthy habits through example. 

Create a Healthy Home

Creating a healthy living environment for your child begins with the way you live at home. While encouraging healthy eating, limiting screen time and caffeine, encouraging exercise, and providing social outlets are great places to start, it’s also important to think about the environment your child is living in every day. First, consider the physical space. Is your home clean and free of clutter? Are your relationships healthy and free of toxicity? What about practical things, such as your home’s air quality?

Start by taking a look at the physical space your child is living in and make positive changes. Things as simple as enhancing lighting, using filtered water, and creating a quiet study space can make a big impact. Keeping your kid’s playroom clean helps create a safe, organized, and inviting space to play and encourages positive habits of tidiness in children. Have your children help out by turning cleaning and decluttering into a game. 

Identify Online Mental Wellness Supports

No matter how clean our homes are or how positive the people we allow in them may be, the truth is that most people struggle with mental wellness from time to time. As your child grows, and especially as a teen, having honest conversations with your child about sexual activity and substance use will matter. To do this, some parents find hiring a great therapist helpful in navigating challenging times. 

If your child is struggling with feeling down due to depression, stress, bullying at school, or anxiety, one way to get help is through online therapy. Requiring less effort than in-person counseling, virtual therapy can be a great way to give your child extra support as they navigate any struggles they may be facing.

Finding the right insurance can be a tricky process, especially if you’re a freelancer, but it’s essential in order to get access to healthcare services like therapy. The healthcare exchange is a great place to start when searching for the right health plan; compare plans side-by-side and find one that gives you coverage for your mental health needs, such as therapy sessions and medication. Check out the deductibles and coinsurance requirements, so you’re not hit with unexpected costs down the line. Doing a little research on your options will save you time, money, and stress in the long run.

Make Nutrition and Activity a Priority

As kids grow, they need the right nutrition to be able to keep up in school, work, and play. Starting now to help your child understand the importance of healthy eating can be a gift they take with them into adulthood. Encourage your kids to pick an apple, sandwich, or milk over a bag of candy when possible. Not only will this reduce hunger, but it also will give them the energy they need to get through the day in a productive way. 

Walking is an excellent way to stay active and healthy for both children and adults alike. Not only does it burn calories, but walking also helps to release endorphins that can help keep your mood up. To find great spots for walks, try using Walk Score maps which will show you the nearby parks, trails and outdoor areas in your area that are good for walking. It’s easy to get started – just a few minutes of walking each day can have lasting health benefits for everyone in your family.

Building Healthy Habits for Life

In the end, your child will have a better chance at a healthy future if you lead by example by taking steps like creating a healthy home, walking more often, making nutrition a priority, and finding the right health insurance for your family.

Visit Data Journey for insightful articles and podcasts about data.

— This post was contributed by Amanda Henderson

Amanda Henderson is both a mom to two rambunctious boys and a preschool teacher, so she knows from experience how quickly a situation can become unsafe. She created and writes for Safe Children to educate parents on how to keep their children safe while also having fun.

Generating EVEN MORE Data using Tableau Prep

You just can’t get enough of data. I published this post last month So, some of you reached out and mentioned that the routine I had built was very basic and that you would love a version with some additional dimensions to the data.

Yes, it was very basic indeed. It was fun experiment for a few hours. Having said that, I thought to give the project a few more hours to add some more elements that I would have liked to add. So, I present the v2.0 of the Data Generator routine with Prep.

Again, to understand what we have built here, the videos explaining the generator and how to use it in this post still are relevant.

Just be aware, that we now have additional fields to play with. I have also added instructions directly in the spreadsheet so you know which columns to play with and which ones to leave alone.

Here are the v2.0 files that you will need

  1. Tableau Prep Builder (Download the .tfl file)
  2. Data Input File (Download excel here)
  3. Tableau Desktop (Download .twb here)

Also, some of you also asked for the output file that the Prep flow creates. So, here is that file so you can use the workbook

  • Data Output File (Download excel here)
  • And, here is one of the Sample Dashboards based on this dataset.

    Enjoy and continue to provide feedback and suggestions.