Analysis of some Gapminder data (part3)
I revised the first code and added the first visual features.
You can find code and output below, including a short summary.
Data management decisions have been docuemtned in the code comments:
deletion of incomplete data
different clustering in order to have meaningful data
CODE:
#import necessary libraries
import pandas as pd
import numpy as np
#import data set and check number of observations and variables
data = pd.read_csv('gapminder.csv', low_memory=False)
number_of_orig_row = len(data)
print('Some data set information:')
print(len(data.columns), 'observed variables')
print(number_of_orig_row, 'observations')
#convert necessary variables to numeric values
#and remove incomplete missing data
data['urbanrate']=pd.to_numeric(data['urbanrate'],'coerce')
data['co2emissions']=pd.to_numeric(data['co2emissions'],'coerce')
data['lifeexpectancy']=pd.to_numeric(data['lifeexpectancy'],'coerce')
data.dropna(subset=['urbanrate','co2emissions','lifeexpectancy'], inplace=True)
#calculate some useful data
co2_max = data['co2emissions'].max()
missing_data = number_of_orig_row - len(data)
print(missing_data,'observations will be deleted since not all variables were filled with values')
print()
#used variables do not include recurrent values,
#creating frequency tables out of this raw data will not help much
#instead variable data will be clustered in groups
#that can be used for frequency anaylsis
#'urbanrate' can be clustered by <25% / <50% / <75% / <100%
#'co2emissions' can be clustered by < co2_max/10000, < co2_max/1000, < co2_max/100, > co2_max/100
#'lifeexpectation' can be clustered by <60, <70, <80, <90
data['urbanrate_cl'] = data['urbanrate'].apply(lambda x: 'ur25' if x < 25 else ('ur50' if x < 50 else ('ur75' if x < 75 else 'ur100')))
data['co2emissions_cl'] = data['co2emissions'].apply(lambda x: 'ce10000' if x < co2_max/10000 else ('ce1000' if x < co2_max/1000 else ('ce100' if x < co2_max / 100 else 'ce_max')))
data['lifeexpectancy_cl'] = data['lifeexpectancy'].apply(lambda x: 'le60' if x < 60 else ('le70' if x < 70 else ('le80' if x < 80 else 'le90')))
#create and print frequency tables (with labels)
c_ur = data['urbanrate_cl'].value_counts(sort=False, normalize=False)
p_ur = 100 * data['urbanrate_cl'].value_counts(sort=False, dropna=False, normalize=True)
print('The count of the clustered values of variable "urbanrate" is:')
print(c_ur)
print()
print('while the relative frequency (percentage) is in %:')
print(p_ur)
c_ce = data['co2emissions_cl'].value_counts(sort=False, normalize=False)
p_ce = 100 * data['co2emissions_cl'].value_counts(sort=False, dropna=False, normalize=True)
print()
print('The count of the clustered values of variable "co2emissions" is:')
print(c_ce)
print()
print('while the relative frequency (percentage) is in %:')
print(p_ce)
print()
c_le = data['lifeexpectancy_cl'].value_counts(sort=False, normalize=False)
p_le = 100 * data['lifeexpectancy_cl'].value_counts(sort=False, dropna=False, normalize=True)
print('The count of the clustered values of variable "lifeexpectancy" is:')
print(c_le)
print()
print('while the relative frequency (percentage) is in %:')
print(p_le)
c_ur.plot(kind='bar')
c_ce.plot(kind='bar')
c_le.plot(kind='bar')
OUTPUT:
Some data set information:
16 observed variables
213 observations
32 observations will be deleted since not all variables were filled with values
The count of the clustered values of variable "urbanrate" is:
ur25 19
ur50 54
ur75 69
ur100 39
Name: urbanrate_cl, dtype: int64
while the relative frequency (percentage) is in %:
ur25 10.497238
ur50 29.834254
ur75 38.121547
ur100 21.546961
Name: urbanrate_cl, dtype: float64
The count of the clustered values of variable "co2emissions" is:
ce1000 66
ce100 47
ce_max 33
ce10000 35
Name: co2emissions_cl, dtype: int64
while the relative frequency (percentage) is in %:
ce1000 36.464088
ce100 25.966851
ce_max 18.232044
ce10000 19.337017
Name: co2emissions_cl, dtype: float64
The count of the clustered values of variable "lifeexpectancy" is:
le60 37
le80 85
le90 22
le70 37
Name: lifeexpectancy_cl, dtype: int64
while the relative frequency (percentage) is in %:
le60 20.441989
le80 46.961326
le90 12.154696
le70 20.441989
Name: lifeexpectancy_cl, dtype: float64
SHORT SUMMARY
Calculated relative frequencies indicates following:
life expectation gets its highest value in the band 70 till 80 years, showing surprisingly a minimum in the band 60 till 70.
urban rate has its highest frequency between 50 and 70%, nevertheless the contiguous bands have also high values. Less then 25% has the lowest values.
co2 emissions are very different, therefore the clusters have been chosen using scale factors (100/1000/10000 times). Countries with the lowest values have negligible emissions in comparison with the others.
0 notes
Máy hút ẩm Beurer LE60 là một trong những giải pháp kiểm soát độ ẩm không khí trong phòng đến từ thương hiệu nổi tiếng hàng đầu tại Đức – Beurer. Máy hút ẩm không khí Beurer LE60 phù hợp cho diện tích phòng từ 40 - 60 m2. Nếu bạn sử dụng máy hút ẩm này cho gia đình thì rất phù hợp bởi hầu hết diện tích phòng tại Việt Nam cũng trong tầm này.
1 note
·
View note
Cancun, ca 2017.
Con Hunter Thompson sulle spiagge del Messico.
Me and Hunter Thompson enjoying the mexican beaches.
1 note
·
View note
#Morgan #PlusSix #LE60 #LouwmanExclusive #morganmotor #morganmotorcompany #handbuilt #british #sportscars #britishcars #loveit https://www.instagram.com/p/CAbNl9jIr9y/?igshid=1lco1v3hi0jv4
0 notes
Morgan Motor LE60 Anniversary Cars Are The Netherlands’ Louwman Exclusive Only Cars
Love the yellow accents.
Follow us for more Tech Culture and Lifestyle Stuff.
2 notes
·
View notes
Kalabsha Temple and Nubian Museum Tour
Try Kalabsha Temple and Nubian Museum Tour, from our wide selections of Aswan Day Trips and visit Kalabsha Temple which was originally built on much earlier site that dates back to the 18th dynasty and most probably goes back to king Thothmosis and Amenhotep II and after the construction of the High Dam the temple was disassembled and reconstructed at its present location. Explore the Nubian Museum which opened its doors in November 1997 and includes three thousand pieces of antiquities representing various ages; Geological, Pharaonic, Roman, Coptic and Islamic.
Kalabsha Temple is an impressive Ptolemaic and Roman structure, not unlike nearby Philae in its layout. The early 19th-century Swiss traveller Burckhardt (who rediscovered Abu Simbel) thought it was 'amongst the most precious remains of Egyptian antiquity'. The temple, started in the late Ptolemaic period and completed during the reign of Emperor Augustus (30 BC–AD 14), was dedicated to the Nubian solar god Merwel, known to the Greeks as Mandulis. Later it was used as a church.
An impressive stone causeway leads from the lake to the first pylon of the temple, beyond which are the colonnaded court and the eight-columned hypostyle hall. Inscriptions on the walls show various emperors or pharaohs in the presence of gods and goddesses. Just beyond the hall is the sanctuary, consisting of three chambers. Stairs from one chamber lead up to the roof, from where there are superb views of Lake Nasser and the High Dam, across the capitals of the hall and court. An inner passage, between the temple and the encircling wall, leads to a well-preserved Nilometer. The temple's original outer stone gateway was given by the Egyptian government to Germany in 1977, in thanks for helping to move this building. It is now in the Egyptian Museum, Berlin.
As a result of a massive UNESCO effort, the temples here were transplanted from a now-submerged site about 50km south of Aswan. The new site is on the west bank of Lake Nasser just south of the High Dam.
When the water level is low you can sometimes walk across to the site; otherwise, you can find a motor boat on the western side of the High Dam (around LE60 for the return trip and an hour to visit).
Then visit Nubia Museum, opposite Basma Hotel, is a treat, a showcase of the history, art and culture of Nubia. Established in 1997 in cooperation with UNESCO, the museum is a reminder of what was lost beneath Lake Nasser. Exhibits are beautifully displayed in huge halls, where clearly written explanations take you from 4500 BC through to the present day.
The exhibits start with prehistoric artefacts and objects from the Kingdom of Kush and Meroe. Coptic and Islamic art displays lead to a description of the massive UNESCO project to move Nubia’s most important historic monuments away from the rising waters of Lake Nasser, following the building of the Aswan High Dam.
Among the museum highlights are 6000-year-old painted pottery bowls and an impressive quartzite statue of a 25th-dynasty priest of Amun in Thebes with distinct Kushite (Upper Nubian) features. The stunning horse armour found in tombs from the Ballana period (5th to 7th centuries BC) shows the sophistication of artisanship during this brief ascendancy. A fascinating display traces the development of irrigation along the Nile, from the earliest attempts to control the flow of the river, right up to the building of the old Aswan Dam. A model of a Nubian house, complete with old furniture and mannequins wearing traditional silver jewellery, attempts to portray the folk culture of modern Nubia.
Enjoy Kalabsha Temple and Nubian Museum Tour
Flying Carpet Tours delegate will pick you up at your hotel in Aswan, and you’ll be transferred by a private A/C vehicle to the enchanting Temple of Kalabsha which is located close to Lake Nasser, near the western end of Aswan High Dam. Unleash your inner and know more about the temple that was built by Toutmosis II and Amenophis II at Kalabsha 50 km south of Aswan and then disassembled and reconstructed at its present location after the construction of the High Dam. Feast your soul and move to explore the Nubian Museum which was opened its doors in November 1997 and includes three thousand pieces of antiquities. Finally Flying Carpet Tours guide will escort you back to your hotel in Aswan.
Included
• Pick up and drop off to your hotel in Aswan
• Excursion to Kalabsha Temple and Nubian Museum
• Entrance fees to the above mentioned sites
• English speaking guide to the sites mentioned above
• Bottle of Mineral Water during the Excursion
• All transfers by air-conditioned Van
• All service charges and taxes
Excluded
• Visa to Egypt
• Any optional tours required
• Tipping
For more info about Kalabsha Temple and Nubian Museum Tour:
Website: www.flyingcarpettours.com
Tel.: +201099906242
0 notes
Morgan Plus Six Blauw LE60, 2020. A special edition of 2 cars finished in Ice Blue with yellow highlights to celebrate 60 years of Morgan’s partnership with Dutch dealership Louwman Exclusive
0 notes
Morgan Plus Six Grijs LE60, 2020. A special edition of 2 cars finished in Scintilla Silver with yellow highlights celebrating 60 years of Morgan’s partnership with Dutch dealership Louwman Exclusive
799 notes
·
View notes
Analysis of some Gapminder data (part2)
I started the analysis of the gapminder data set, based on first Python code learnings.
The code looks like this:
#import necessary libraries
import pandas as pd
import numpy as np
#import data set and check number of observations and variables
data = pd.read_csv('gapminder.csv', low_memory=False)
print(len(data))
print(len(data.columns))
#convert necessary variables to numeric values
#and remove incomplete missing data
data['urbanrate']=pd.to_numeric(data['urbanrate'],'coerce')
data['co2emissions']=pd.to_numeric(data['co2emissions'],'coerce')
data['lifeexpectancy']=pd.to_numeric(data['lifeexpectancy'],'coerce')
data.dropna(subset=['urbanrate','co2emissions','lifeexpectancy'], inplace=True)
#calculate some useful data
co2_max = data['co2emissions'].max()
#used variables do not include recurrent values,
#creating frequency tables out of this raw data will not help much
#instead variable data will be clustered in groups
#that can be used for frequency anaylsis
#'urbanrate' can be clustered by <25% / <50% / <75% / <100%
#'co2emissions' can be clustered by < co2_max/10000, < co2_max/1000, < co2_max/100, > co2_max/100
#'lifeexpectation' can be clustered by <60, <70, <80, <90
data['urbanrate_cl'] = data['urbanrate'].apply(lambda x: 'ur25' if x < 25 else ('ur50' if x < 50 else ('ur75' if x < 75 else 'ur100')))
data['co2emissions_cl'] = data['co2emissions'].apply(lambda x: 'ce10000' if x < co2_max/10000 else ('ce1000' if x < co2_max/1000 else ('ce100' if x < co2_max / 100 else 'ce_max')))
data['lifeexpectancy_cl'] = data['lifeexpectancy'].apply(lambda x: 'le60' if x < 60 else ('le70' if x < 70 else ('le80' if x < 80 else 'le90')))
#create and print frequency tables (with labels)
c_ur = data['urbanrate_cl'].value_counts(sort=True, normalize=False)
p_ur = data['urbanrate_cl'].value_counts(sort=False, dropna=False, normalize=True)
print('The count of the clustered variable "urbanrate" is:')
print(c_ur)
print()
print('while the relative frequency is:')
print(p_ur)
c_ce = data['co2emissions_cl'].value_counts(sort=True, normalize=False)
p_ce = data['co2emissions_cl'].value_counts(sort=False, dropna=False, normalize=True)
print()
print('The count of the clustered variable "co2emissions" is:')
print(c_ce)
print()
print('while the relative frequency is:')
print(p_ce)
print()
c_le = data['lifeexpectancy_cl'].value_counts(sort=True, normalize=False)
p_le = data['lifeexpectancy_cl'].value_counts(sort=False, dropna=False, normalize=True)
print()
print('The count of the clustered variable "lifeexpectancy" is:')
print(c_le)
print()
print('while the relative frequency is:')
print(p_le)
The output looks like this.
213
16
The count of the clustered variable "urbanrate" is:
ur75 69
ur50 54
ur100 39
ur25 19
Name: urbanrate_cl, dtype: int64
while the relative frequency is:
ur25 0.104972
ur50 0.298343
ur75 0.381215
ur100 0.215470
Name: urbanrate_cl, dtype: float64
The count of the clustered variable "co2emissions" is:
ce1000 66
ce100 47
ce10000 35
ce_max 33
Name: co2emissions_cl, dtype: int64
while the relative frequency is:
ce1000 0.364641
ce100 0.259669
ce_max 0.182320
ce10000 0.193370
Name: co2emissions_cl, dtype: float64
The count of the clustered variable "lifeexpectancy" is:
le80 85
le60 37
le70 37
le90 22
Name: lifeexpectancy_cl, dtype: int64
while the relative frequency is:
le60 0.204420
le80 0.469613
le90 0.121547
le70 0.204420
Name: lifeexpectancy_cl, dtype: float64
Missing data was filtered out in order to get representative values.
Calculated relative frequencies indicates following:
life expectation is higher in the band 70 till 80 years
urban rate has its highest frequency between 50 and 70%, nevertheless the contiguous bands have also high values. Less then 25% has the lowest values.
co2 emissions are very different, therefore the clusters have been chosen using scale factors (100/1000/10000 times). Countries with the lowest values have negligible emissions in comparison with the others.
0 notes
Nấm mốc, rỉ sét và mùi mốc không có cơ hội xảy ra với máy hút ẩm Beurer LE60 MADE IN GERMANY. Nó loại bỏ độ ẩm dư thừa trong không khí và đảm bảo độ ẩm không khí tương đối lý tưởng trong phòng. Sản phẩm máy hút ẩm không khí Beurer LE60 này được giới chuyên môn đánh giá cao và là một trong những giải pháp lý tưởng đối đầu với mùa nồm ẩm hay mùa mưa nhiều tại Việt Nam.
1 note
·
View note
Morgan Unveils Limited Edition LE60 Plus Six And 3-Wheeler @ CarDaily.Co #galleries #morgan #newcars #cars #carsofinstagram #carporn #carlifestyle #carnewsnetwork #carswithoutlimits #carspotting #dailycar #cardaily
0 notes
Morgan Unveils Limited Edition LE60 Plus Six And 3-Wheeler
0 notes
Desarticulada una red de narcotráfico en Colombia operada por controladores aéreos https://t.co/le60EwujFC Las autoridades colombianas investigan el presunto vínculo con el cartel de Sinaloa copyright © 2018 January 14, 2019 at 07:52AM
Desarticulada una red de narcotráfico en Colombia operada por controladores aéreos https://t.co/le60EwujFC
Las autoridades colombianas investigan el presunto vínculo con el cartel de Sinaloa
copyright © 2018
January 14, 2019 at 07:52AM
— Utah, USA (@ybuasifogy) January 14, 2019
from Twitter https://twitter.com/ybuasifogy
January 14, 2019 at 07:57AM
via IFTTT
0 notes
"It's been a while since you discovered the solution, but at that moment, it seemed too good to be true. But the stated idea took shape, the tunnel ended and the light arrived. Congratulations!" http://tarotlife.com/TOnline/Arcanos/Texto/LE60.html https://www.instagram.com/p/CQHeaviHl08/?utm_medium=tumblr
0 notes
【悲報】千鳥、徐々にコンビ格差が生まれ始めるwwww
1:風吹けば名無し:
2019/01/29(火) 10:29:41.98ID:Ljr3D0Qo0.net
ノブ←ゴチ新メンバー、ピンのレギュラー多数
大悟←志村のチ●コしゃぶって得たレギュラー1本
2:風吹けば名無し:
2019/01/29(火) 10:30:19.67ID:6QlLrV7Ga.net
ノブゴチ新メンバーなんか
3:風吹けば名無し:
2019/01/29(火) 10:30:25.61ID:rwqb+lE60.net
でも大悟には何かがあるから
7:風吹けば名無し:
2019/01/29(火) 10:31:47.61ID:5QbhgI8DM.net
大吾ってノブありきだよな
9:風吹けば名無し:
2019/01/29(火) 10:32:05.90ID:GfiZm4QRd.net
でも二人がいちばんおもろい
14:風吹けば名無し:
2019/01/2…
View On WordPress
0 notes