benyamindsmith / starBliss

Create beautiful, print quality maps of the night sky in R
43 stars 2 forks source link

Call json files from package, not repository #4

Open laresbernardo opened 1 year ago

laresbernardo commented 1 year ago

Ideally, load the json files from the data directory instead of downloading from the repository. That way users don't have to deal with internet connection to use your package. Also, try to follow data usage best practices in an R package.

benyamindsmith commented 1 year ago

@laresbernardo Thank you for all the issues you posted so far! They are all really helpful!

Loading the files from the data directory instead of downloading from the repository would be much better. However it doesn't solve the internet connection problem fully as it is the geocoding is done with tidygeocoder and uses the ArcGIS API.

I'll still look into fixing this issue.

benyamindsmith commented 1 year ago

@laresbernardo Check out this fix

laresbernardo commented 1 year ago

Oops:

Error: Cannot open "data/constellations.lines.json"; The file doesn't seem to exist.
laresbernardo commented 1 year ago

Try something like this instead: file <- system.file("inst/docs", "yourfile", package = "starBliss")

benyamindsmith commented 1 year ago

@laresbernardo check this

benyamindsmith commented 8 months ago

@laresbernardo let me know if this is ok. Otherwise I will be closing this issue soon