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

Cannot follow the actions taken in the tutorial using RStudio #1

Open
Iowastater opened this issue Oct 23, 2024 · 9 comments
Open

Cannot follow the actions taken in the tutorial using RStudio #1

Iowastater opened this issue Oct 23, 2024 · 9 comments

Comments

@Iowastater
Copy link

Hello Rami, I took your tutorial last week, and am trying to follow along with the recording.

I learned R on base R 20 years ago. Now, I work with RStudio or base R. I am not able to follow along with your demo. See questions in the Word doc attached – they may not make sense, because I don’t know how to describe your application in the video. It looks like you built a website that runs R code?

I would appreciate it if you can describe where the R scripts are to run your video actions using base R or RStudio.

Thank you, Paul Prew

Rstudio can't run code.docx
TS_cluster_inR.zip

@RamiKrispin
Copy link
Owner

Hi Paul,

I run my R code inside VScode using a Docker container to set the environment. You can run it with Rstudio, but you will need to set up the required environment. Here is the list of libraries I am using to set up the environment:
https://github.com/RamiKrispin/ts-cluster-analysis-r/blob/main/docker/setting_files/packages.json

In addition, you will need to install Quarto. Once you have the environment set, here are the steps to create the data and features:

You can skip those steps and load the data directly from the data folder.

Hope this helps.

@Iowastater
Copy link
Author

Iowastater commented Oct 24, 2024 via email

@RamiKrispin
Copy link
Owner

All the data used in the workshop should be stored in the repository data folder. The error you are getting is related to the eia_metadata function from the EIAapi library. Here is how it is being used in the notebook:

meta_gas_raw <- eia_metadata(
    api_path = "natural-gas/cons/sum/data/facet/parent",
    api_key = api_key
)

Please make sure that you register to the API and you have a valid API key and assign it to the api_key variable.

@Iowastater
Copy link
Author

Iowastater commented Oct 25, 2024 via email

@RamiKrispin
Copy link
Owner

It seems that the library is either not install or not loaded, try to run the following before:

library(EIAapi)

@Iowastater
Copy link
Author

Iowastater commented Oct 28, 2024 via email

@Iowastater
Copy link
Author

Iowastater commented Oct 28, 2024 via email

@RamiKrispin
Copy link
Owner

The data is available in the repo under the data folder. Per my above comment:

Please make sure that you register to the API and you have a valid API key and assign it to the api_key variable.

@Iowastater
Copy link
Author

Iowastater commented Oct 29, 2024 via email

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

No branches or pull requests

2 participants