-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removing trackdown and acledexamples mentions
- Loading branch information
Showing
12 changed files
with
40 additions
and
111 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-1.24 KB
vignettes/articles/.trackdown/acled_deletions_api.Rmd-chunk_info.rds
Binary file not shown.
Binary file removed
BIN
-305 Bytes
vignettes/articles/.trackdown/acled_deletions_api.Rmd-header_info.rds
Binary file not shown.
Binary file removed
BIN
-1.16 KB
vignettes/articles/.trackdown/acled_transformations.Rmd-chunk_info.rds
Binary file not shown.
Binary file removed
BIN
-304 Bytes
vignettes/articles/.trackdown/acled_transformations.Rmd-header_info.rds
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -114,13 +114,28 @@ As is common when executing API calls, handling large volumes of data requires s | |
|
||
Imagine you are interested in events from “Brazil” occurring between January 1st, 2022, and December 1st, 2022. | ||
|
||
```{r} | ||
```{r, eval = FALSE} | ||
library(acledR) | ||
library(dplyr) | ||
#Note: This is simply an example–you will need to include your own credentials rather than the email and key placeholders that are included below. | ||
acled_access(email = "your_email", key = "your_key") | ||
df_br <- acled_api(country = c("Brazil"), | ||
start_date = "2022-01-01", | ||
end_date = "2022-12-01", | ||
monadic = F, | ||
acled_access = TRUE, | ||
prompt = F) | ||
``` | ||
```{r,echo=FALSE} | ||
library(acledR) | ||
library(dplyr) | ||
#Note: This is simply an example–you will need to include your own credentials rather than the email and key placeholders that are included below. | ||
acled_access(email = "[email protected]", key = "M3PWwg3DIdhHMuDiilp5") | ||
acled_access(email = Sys.getenv("EMAIL_ADDRESS_EXAMPLES"), key = Sys.getenv("EXAMPLES_KEY")) | ||
df_br <- acled_api(country = c("Brazil"), | ||
start_date = "2022-01-01", | ||
|
@@ -130,6 +145,8 @@ df_br <- acled_api(country = c("Brazil"), | |
prompt = F) | ||
``` | ||
|
||
|
||
|
||
This returns a tibble that includes each ACLED event in “Brazil” during the specified period: | ||
|
||
```{r} | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -119,11 +119,11 @@ In this section you can walk through a potential use case for the transformation | |
|
||
For this example, assume that you are interested in data from “South America” during the first half of 2023. **NOTE**: The email and key values below are only examples. You should provide your own credentials that you can create by using [ACLED’s website](https://apidocs.acleddata.com/get_started.html#getting-your-api-key). | ||
|
||
```{r} | ||
```{r, eval = False} | ||
library(acledR) | ||
acled_access(email = "[email protected]", key = "M3PWwg3DIdhHMuDiilp5") | ||
acled_access(email = "your_email", key = "your_key") | ||
df_sa <- acled_api(regions = "South America", | ||
start_date = "2023-01-01", | ||
|
@@ -132,7 +132,19 @@ df_sa <- acled_api(regions = "South America", | |
acled_access = TRUE, | ||
prompt = F) | ||
``` | ||
```{r, echo=FALSE} | ||
library(acledR) | ||
acled_access(email = Sys.getenv("EMAIL_ADDRESS_EXAMPLES"), key = Sys.getenv("EXAMPLES_KEY")) | ||
df_sa <- acled_api(regions = "South America", | ||
start_date = "2023-01-01", | ||
end_date = "2023-06-01", | ||
monadic = F, | ||
acled_access = TRUE, | ||
prompt = F) | ||
``` | ||
Now that your data are in long format with one actor per row, you can much more easily filter the data to retain only those events involving the "Military Forces of Colombia (2022-)": | ||
|
||
```{r} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -90,9 +90,14 @@ library(lubridate) | |
library(dplyr) | ||
``` | ||
|
||
```{r} | ||
```{r, eval=FALSE} | ||
acled_access(email = "[email protected]", key = "M3PWwg3DIdhHMuDiilp5") # This is an example, you will need to input your credentials. | ||
argen_dummy_acled_file <- acledR::acled_old_dummy # Here is our old personal ACLED dataset | ||
``` | ||
```{r, echo=FALSE} | ||
acled_access(email = Sys.getenv("EMAIL_ADDRESS_EXAMPLES"), key = Sys.getenv("EXAMPLES_KEY")) # This is an example, you will need to input your credentials. | ||
argen_dummy_acled_file <- acledR::acled_old_dummy # Here is our old personal ACLED dataset | ||
``` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,7 +54,7 @@ Once you are registered, we encourage you to authenticate your credentials by us | |
acled_access(email = "[email protected]", key = "M3PWwg3DIdhHMuDiilp5") # This is an example, you will need to input your credentials. | ||
``` | ||
|
||
```{r} | ||
```{r,echo=FALSE} | ||
acled_access(email = Sys.getenv("EMAIL_ADDRESS_EXAMPLES"), key = Sys.getenv("EXAMPLES_KEY")) | ||
``` | ||
|
||
|