Skip to content

Climate download#2

Open
molotomt wants to merge 23 commits into
mainfrom
climate-download
Open

Climate download#2
molotomt wants to merge 23 commits into
mainfrom
climate-download

Conversation

@molotomt

Copy link
Copy Markdown
Collaborator

No description provided.

@molotomt molotomt self-assigned this Apr 11, 2023

@paulmwatson paulmwatson left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also please update the readme with instructions on how to run the files and what extra files are needed that are not in the repo (./files)

Comment thread climate-avg.py Outdated
Comment thread climate-disasters.py Outdated
Comment thread climate-disasters.py Outdated
Comment thread climate-disasters.py Outdated
import pandas as pd
import numpy as np

df = pd.read_csv('~/dev/climate-datasets/files/emdat_africa_1992-2023_natural.csv', encoding = 'unicode_escape', engine ='python')

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ~/dev/climate-datasets/files is specific to your machine, and Linux style file systems, rather use local ./files

Comment thread climate-locations.py Outdated
Comment thread disaster-uploader.py
Comment thread disaster-uploader.py Outdated
print('Fetching Data')

climatology_df = pd.read_csv('emdat_africa_1992-2023_natural.csv')
#print(climatology_df)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove commented out code

Comment thread download-files.py
Comment on lines +28 to +56
file_info =[{
"filename": "TAVG-climatology.csv",
"resource_id": os.getenv('TAVG_climate_resource_id')
},
{
"filename": "TAVG-temperature.csv",
"resource_id": os.getenv('TAVG_temp_resource_id')

},
{
"filename": "TMAX-climatology.csv",
"resource_id": os.getenv('TMAX_climate_resource_id')

},
{
"filename": 'TMAX-temperature.csv',
"resource_id": os.getenv('TMAX_temp_resource_id')

},
{
"filename": "TAVG-climatology.csv",
"resource_id": os.getenv('TMIN_climate_resource_id')

},
{
"filename": 'TMIN-temperature.csv',
"resource_id": os.getenv('TMIN_temp_resource_id')

}]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Block repeated in several files. Best to extract and import.

Comment thread climate-uploader.py
Comment thread disaster-uploader.py Outdated

load_dotenv()

# Define CKAN API endpoint and your API key]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bracket at end of comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants