Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Host Dataset externally - plot_boxes #13

Open
srinidhi98 opened this issue Jun 28, 2023 · 2 comments
Open

Host Dataset externally - plot_boxes #13

srinidhi98 opened this issue Jun 28, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@srinidhi98
Copy link
Collaborator

Try to host dataset externally on any web server/cloud and use the URL to extract the data directly into dataFrame/download as a .csv file local repo.

@srinidhi98 srinidhi98 self-assigned this Jun 28, 2023
@srinidhi98 srinidhi98 added the enhancement New feature or request label Jun 28, 2023
@iingram
Copy link
Member

iingram commented Jul 3, 2023

I know that hosting on Kaggle is still amongst the options being considered but I do feel that that meaning there's the extra step for a fresh user of making an account on Kaggle to be able to do the data download is very plausibly a non-negligible barrier that we want to avoid. I am noting that to keep us thinking about it but I am certainly still game for seeing the full side-by-side that includes Kaggle as an option and fully weighing the pros and cons.

@srinidhi98
Copy link
Collaborator Author

For Kaggle, yes the user must have

  • account created because Kaggle username is required

  • Dataset name

sample code:
from zipfile import ZipFile
import pandas as pd
from kaggle.api.kaggle_api_extended import KaggleApi# Initialize Kaggle API
api = KaggleApi()
api.authenticate()# authenticate the owner's name and dataset
dataset_loc = 'srinidhiyerabati/Test-box-plots'# username/Dataset name on Kaggle
api.dataset_download_files(dataset_loc)# download
zip_file_path = '/home/srinidhiyerbati/Desktop/Srinidhi_Yerabati/animl-py/animl-py/Test-box-plots.zip'

Extract the zip file

with ZipFile(zip_file_path, 'r') as zip_ref:
zip_ref.extractall('/home/srinidhiyerbati/Desktop/Srinidhi_Yerabati/animl-py/animl-py/')
file_path = '/home/srinidhiyerbati/Desktop/Srinidhi_Yerabati/animl-py/animl-py/detections_plotBoxes.csv'
df = pd.read_csv(file_path)
print(df.head())

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants