Skip to content

Commit

Permalink
Merge pull request #81 from wwicherski/master
Browse files Browse the repository at this point in the history
Delete commented out code and conform io.py code to PEP 8 standards
  • Loading branch information
mbjoseph committed Oct 30, 2018
2 parents 809bf29 + 3e01339 commit 8c50b52
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions earthpy/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,29 @@
## This module will move to a new module for downloading data
## and building lessons

from download import download
import os.path as op
import os
#import matplotlib.pyplot as plt
import os.path as op
from download import download


#plt.style.use('ggplot')

# Data URLs, structured as {'week_name': [(URL, FILENAME, FILETYPE)]}
# If ZIPFILE / TARFILE / etc, we'll unzip to a folder w/ the week's name
DATA_URLS = {

# deprecating week 2 & 8 data given i've reorganized these data into single repos
# 'week_02': [('https://ndownloader.figshare.com/files/7010681', 'boulder-precip.csv', 'file'),
# ('https://ndownloader.figshare.com/files/7010681', 'temperature_example.csv', 'file'),
# ('https://ndownloader.figshare.com/files/7426738', '.', 'zip')],
'co-flood-extras': [('https://ndownloader.figshare.com/files/7010681', 'boulder-precip.csv', 'file'),
('https://ndownloader.figshare.com/files/7010681', 'temperature_example.csv', 'file')],
'colorado-flood': ('https://ndownloader.figshare.com/files/12395030', '.', 'zip'),
'spatial-vector-lidar': ('https://ndownloader.figshare.com/files/12459464', '.', 'zip'),
'cold-springs-modis-h5': ('https://ndownloader.figshare.com/files/10960112', '.', 'zip'),
#'week_05': ('https://ndownloader.figshare.com/files/7525363', '.', 'zip'),
'cold-springs-fire': ('https://ndownloader.figshare.com/files/10960109', '.', 'zip'),
'cs-test-naip': ('https://ndownloader.figshare.com/files/10960211?private_link=18f892d9f3645344b2fe', '.', 'zip'),
'cs-test-landsat': ('https://ndownloader.figshare.com/files/10960214?private_link=fbba903d00e1848b423e', '.', 'zip'),
#'week_08': [('https://ndownloader.figshare.com/files/9666637?private_link=480fba92b3e882c4d35d', 'week_08', 'zip'),
# ('https://ndownloader.figshare.com/files/9666637?private_link=480fba92b3e882c4d35d', 'week_08-hw', 'tar')],

}

ALLOWED_FILE_TYPES = ['zip', 'tar', 'tar.gz', 'file']

# destfile = "data/boulder-precip.csv"'}
HOME = op.join(op.expanduser('~'))
DATA_NAME = op.join('earth-analytics', 'data')

Expand Down Expand Up @@ -83,7 +75,7 @@ def get_data(self, key=None, name=None, replace=False):
elif key not in DATA_URLS:
raise ValueError("Don't understand key "
"{}\nChoose one of {}".format(
key, DATA_URLS.keys()))
key, DATA_URLS.keys()))
else:
this_root = op.join(self.path, key)
this_data = DATA_URLS[key]
Expand Down

0 comments on commit 8c50b52

Please sign in to comment.