(1) Give one example of each of the following type of data.
(a) Analog: A video clip stored on the magnetic tape of a VCR cassette. (b) Digital: An MP3 file stored on a laptop. (c) Primary: Red light on a traffic light pole. (d) Secondary (i.e., lack of data that is informative): Darkness means a lack of light. (e) Metadata: The date when a document on a computer was created. (f) Environmental: Soil having an orange color means very high acidity.
(2) Write one example when the same structured data can be classified as (a) information, (b) redundancy and (c) not interpretable.
Red light on a traffic light pole. a) To a driver or a pedestrian, this means the vehicle must stop. b) To someone who is flying on a plane, this is redundant as a plane does not utilize road traffic lights. c) To a newborn baby, this is not interpretable as they do not have the cognitive ability to understand such concept.
(3) Photo-voltaic generation converts the sun's radiation into usable electricity. In this task, you will get the direct solar radiation with 1 minute time interval from the Radiation observations at FMI. Plot radiation profile of three different days so that one must be in March, other in July and the last in December (regardless of the year). Provide information about the potential of solar generation in those days. You can also select the measuring station (but write it in the answer).
Hint: Code like in the tutorial notebook.
#Import libraries
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib.dates as mdates
#Read data
mar = pd.read_csv("hel-mar.csv",dayfirst=True,sep=",",
header=0,decimal=b".",index_col=0,
parse_dates= [[0, 1, 2, 3]],usecols=[0,1,2,3,5])
jul = pd.read_csv("hel-jul.csv",dayfirst=True,sep=",",
header=0,decimal=b".",index_col=0,
parse_dates= [[0, 1, 2, 3]],usecols=[0,1,2,3,5])
dec = pd.read_csv("hel-dec.csv",dayfirst=True,sep=",",
header=0,decimal=b".",index_col=0,
parse_dates= [[0, 1, 2, 3]],usecols=[0,1,2,3,5])
# The data was collected from Helsinki Kumpula station on March 1st, July 1st, and December 1st 1021.
# There were negative values in the data, which are theoretically not possible for solar radiation. These values were changed to 0.
mar[mar<0] = 0
jul[jul<0] = 0
dec[dec<0] = 0
# Day in March
plt.figure(figsize=(16,6))
plt.plot(mar,color='green',linestyle='-')
plt.title("March 1st, 2021 in Helsinki Kumpula")
plt.xlabel("Time")
plt.ylabel("Solar radiation[W/m²]")
plt.grid(True)
plt.show()
# Day in July
plt.figure(figsize=(16,6))
plt.plot(jul,color='red',linestyle='-')
plt.title("July 1st, 2021 in Helsinki Kumpula")
plt.xlabel("Time")
plt.ylabel("Solar radiation [W/m²]")
plt.grid(True)
plt.show()
# Day in December
plt.figure(figsize=(16,6))
plt.plot(dec,color='blue',linestyle='-')
plt.title("December 1st, 2021 in Helsinki Kumpula")
plt.xlabel("Time")
plt.ylabel("Solar radiation [W/m²]")
plt.grid(True)
plt.show()
# Information on solar generation
# Power = Total size of solar panels (m²) x Solar radiation(W/m²)
# Assume that Total size of solar panels = 10m²
# The equation is linear, meaning more solar radiation = more power generated.
# This correlation is not clear in the plots.
# Solar generation in March
fig, ax1 = plt.subplots(figsize=(16,6))
#left axis
ax1.set_ylabel("Power [W]", color='black')
ax1.plot(10*mar,color='black',linestyle='-')
#right axis
ax2 = ax1.twinx()
ax2.set_ylabel("Solar radiation [W/m²]", color='green',rotation=270,va="bottom")
ax2.plot(mar,color='green',linestyle=':')
#
ax1.grid(True)
plt.title("Solar generation potention on March 1st, 2021 in Helsinki Kumpula")
xfmt = mdates.DateFormatter('%H:%M')
ax1.xaxis.set_major_formatter(xfmt)
#
plt.show()
# Solar generation in July
fig, ax1 = plt.subplots(figsize=(16,6))
#left axis
ax1.set_ylabel("Power [W]", color='black')
ax1.plot(10*jul,color='black',linestyle='-')
#right axis
ax2 = ax1.twinx()
ax2.set_ylabel("Solar radiation [W/m²]", color='red',rotation=270,va="bottom")
ax2.plot(jul,color='red',linestyle=':')
#
ax1.grid(True)
plt.title("Solar generation potention on July 1st, 2021 in Helsinki Kumpula")
xfmt = mdates.DateFormatter('%H:%M')
ax1.xaxis.set_major_formatter(xfmt)
#
plt.show()
# Solar generation in December
fig, ax1 = plt.subplots(figsize=(16,6))
#left axis
ax1.set_ylabel("Power [W]", color='black')
ax1.plot(10*dec,color='black',linestyle='-')
#right axis
ax2 = ax1.twinx()
ax2.set_ylabel("Solar radiation [W/m²]", color='blue',rotation=270,va="bottom")
ax2.plot(dec,color='blue',linestyle=':')
#
ax1.grid(True)
plt.title("Solar generation potention on December 1st, 2021 in Helsinki Kumpula")
xfmt = mdates.DateFormatter('%H:%M')
ax1.xaxis.set_major_formatter(xfmt)
#
plt.show()
(4) Read the text Blockchains Use Massive Amounts of Energy—But There’s a Plan to Fix That. Write a brief analysis of the text based on the relation between data, energy and level of processes. Note: This is clearly not a right/wrong question, but a space to critically think about current issues related to the course.
Cryptocurrencies, and one of the key technologies behind them - blockchains, use a lot of energy. While mining for coins, crypto miners also check for frauds in the blockchain and secure the blockchain from attack. Miners convert each list of the most recent transactions into a signature that can be used to verify the accuracy of the data, which is possible for any miner using a cryptographic tool that generates a string of seemingly random characters from any input. Bitcoin’s creator, Satoshi Nakamoto, made this exceptionally challenging. The goal is to be the first to grab a very precise signature using three inputs: the signature of the previous block, the list of new transactions, and a third number chosen at random. The third number is unknown to the miners, so they must continually construct signatures until someone guesses it right. These activities consume huge amount of energy. Some have already looked at alternative, more eco-friendly options, such as "proof of stake". Blockchains that employ proof of stake would choose validators in part based on the sum of each participant's financial deposits, or stake. This would be far more energy-efficient, but the idea hasn't been tested on a wide scale and still needs some workarounds. The level of processes could be interpreted as follow: