Downloading
This module has tools for making packages that can reproducibly download and parse data.
- bio2bel.downloading.make_downloader(url, path)[source]
Make a function that downloads the data for you, or uses a cached version at the given path.
- bio2bel.downloading.make_json_getter(data_url, data_path)[source]
Build a function that handles downloading JSON data and parsing it.
- bio2bel.downloading.make_df_getter(data_url, data_path, **kwargs)[source]
Build a function that handles downloading tabular data and parsing it into a pandas DataFrame.
- bio2bel.downloading.make_zipped_df_getter(data_url, data_path, zip_path, **kwargs)[source]
Build a function that handles downloading data inside a zip folder and parsing it into a pandas DataFrame.
- Parameters
data_url (
str
) – The URL of the datadata_path (
str
) – The path where the data should get storedzip_path (
str
) – The path to the data inside the zip folderkwargs – Any other arguments to pass to
pandas.read_csv()