Categories
Data Visualization

Coronavirus Outbreak Map

The Coronavirus is ravaging the world and the team at StatiSense would put up a map on Twitter showing nations where the virus has been confirmed.

I decided to take a different tack when I created the map from theirs.

I put China in the middle and made the rest of the map interactive. You can check out the map below by placing your mouse on it or tapping it if you are on a mobile device.

 

The above map is an example of Scalable Vector Graphics (SVG). After satisfying my intellectual curiosity that I can create it, I won’t be updating the map

These are scary times to be alive. I have no wish to cause more despair.

Categories
Uncategorized

What Does Greater Lagos Mean?

I had planned to criticize this administration last year. I probably would have not started today. But this happened.

At such moments in the final words of the immortal Ken Saro-Wiwa, “Silence Would be Treason”.

Like him, I am from the Niger Delta. Unlike him, I am an Esan man from Edo State in Nigeria.

However, I was born in Lagos, Nigeria. My kinsmen literally built this place. It would pay homage to the Benin Kingdom until 1861 when it was annexed by the British.

The history of the Esan people in Lagos can be found here. Lagos would be the drop off point for the invasion of a place that would later be named after one of my kinsmen Isi Aghadahomen an Esan General who led Benin warriors to conquer present day republic of Benin.

I will judge this administration by it’s campaign speech. In the next 4 months, it would be a year after that speech was made.

I will use the Six Pillars of Development Agenda for this administration as the benchmark for my accessement.

Traffic Management and Transportation

This is an absolute fail.

We are packed like cattle at the bus parks. The picture above is the bus park at Obalende.

It is dirty and unhygienic with equally dirty and cramped buses.

If we had a safe, comfortable and reliable transportation system, there would be no need for Okadas.

The ban on Okadas and Tricycles along certain roads in the state will cause untold suffering to Lagosians.

A famous writer once said: “If you are silent about your pain, they will kill you and say you enjoyed it”.

No modern city relies on bikes for transportation. The absence of a modern railway line is a big fail on previous administrations.

I will judge this administration by how well it does in this regard.

Health and Environment

In the area of sanitation, I readily admit that this administration inherited this problem.

Sadly, it has not done enough to solve it.

Rather than tell Lagosians not to dump refuse in certain places, the administration should tell them where to drop it.

That is the essence of leadership.

Patronage of hospitals in Lagos is low. Most Lagosians self-medicate. There is a lot that can be done to improve healthcare in Lagos state starting with the welfare of the health practitioners.

The waste issue must be tackled. The best model for Lagos state is to look at Rwanda.

Education and Technology

The continuation of the CodeLagos program is heartwarming considering the precedence for discontinuation of previous administration projects in Nigeria.

The world of tomorrow will be powered by code. Getting children involved with technology at an early age will prepare them for a technology driven future.

Making Lagos a 21st Century Economy

Of what use is an Art of Technology conference when BRT bus schedules are not available on a mobile app?

Beyond talking about technology, the adoption of technology across the state will help strengthen its efforts in education.

The issue of electricity supply should also be tackled. No one can write code in the dark.

Entertainment and Tourism

Greater Lagos 2020 failed to fly.

It could have been the one thing the state got right last year but someone dropped the ball on this.

Security and Governance

I have no comment in this regard as I have witnessed no real changes.

Previous administrations have always had a reputation for opacity.

I cannot remember that last time we had a town hall meeting in Lagos state.

The transportation master plan has yet to be released for public viewing.

Empathy is missing across all areas of governance in Nigeria.

The ban on Okadas and Tricycles is the best example of this.

After all the stress that they were put through last year, to start a New Year with this news smacks of lack of empathy.

It is my hope that this is sorted out.

Morality cannot be imposed on hungry men. With unemployment of thousands looming, this administration would do well to lift the ban and stop toying with peoples lives.

Conclusion

I was born in Lagos and schooled exclusively in Lagos state.

This is the first of a series of monthly articles on the state of the current administration in Lagos state.

It is my hope to live in a world that works within my lifetime.

Bad governance will kill everyone.

Categories
Article Review

The Rwandan Prescription for Depression

This is a review of  Rwandans decided to deal with the trauma caused by the genocide.

You can read the full article here.

Trauma refers to a wound of the soul. Like all wounds, it takes time to recover from trauma.

The survivors of the 1994 genocide would be weighted down be depression.

Rather than use the methods typical with Western psychology, the methods in this story focused on going “Outside Yourself”.

So the priority was the outdoors and the community.

A great reminder that all we have to do to break out of a rut is to get out of the building.

Categories
Article Review

They Write the Right Stuff

This is a review of how software is written by the On-board Shuttle Group on Fast Company.

Given how pervasive software is in our everyday life, what the group achieves with the software that powers shuttle launches is absolutely amazing.

The software for shuttle launches must be as perfect as possible.

Lives are at stake and millions will be lost if anything goes wrong.

To achieve this, there process is designed to not rely on an one individual.

It is the synergy of individual efforts that guarantee the required level of perfection.

Sadly, the rest of the software engineering profession is devoid of this discipline.

I should know because I too used to be a cowboy coder.

But like the article says: “When you have to write perfect software instead of software that’s just good enough — then it’s time to grow up”.

Categories
Drawing Adinkra Symbols using Python

Aban

Aban means “fortress”. It is the symbol of strength and authority.

We will use the 5 pixel grid to trace out this image. The image of this is shown below:

Aban on a Grid

Analysing the Symbol

The symbol is a composite symbol made up of 4 symbols that look like tongs.

A single tong is symmetrical in its quadrant. This property means that we draw a tong and use the steps to draw others.

The Plan to Draw the Symbol

We shall move the pen to the position (0, 80). Once we do this, we shall set the heading of the pen to 45 degrees thus drawing the tong in the upper right quadrant.

Once the drawing of the first tong is completed, the position of the turtle will place it on the x axis on the right.

At that point, we simply set the heading of the pen to 315 degrees and draw the second tong. When the second tong is drawn, the turtle will be on the negative y axis.

At this point, we simply set the heading of the pen to 225 degrees and draw the third tong. When the third tong is drawn, the turtle will be on the negative x axis.

At this point, we simple set the heading of the pen to 135 degrees and draw the fourth tong thus completing our shape.

Algorithm to Draw the Symbol

The algorithm to draw the Aban symbol is shown below:

  1. Lift up the pen
  2. Set the heading to 45 degrees
  3. Move the pen to the position (0, 80)
  4. Set the pen size to half the width of the shape
  5. Place the pen down
  6. Move forward to draw the first line
  7. Turn right by 90 degrees
  8. Move forward to draw half of the first line
  9. Turn left by 90 degrees
  10. Move forward to draw the protruding line at a distance of 5/8 of the length
  11. Lift up the pen
  12. Reverse the turtle by moving back the same distance as you moved forward
  13. Turn right by 90 degrees
  14. Place the pen down
  15. Draw the second half of the line
  16. Turn right by 90 degrees
  17. Move forward to draw the third line
  18. Change the heading to 315 and repeat steps 6 – 17
  19. Change the heading to 225 and repeat steps 6 – 17
  20. Change the heading to 135 and repeat steps 6 – 17

Using Turtle Graphics

We will use the template.py file and rename it to aban.py.

The code for steps 1 to 3 is given below:

turtle.penup()
turtle.setheading(45)
turtle.setposition(0, 80)

In step 4 of the algorithm to draw Aban, we have to find the width of the shape. We will also need to find the length of the shape.

To find the width of the line, we need to find the distance between two parallel points it passes through and this are: (120, 0) and (40, 80).

To find the length of a side of the Aban symbol, we take the point (0, 80) as our starting point and get the coordinates of the centre point (80, 160) which is where a line drawing the symbol would stop and turn.

We have to introduce a function coordinateDistance to give us the distance between the two coordinates. The function definition is shown below:

def coordinateDistance(x1, y1, x2, y2):
dx = x1 – x2
dy = y1 – y2
D = math.sqrt((dx * dx) + (dy * dy))
return D

To find the width and length, we use the expressions below:

width = coordinateDistance(120, 0, 40, 80)
length = coordinateDistance(0, 80, 80, 160)

The code for steps 4 and 5 is shown below:

turtle.pensize(width / 2)
turtle.pendown()

Since steps 6 to 17 will be repeated 3 more times, they are a good candidate for a function. We shall call this function drawTong.

Steps 6 to 17 can be automated using the drawTong function. We will first write out the commands for the steps to check then we will later integrate them into the drawTong function.

The code for steps 6 to 10 is given below:

turtle.forward(length)
turtle.right(90)
turtle.forward(length / 2)
turtle.left(90)
turtle.forward(length * 5 / 8)

The generated image is shown below:

Half Tong
Half Tong

The code to lift the pen is straightforward enough. To reverse the shape, we need to move backward the same number of steps as forward.

The code to do this is shown below:

turtle.penup()
turtle.backward(length * 5 / 8)
turtle.right(90)
turtle.pendown()
turtle.forward(length / 2)
turtle.right(90)
turtle.forward(length)

The generated image is shown below:

Full Tong
Full Tong

Now that we have drawn one part of the symbol, we can use the code to create the drawTong function so that we don’t have to repeat ourselves.

The code for the function is shown below:

def drawTong():
turtle.forward(length)
turtle.right(90)
turtle.forward(length / 2)
turtle.left(90)
turtle.forward(length * 5 / 8)
turtle.penup()
turtle.backward(length * 5 / 8)
turtle.right(90)
turtle.pendown()
turtle.forward(length / 2)
turtle.right(90)
turtle.forward(length)

To draw the shape completely, we need to call this function and alternate with the setheading angle that is representative of the quadrant the function will draw in. The code to do this is shown below:

drawTong()
turtle.setheading(315)
drawTong()
turtle.setheading(225)
drawTong()
turtle.setheading(135)
drawTong()

The generated image is shown below:

Completed Symbol
Completed Symbol

Complete Code

"""
Project Name: Drawing Adinkra Symbols using Python
Developer Name: Truston Ailende
Email Address: trustonailende@gmail.com
"""
import turtle
import math

# Square
def drawSquare(length):
    turtle.penup()
    turtle.setposition(-length/2.0, length/2.0)
    turtle.pendown()
    for i in range(0, 4):
        turtle.forward(length)
        turtle.right(90)
    turtle.penup()
    turtle.home()

# Horizontal lines
def drawHorizontalLine(length, division):
    pixelSpace = int(length / division)
    half = int(length / 2)
    for j in range((-half + pixelSpace), half, pixelSpace):
        turtle.penup()
        turtle.setposition(-half, j)
        turtle.pendown()
        turtle.forward(length)
    turtle.penup()
    turtle.home()

# Vertical lines
def drawVerticalLine(length, division):
    pixelSpace = int(length / division)
    half = int(length / 2)
    turtle.right(90)
    for k in range((-half + pixelSpace), half, pixelSpace):
        turtle.penup()
        turtle.setposition(k, half)
        turtle.pendown()
        turtle.forward(length)
    turtle.penup()
    turtle.home()

# Draw the grid
drawSquare(400)
drawHorizontalLine(400, 40)
drawVerticalLine(400, 40)

# Change the colour mode
turtle.colormode(255)

# Change the pencolor to red
turtle.pencolor(255, 0, 0)

# Draw the horizontal centre line
turtle.setposition(-200, 0)
turtle.pendown()
turtle.forward(400)
turtle.penup()

# Draw the vertical centre line
turtle.setposition(0, 200)
turtle.setheading(270)
turtle.pendown()
turtle.forward(400)

# Reset all the properties
turtle.home()
turtle.pencolor(0, 0, 0)

# Place code here
turtle.penup()
turtle.setheading(45)
turtle.setposition(0, 80)

def coordinateDistance(x1, y1, x2, y2):
    dx = x1 - x2
    dy = y1 - y2
    D = math.sqrt((dx * dx) + (dy * dy))
    return D

width = coordinateDistance(120, 0, 40, 80)
length = coordinateDistance(0, 80, 80, 160)

turtle.pensize(width/2)
turtle.pendown()

def drawTong():
    turtle.forward(length)
    turtle.right(90)
    turtle.forward(length / 2)
    turtle.left(90)
    turtle.forward(length * 5 / 8)
    turtle.penup()
    turtle.backward(length * 5 / 8)
    turtle.right(90)
    turtle.pendown()
    turtle.forward(length / 2)
    turtle.right(90)
    turtle.forward(length)

drawTong()
turtle.setheading(315)
drawTong()
turtle.setheading(225)
drawTong()
turtle.setheading(135)
drawTong()

# End the program
turtle.done()

Where Can It Be Found?

A brief Google search led me to the following places where you can get branded Aban products:

  1. Aban Zanzibar Trinity Rings on Simbasante
  2. Socks by Adinkra Republic
  3. Protection Adinkra Earrings by Ahima
  4. Aban Gold Pendant on Amazon
  5. Aban Wooden Stamp on Etsy

Summary

At the end of this post, we have successfully used the Python Turtle environment to draw the Aban symbol.

The code for this series is available on GitHub. Please feel free to check it out.

Next time, we will look at the Abusua Pa Adinkra symbol

Support this Series

Using the Adinkra symbols, I created the Adinkra Notebooks Collection.

You can support this series by buying one of them.