install.packages("remotes", repos = "https://cran.rstudio.com") remotes::install_github("JohnCoene/chirp") # install chirp::build_nest() # create config file chirp::check_nest() # check config file chirp::chirp() # launch
Note that the app may not launch dependeing on whether you have used rtweet in the past, if it does not go to the Configure section to understand why.
Chirp is written in R, the programming language must thus be installed on your machine. Once installed follow the instructions below to setup a working Chirp platform on your local machine.
First, create an empty directory where to host Chirp.
mkdir chirp cd ./chirp
Chirp is hosted on Github and can be installed using the
install.packages("remotes", repos = "https://cran.rstudio.com") remotes::install_github('JohnCoene/chirp')
R -e "install.packages('remotes', repos = 'https://cran.rstudio.com');\remotes::install_github('JohnCoene/chirp')"
Now we can initialise Chirp. Make sure you are running this from the root of the directory where you want the application hosted. The command below will create a default configuration file called
_chirp.yml and open it in your terminal or RStudio IDE.
R -e "chirp::build_nest()"
The configuration file (
_chirp.yml) allows you to customise Chirp and hold Twitter credentials.
The credentials are somewhat particular, either:
- You have already used the
rtweetpackage in which case Chirp will use your internally saved credentials: you can thus jump straight to the Check section.
- You have never used
rtweeton your machine; simply follow along to get setup.
There is probably a third possibility, the above confuses you as you are not familiar with R or
rtweet in which case keep reading.
You can obtain the keys and tokens mentioned in
credentials by heading to apps.twitter.com and creating an application. Fill in the form however you see fit, the only thing of importance is to fill in the "Callback URLs" with
With that done head to the "Keys and tokens" tab where you should find the information required in
credentials: consumer_key: xXxxXXxxxxXXxxX consumer_secret: xXxxXXxxxxXXxxX access_token: xXxxXXxxxxXXxxX access_secret: xXxxXXxxxxXXxxX
Before we launch Chirp we can make sure that Chirp can run. The function below will print helpful messages to the console if issues are found.
R -e "chirp::check_nest()"
You can now run Chirp.
R -e "chirp::chirp()"
The above will open your browser and you'll be ready to use Chirp.