Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global Emission Analysis Project #720

Merged
merged 59 commits into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
990e8d9
global_climate_analysis_project
minal2577 Jul 21, 2024
e37d168
Merge pull request #1 from minal2577/SSoc-contributuion
minal2577 Jul 21, 2024
d6ec2d1
Create CH4N2O
minal2577 Jul 23, 2024
27525dc
ADD DATA USED
minal2577 Jul 23, 2024
36652af
Create CLEANING DATA
minal2577 Jul 23, 2024
4ede72c
CREATING MERGE ALL.PY
minal2577 Jul 23, 2024
89e956f
CREATE CODE NOTEBOOK
minal2577 Jul 23, 2024
929c0c5
UPLOADING CODE NOTEBOOK
minal2577 Jul 23, 2024
c0a4afa
CREATING MERGE_GHG_DATA FILE
minal2577 Jul 23, 2024
fbb12c5
CHANGING GLOBAL CLIMATE ANALYSIS/NOTEBOOK/NOTEBOOK
minal2577 Jul 23, 2024
3b79e69
Add files via upload
minal2577 Jul 23, 2024
8eade5f
Create README.md
minal2577 Jul 23, 2024
5e0a82a
rename GLOBL CLIMATE ANALYSIS TO GLOBAL EMISSION ANALYSIS
minal2577 Jul 23, 2024
257506d
readme.md file
minal2577 Jul 24, 2024
3dfa3a3
Delete GLOBAL CLIMATE ANALYSIS directory
minal2577 Jul 24, 2024
bc092d8
Create ch4no2
minal2577 Jul 24, 2024
0e20638
adding dataset used
minal2577 Jul 24, 2024
71399c5
Delete ch4no2
minal2577 Jul 24, 2024
e3d761d
forming data perparingand cleaning
minal2577 Jul 24, 2024
83891d5
adding data perpetration code
minal2577 Jul 24, 2024
ea9cae8
Create notebook
minal2577 Jul 24, 2024
e99d73d
addiing model notebook
minal2577 Jul 24, 2024
d503f97
Add files via upload
minal2577 Jul 24, 2024
4574ab3
Delete notebook
minal2577 Jul 24, 2024
52330fe
Delete global_climate_analysis.zip
minal2577 Jul 30, 2024
cfb7c67
Update and rename requirment.txt to requirments.txt
minal2577 Jul 30, 2024
052fd0d
Delete GLOBAL EMISSION ANALSIS/data perparing and cleaning directory
minal2577 Jul 30, 2024
e3bf0f8
Update README.md
minal2577 Jul 30, 2024
cf1088c
Add files via upload
minal2577 Jul 30, 2024
96da3f9
Update README.md
minal2577 Jul 31, 2024
6cdd41e
Create ANN
minal2577 Jul 31, 2024
2a8e770
adding principal component analysis
minal2577 Jul 31, 2024
f2b71a8
Update README.md
minal2577 Jul 31, 2024
a44100c
Delete extra file
minal2577 Jul 31, 2024
92ac719
Add files via upload
minal2577 Jul 31, 2024
0e6298f
Update README.md
minal2577 Jul 31, 2024
4c1c24a
Update README.md
minal2577 Jul 31, 2024
58e800c
Add files via upload
minal2577 Jul 31, 2024
a49e1cf
Delete GLOBAL EMISSION ANALSIS/.gitattributes
minal2577 Jul 31, 2024
5a4d105
Delete GLOBAL EMISSION ANALSIS/.gitignore
minal2577 Jul 31, 2024
e91f59f
rename GLOBAL EMISSION ANALYSIS
minal2577 Jul 31, 2024
4da4879
Delete Global Emission Analysis directory
minal2577 Jul 31, 2024
9ded079
Rename README.md to README.md
minal2577 Jul 31, 2024
5dba4e3
Create ch4
minal2577 Jul 31, 2024
f31548f
Delete extra file
minal2577 Jul 31, 2024
39ee161
Create ch4
minal2577 Jul 31, 2024
ea28d2c
Delete Global Analysis/Dataset directory
minal2577 Jul 31, 2024
61e3ebf
Update and rename requirments.txt to requirments.txt
minal2577 Jul 31, 2024
5e64b43
Delete GLOBAL EMISSION ANALSIS directory
minal2577 Jul 31, 2024
c6bdd04
Create ch4
minal2577 Jul 31, 2024
6053c70
Add files via upload
minal2577 Jul 31, 2024
3999ce1
Delete Global Emission Analysis/Dataset/ch4
minal2577 Jul 31, 2024
31c682b
Create ann
minal2577 Jul 31, 2024
bf7a82c
Add files via upload
minal2577 Jul 31, 2024
67c8a82
Delete Global Emission Analysis/images/ann
minal2577 Jul 31, 2024
d69c775
Create notebook
minal2577 Jul 31, 2024
1148b78
notebook
minal2577 Jul 31, 2024
f4cec21
Update README.md
minal2577 Jul 31, 2024
38ccb87
Delete Global Emission Analysis/Models/notebook
minal2577 Jul 31, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions GLOBAL CLIMATE ANALYSIS/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
160 changes: 160 additions & 0 deletions GLOBAL CLIMATE ANALYSIS/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
24 changes: 24 additions & 0 deletions GLOBAL CLIMATE ANALYSIS/CLEAN AND PROCESSED/data perperation.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import pandas as pd
import numpy as np

# Load the CSV data into a pandas DataFrame
data = pd.read_csv('merge.csv')

# Replace 0 with NaN
data.replace(0, np.nan, inplace=True)

# Display the first few rows of the DataFrame
print(data.head())

# Handle missing values, if any
# For simplicity, we'll drop rows with missing values, but you could also fill them
data = data.dropna()

# Convert columns to appropriate data types if necessary
data['latest year available_x'] = data['latest year available_x'].astype(int)

# Save cleaned data for later use
data.to_csv('cleaned_data.csv', index=False)



29 changes: 29 additions & 0 deletions GLOBAL CLIMATE ANALYSIS/CLEAN AND PROCESSED/merge all.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
##Data Merging

## Merge GHG Emissions Data

##```python
import pandas as pd
# Load the data from CSV files
ch4_data = pd.read_csv('CH4_N2O_Emissions.csv')
co2_data = pd.read_csv('CO2_Emissions.csv')
merged_ghg_emissions_data=pd.read_csv('merged_ghg_data.csv')
NOx_data=pd.read_csv('NOx_Emissions.csv')
Ods_data=pd.read_csv('ODS_Consumption.csv')
SO2_data=pd.read_csv('SO2_emissions.csv')

# Merge the datasets on the 'Country' column with outer join
merged_data = ch4_data.merge(NOx_data, on='Country', how='outer')
merged_data = merged_data.merge(co2_data, on='Country', how='outer')
merged_data = merged_data.merge(merged_ghg_emissions_data, on='Country', how='outer')
merged_data = merged_data.merge(Ods_data, on='Country', how='outer')
merged_data = merged_data.merge(SO2_data, on='Country', how='outer')

# Fill missing values with 0
merged_data.fillna(0, inplace=True)

# Save the merged data to a new CSV file
merged_data.to_csv('merge.csv', index=False)

# View the merged data
print(merged_data.head())
Loading
Loading