cwru-sdle / graphfoundationmodels

Code and demos for contructing Data-Driven Digital Twins of Photovoltaic & Advanced Manufacturing systems
https://mds3-coe.com/
BSD 2-Clause "Simplified" License
2 stars 1 forks source link

An automated function to download data from OSF #11

Open bgpierc opened 2 months ago

bgpierc commented 2 months ago

We are hosting data for this work on OSF at: https://osf.io/dvrc7/

It would be nice if we could write a (python) function to download this data as part of the package so users don't have to do this manually.

See also: https://github.com/cwru-sdle/pvplr/issues/1

bgpierc commented 2 months ago

@surajkmr4218 can you add your function for pulling data from OSF here too? as a module under util

surajkmr4218 commented 2 months ago

Created a new PR that addresses this

bgpierc commented 2 months ago

@surajkmr4218 Great, merged PR #15 . I also edited the module name a bit to make it more clear. I'm also looking for these modifications/features

Example desired usage

from graphfoundationmodels.util.io import OSF_download
data  = OSF_download('ss2001_CBOX_1', format='parquet', save_path = './')

In the code, you may want to create a dictionary for file URLS. For example:

name_dict = {'ss2001_CBOX_1': 'xcuvg',
...
}
name = 'ss2001_CBOX_1'
download_url = f'https://osf.io/{name}/download'