Monday, August 28, 2023
Today I learned about Marion Stokes' TV archive
Wednesday, August 23, 2023
Chandrayaan-3 landed on the moon
Today, August 23, 2023, ISRO's Chandrayaan-3 lunar exploration mission successfully landed on the moon at 6:04 PM IST (5:34 AM PT). The mission was launched on a Bahubali LVM3-M4 rocket carrying a lander named Vikram and a rover named Pragyan on July 14 this year which I had logged here.
With this landing, India has become the fourth nation to make a soft landing on the moon, after the former Soviet Union, the U.S. and China. It has also become the first country to land on the lunar south pole, which is still an unexplored area.
ISRO's Tweet on the successful landing:
Chandrayaan-3 Mission:
— ISRO (@isro) August 23, 2023
'India,
I reached my destination
and you too!'
: Chandrayaan-3
Chandrayaan-3 has successfully
soft-landed on the moon 🌖!.
Congratulations, India!#Chandrayaan_3#Ch3
Below is the saved live stream of the landing on YouTube. The final phase of the descent starts at 35:13.
ISRO tweeted the first images received from the lander:
Chandrayaan-3 Mission:
— ISRO (@isro) August 23, 2023
Updates:
The communication link is established between the Ch-3 Lander and MOX-ISTRAC, Bengaluru.
Here are the images from the Lander Horizontal Velocity Camera taken during the descent. #Chandrayaan_3#Ch3 pic.twitter.com/ctjpxZmbom
Earlier on November 10, 2009, with the Chandrayaan-1 mission, ISRO made a deliberate crash landing of its Moon Impact Probe (MIP) which helped discover water molecules on the moon.
Saturday, August 19, 2023
Today I Learned: All coal was created around the same time
Photo by Nikolay Kovalenko on Unsplash |
ChatGPT Prompts: A barebones list
Miscellaneous ChatGPT Prompts
Friday, August 18, 2023
Using Python and BeautifulSoup to web scrape Times of India news headlines
According to Wikipedia, "web scraping, web harvesting, or web data extraction is data scraping used for extracting data from websites." In this post, we will create a small program in Python to scrape top headlines from Times of India's news headlines page using the BeautifulSoup library.
Top news headlines |
Particularly, our program will fetch the Times of India Headlines page and extract the prime news headlines on the top of the page. As of this writing, the page displays 6 headlines in that section which we want to scrape. In this screenshot of the webpage, our point of interest is the highlighted section which contains the top 6 headlines.
The programming language we will use is Python 3. Along with that, we will also use the BeautifulSoup 4 package for parsing the HTML. I will assume that you already have a system on which these prerequisites are installed and ready to run. I will also assume that you have a Python editor and compiler to compile and run the program. For the purpose of this illustration, I will use Google Colab to write and execute the python code.
Part 1: Scrape the website
To start with, we will write a simple code that fetches the data and outputs the scraped text in the editors output window. Type the following code in your Python editor. I will explain the code later in this post. A copy of this code is available at my TOITopHeadlines v1.0 repository on Github.
News headlines scraped using Python |
If you have managed to get that working, congratulations. You have scraped the top headlines and now you can use it in your own creative ways. Next, we will delve into what we did and what got us here.
Now, take a look at the portion of the source code that goes through a chain of for loops to crawl into the HTML tags. This exactly corresponds to the way that the markups are structured in the web page. You can take a look at the HTML markups by going to the browser's Developer Tools and inspecting the code behind the UI elements.
Inspecting HTML tag structure |
Your program has to be tuned according to the HTML markup structure of the page that you are trying to scrape.
Part 2: Write the scraped data to a file in Google Drive
Now that our program can successfully scrape the data, in this section, we will take a step forward and write the scraped data into a JSON file in Google Drive. We will continue to use Google Colab to run the program.
For this we will mount a root folder in Google Drive and create a folder to store our files. We use a list of dictionaries and then use Python's JSON library to write the list to a JSON file. A copy of this code is available at my TOITopHeadlines v2.0 repository on Github.
Executing the code in Google Colab will display a prompt to connect to Google Drive and then take you through a series of pages to authenticate using your Google id. Once you are past the authentication the code should execute and create a JSON file in the folder path that you chose in the program. Below you can see how a list of files would look like.
In Conclusion
A word of caution on using the web scraping method is that while many websites don't mind, there are many who don't like it. It is best to go through their terms of service to understand the limitations they apply to what you can do with the data and ensure that you are not in violation. Another important point to remember is that many websites periodically change their look and feel hence modifying the structure of the HTML. On the face of such changes, your web scraping logic may fall flat, hence web scrapers need continuous maintenance. A better way to capture and harvest such data is to use APIs published by the web sites. This demonstration is for academic purposes only.
Happy scraping!
Monday, August 14, 2023
Ohio Electricity Litigation Settlement Distribution Payouts
Customers of First Energy Ohio today received an email with the subject Ohio Electricity Litigation: Your Digital Payment is Ready stating the distribution of settlement fund against Smith v. FirstEnergy Corp., et al., Case No. 2:20-cv-3755.
For a background, this is based out of two class action lawsuits against FirstEnergy and Energy Harbor, alleging that they engaged in a bribery scheme to pass a law that increased electricity rates for some Ohio residents. The lawsuits have reached a settlement of $49 million for the affected customers. Customers who have paid any rates or fees under Ohio House Bill 6 ("HB 6") from January 1, 2020 to June 22, 2022 to Toledo Edison, Cleveland Electric, or Ohio Edison, may be eligible for a payment out of this settlement.
The official website for the class action lawsuit is here.
Below is the text of the email.
Ohio Electricity Litigation settlement distribution email |
Getting the payment involves clicking on a button to receive a Virtual Prepaid Mastercard which can be added to your preferred digital wallet (Google Pay, Apple Pay, and Samsung Pay).
Virtual Prepaid Mastercard |
Saturday, August 12, 2023
Data Visualization using Sankey diagrams
Sankey diagrams are a great way of visualizing the flow of data, where the width of each flow is based on its quantity or relative weight. Like a picture that speaks more than a thousand words, a Sankey diagram speaks more than a thousand pie charts. Perfect use cases of these diagrams are to visualize the flow of materials and money, but there is no limit on how creatively they can be used.
Here is a sample Sankey that shows the vacation budget flowing into different heads.
Sankey diagram for a vacation budget |
Sankey diagram for a monthly budget |
The example below shows inflation-adjusted revenue from music sales based on media format from 1973 till 2019. Data source RIAA.
Sankey diagram for music revenue based on media type sales |
SankeyDiagram.net
Sample at SankeyDiagram.net |
SankeyMATIC.com
Sample at SankeyMATIC |
Sankey Diagram Generator by Dénes Csala
Sample at Sankey Diagram Generator |
Sankey using Google Charts
Sample at Google Charts |
The simple Sankey diagram below was made with Google Charts and depicts the top 10 Wikipedia pages and their source based on page views for the year 2022. Hover your mouse pointer, or tap, over the nodes and flows to see the data. [Data source: Wikipedia] [static image sample]
The Sankey diagram below, which was made with Google Charts, shows UK studio albums released by The Beatles grouped into genres. [Data source: Wikipedia] [static image sample]
You will come across many other tools to create Sankey diagrams. The ones I chose to write about here are the ones that are freely accessible and fairly easy to use. Sankey diagrams can be used to depict much more complex scenarios of data or materials flow. If you have a comment, please drop it in the comments section below.
Today I Learned about the Peter principle
Tuesday, August 8, 2023
Sling TV Rapidly Losing Subscribers
Saturday, August 5, 2023
Music I am listening to in 2023
Here is a quick log of the music albums that I have been listening to this year.
- 4 Pieces: A Tribute to Ludovico Einaudi / Jacob's Piano
- ÷ (Deluxe) / Ed Sheeran
- A Scandinavian Thing / Peter Sandberg
- Ain't No Mountain High Enough / Mark Maxwell
- All the Little Lights (Deluxe Version) / Passenger
- Anthology / Grover Washington, Jr.
- Appetite For Destruction / Guns N' Roses
- Bar Jazz Masterpieces / New York Jazz Lounge
- Blue Train (Expanded Edition) / John Coltrane
- Breezin' / George Benson
- Bright Future / Peder B. Helland
- Chet Baker In Tokyo (The Complete Concert) / Chet Baker
- Coltrane's Sound / John Coltrane
- Dance of Life / Peder B. Helland
- Dark Night of the Soul / Philip Wesley
- Delirium (Deluxe) / Ellie Goulding
- El Paraiso Músical / Geova Eucarin
- Feels So Good / Chuck Mangione
- Funky Jazz Masterpieces, Vol. 3 / New York Jazz Lounge
- Homecoming / David Hazeltine
- I Put A Spell On You / Nina Simone
- Idle Moments / Grant Green
- It Might As Well Be Swing / Frank Sinatra
- Jazz - Instrumental Pop Jazz / Smooth Jazz Sax Instrumentals
- JORDI (Deluxe) / Maroon 5
- Kabir Singh / Various Artists
- Kind Of Blue (Legacy Edition) / Miles Davis
- Love In The Future (Deluxe Edition) / John Legend
- Method in the Madness / Nocturnal Spirits
- Moanin' (Expanded Edition) / Art Blakey and the Jazz Messengers
- MTV Unplugged In New York / Nirvana
- My Brazilian Heart / Joyce Partise
- My One and Only Love / David Ehrlin & Razz T
- Nostalgia / Annie Lennox
- Nothing But The Best / Frank Sinatra
- On Golden Pond - Relaxing Piano / Relaxing Piano
- Only Human (Deluxe) / Calum Scott
- Rainy Days / Peder B. Helland
- Rang De Basanti (Original Motion Picture Soundtrack) / A.R. Rahman
- Rising Son / Takuya Kuroda
- Say Something / A Great Big World & Christina Aguilera
- Shape of You / Ed Sheeran
- Standing By / Ben E King
- Sunny Mornings / Peder B. Helland
- Takin' Off (Expanded Edition) / Herbie Hancock
- The Best - Reminiscent 10th Anniversary / Yiruma
- The Best of Soul, R&B, Smooth Jazz / Denise King & Massimo Faraò Trio
- The Light of Day / James 'PJ' Spraggins
- The Nova Collection, Vol. 1 / Nova
- The Situation Five to Nine / Stevo Rap Guru
- Time Out / The Dave Brubeck Quartet
- Trilogy: Past, Present & Future / Frank Sinatra
- Triple W / ThaMac10
- You Are Not Alone / Kim Waters
- Winelight / Grover Washington, Jr.
- Shree Hanuman Chalisa / Lata Mangeshkar
- Simple Pleasures / Bobby McFerrin
- Somethin' Else (Rudy Van Gelder Edition) / Cannonball Adderley
- Sunny Mornings / Peder B. Helland
- x (Deluxe Edition) / Ed Sheeran
Friday, August 4, 2023
X taking away Twitter handles
Thursday, August 3, 2023
Sweet Home 3D for Home Interior Design
I have played around with this application on several occasions since 2013 and it has always been an interesting experience with its ease of use. The application lets you import a floor plan which helps as a guide to draw a 2D plan of the walls and rooms after which you can start adding elements like furniture and appliances. Side-by-side, the plan can be previewed in 3D with all the object that you put in there.
The application provides two points of view to preview the design: the top point of view in which you can view the house from above and the human observer point of view which lets you render a realistic view of the interiors.
Sweet Home 3D can be installed on a Windows, macOS or a Linux computer. It can also be used online with a supported browser.
Here I am putting out some simple illustrations of the design capabilities that this application has to demonstrate the look and feel of the online version of the application. Remember that it can create very simple to very complex floor plans including plans that consists of multiple floors.
Set 1
Set 2
The application is located here at sweethome3d.com.
The development project is located here at SourceForge.