supermanzer / NDBC

Repository for housing Python code for fetching, parsing, and loading NDBC data into a local Python object for analysis.
MIT License
13 stars 4 forks source link

Date pullfix #8

Closed pmclau04 closed 4 years ago

pmclau04 commented 4 years ago

Great code! Noticed that it was having trouble pulling data from before 2006 for a few stations of interest. I added some functionality to fix data pulling from pre-2006.

Also - I'm fairly new to git so apologies if I messed up!

supermanzer commented 4 years ago

Interesting. I re-purposed this code from an earlier implementation in MATLAB and I was able to pull all data from 1985 to 2014 for station NDBC 46042. However, if you've found a case where this isn't the case let's take a look!

BTW, this is still definitely a work in progress (see project/issues). I've got quite a few plans for this module and I'll update the PyPI version once I have the current ideas implemented.

pmclau04 commented 4 years ago

Was taking a look at NDBC station DPIA1 and was having some trouble pulling the older data. Seemed to work fine for that and some surrounding stations with the edits, but maybe mine was just a unique case.

Either way - super useful tool, thanks for sharing!

supermanzer commented 4 years ago

I appreciate the update but I changed the approach for the following reasons:

Therefore I changed the approach to use lists of URL patterns for both years and months. The __checkurl__ function was revised and __buildurls__ function was added to facilitate correct URL determination and usage. These modifications have been merged into master branch.

I'm glad you're finding this useful! I have a number of improvements in mind to facilitate both exploratory data analysis as well as integration into an automated data workflow. I hope to have most of the improvements committed to master by the end of the year.