Text
Graphing the Data
The first three graphs are the frequency graphs. Income GROUP mean: The CO2 Emissions mean: 3851500000.0 mode: 8000000.000000 STDV: 14736593392.861544 Looking at the standard deviation, it looks like the range is pretty vast.
Lower Income per Person uses less electricity at the lower range. No relationship besides that.
There is no clear relationship except there is a peak in CO2 emission between 20000 income per person and 40000. Probably these are the most industrial countries.
There doesn’t seem to be any clear relationship between electric use per person and co2 emissions in poor countries.
The Code:
#Make 2-variable Graphs scat1 = seaborn.regplot(x="incomeperperson", y="co2emissions", fit_reg=False, data=data) plt.xlabel('Income per Person ($)') plt.ylabel('CO2 Emissions (metric tons)') plt.title('Scatterplot for the Association Between Income per Person and CO2 Emissions')
scat1 = seaborn.regplot(x="relectricperperson", y="co2emissions", fit_reg=False, data=data) plt.xlabel('Electric Use per Person (kwat)') plt.ylabel('CO2 Emissions (metric tons)') plt.title('Scatterplot for the Association Between Electric Use per Person and CO2 Emissions in Poor Countries')
scat1 = seaborn.regplot(x="INCOMEGROUP", y="ELECTRICGROUP", fit_reg=False, data=data) plt.xlabel('Electric Use per Person (kwat)') plt.ylabel('Income per Person') plt.title('Scatterplot for the Association Between Electric Use per Person and Income per Person in Poor Countries')
#Mean, Standard Deviation, etc
mode1 = a['co2emissions'].mode() print (mode1)
std1 = a['co2emissions'].std() print (std1)
0 notes
Text
Making Data Management Decisions
I finally somewhat learned how to do tables in python. I used the following code to make them out of that data series. The tables are still FAR from perfect, but it is a start:
s4 = pandas.concat([c4, p4], axis=1, keys=['Count for Incomeperperson', 'Percentage for Incomeperperson'])
When it came to managing data, I did a couple of things:
1. I deleted all irrelevant columns from sub1 dataframe.
2. I grouped the incomeperperson by 100s giving them a code from 1 - 7 (1= $100-200, 2=201-300 and so on), and removed sub1 dataframe where incomeperperson was greater than 850 since I will be focusing on poor countries. The data became easier to digest when I did this and I will be doing this with the other variables.
I haven’t seen any patterns in the data yet, but I think this might change once I group the other variables.
Here are the frequency tables:
0 notes
Text
Creating Frequency Tables with Python
I haven’t figured out how to make tables with Python, so I presented the data as a list. I rounded the CO2 emission, and electricity use per person to create a clearer frequency. This is the only way I could figure out how to do it without doing a range which I have no clue how to do in Python.
Furthermore, I selected the income per person as <=850 to select poor countries as determined by the World Bank.
I need to figure out how to expand the selection to include CO2 emission and electricity use per person to actually be able to analyze the data.
Here is the code created with python:
Here is the distribution list:
Count for CO2 Emissions (metric tons)
4.700000e+07 1 0.000000e+00 1 1.040000e+08 1 1.089700e+10 1 5.260000e+08 1 2.360000e+08 1 2.340500e+10 1 1.270000e+08 1 4.000000e+06 2 1.000000e+06 4 3.100000e+08 1 1.548000e+09 1 1.866000e+09 1 1.963000e+09 1 9.300000e+07 1 3.342210e+11 1 2.671000e+09 1 1.330500e+10 1 9.500000e+07 1 2.932000e+09 1 2.480000e+08 1 2.008000e+09 1 5.310000e+08 1 5.040000e+08 1 3.341000e+09 1 2.250000e+08 1 1.082300e+10 1 6.900000e+07 1 1.200000e+08 1 .. 1.437000e+09 1 5.300000e+07 1 1.461000e+10 1 1.440000e+08 1 5.585000e+09 1 2.485000e+09 1 2.430000e+08 1 7.900000e+07 1 2.420000e+09 1 8.600000e+07 1 9.483000e+09 1 5.700000e+07 1 5.249000e+09 1 8.100000e+07 1 9.580000e+09 1 1.100000e+08 1 1.027000e+09 1 1.800000e+07 1 5.600000e+07 1 1.414000e+09 1 2.800000e+07 1 7.000000e+06 3 1.400000e+07 3 2.240000e+08 1 1.250000e+08 1 3.000000e+06 2 5.419000e+09 1 5.872000e+09 1 2.550000e+08 1 3.400000e+08 1
Count for electric use/person (kWh) 640.0 1 590.0 1 170.0 2 770.0 2 600.0 1 920.0 2 70.0 4 610.0 1 1920.0 1 40.0 4 210.0 2 930.0 1 450.0 1 500.0 2 1380.0 1 50.0 2 60.0 3 530.0 3 330.0 2 400.0 1 30.0 3 800.0 1 2120.0 2 1440.0 1 1880.0 1 460.0 1 310.0 1 540.0 2 260.0 2 .. 410.0 1 440.0 1 550.0 1 4300.0 1 350.0 1 670.0 1 970.0 1 7430.0 1 11150.0 1 1490.0 2 2070.0 1 1410.0 1 2540.0 1 3430.0 1 1690.0 2 1470.0 1 1150.0 1 2340.0 1 2260.0 2 1570.0 1 4760.0 1 1390.0 1 1590.0 1 1830.0 1 1930.0 1 2830.0 2 8360.0 1 2990.0 1 4540.0 1 7310.0 1 Name: relectricperperson, dtype: int64 Counts for incomeperperson ($)
560.0 3 380.0 2 280.0 3 120.0 1 710.0 1 240.0 2 340.0 2 100.0 1 590.0 1 130.0 1 220.0 1 350.0 1 360.0 1 410.0 1 160.0 2 370.0 3 790.0 1 740.0 2 470.0 1 760.0 1 550.0 1 500.0 1 180.0 2 270.0 3 610.0 2 600.0 1 770.0 1 390.0 1 540.0 1 670.0 1 520.0 1 460.0 1 290.0 1 720.0 1 430.0 1 320.0 1
percentage for incomeperperson($) 560.0 0.058824 380.0 0.039216 280.0 0.058824 120.0 0.019608 710.0 0.019608 240.0 0.039216 340.0 0.039216 100.0 0.019608 590.0 0.019608 130.0 0.019608 220.0 0.019608 350.0 0.019608 360.0 0.019608 410.0 0.019608 160.0 0.039216 370.0 0.058824 790.0 0.019608 740.0 0.039216 470.0 0.019608 760.0 0.019608 550.0 0.019608 500.0 0.019608 180.0 0.039216 270.0 0.058824 610.0 0.039216 600.0 0.019608 770.0 0.019608 390.0 0.019608 540.0 0.019608 670.0 0.019608 520.0 0.019608 460.0 0.019608 290.0 0.019608 720.0 0.019608 430.0 0.019608 320.0 0.019608
0 notes
Text
Is There an Association Between Electric Use/Household and Carbon Emission in Countries Living under the Poverty Line?
To answer this question I will use the code set “Gap Minder” to download data and find a relationship. From what I found in the research, it is clear that low-income countries do not emit a considerable amount of CO2 emissions compared to their higher GDP countries counterparts (Galeotti&Lanza 1999). However, the developing and least-developed economies (forming 80% of the world's population) accounted for 73% of global emissions growth in 2004 (Raupach et al. 2007). As countries grow and develop, countries become more urbanized, production activities which were domestically provided in rural areas, using human or animal energy, shift to sources outside the household, using modern energy sources (Jones 1991).Solar, wind and other alternatives are still more costly than fossil fuels; therefore poor countries have a high reliance on fossil fuels for their electrical needs (US Congress 1991).
Search Queries Used: “Energy Source in Developing Countries”, “Carbon emission in developing countries”, “Electric Source in Developing Countries”
Hypothesis: Due to poorer countries' reliance on fossil fuel for electricity, the relationship between electric usage/household and carbon emission is directly correlated.
CODEBOOK:
REFERENCES:
Galeotti, M., & Lanza, A. (1999). Richer and cleaner? A study on carbon dioxide emissions in developing countries. Energy Policy, 27(10), 565-573. doi:10.1016/S0301-4215(99)00047-6
Jones, D. W. (1991). How urbanization affects energy-use in developing countries. Energy Policy, 19(7), 621-630. doi:10.1016/0301-4215(91)90094-5
Raupach, M. R., Marland, G., Ciais, P., Quéré, C. L., Canadell, J. G., Klepper, G., . . . Mittuniversitetet. (2007). Global and regional drivers of accelerating CO₂ emissions. Proceedings of the National Academy of Sciences of the United States of America, 104(24), 10288-10293. doi:10.1073/pnas.0700609104
U.S. Congress, Office of Technology Assessment, Energy in Developing Countries, OTA-E-486 (Washington, DC: U.S. Government Printing Office, January 1991).
0 notes