abresler / gdeltr2

modern gdelt wrapper for r
https://asbcllc.com/gdeltr2
Other
61 stars 14 forks source link

Errors trying to run the tutorial #6

Closed jdanowski closed 4 years ago

jdanowski commented 4 years ago

I attempted to run: learning_to_program_with_gdeltr2.r and encountered errors.

R version 4.0.1 (2020-06-06) -- "See Things Now" Copyright (C) 2020 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details.

Natural language support but running in an English locale

R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R.

packages_to_install <-

  • c("devtools", "dplyr", "rlang", "tidyr", "purrr", "stringr", "lubridate",
  • "readr","tidyr", "ggplot2", "highcharter", "tidyverse", "tibble", "hrbrthemes",
  • "ggthemes", "jsonlite")

lapply(packages_to_install, install.packages, character.only = T) Error in install.packages : Updating loaded packages WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/ Installing package into ‘C:/Users/james/Desktop/Documents/R/win-library/4.0’ (as ‘lib’ is unspecified) trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/dplyr_1.0.0.zip' Content type 'application/zip' length 1302941 bytes (1.2 MB) downloaded 1.2 MB

package ‘dplyr’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in C:\Users\james\AppData\Local\Temp\RtmpoRW9yz\downloaded_packages WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/ Installing package into ‘C:/Users/james/Desktop/Documents/R/win-library/4.0’ (as ‘lib’ is unspecified)

There is a binary version available but the source version is later: binary source needs_compilation rlang 0.4.6 0.4.7 TRUE

Binaries will be installed trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/rlang_0.4.6.zip' Content type 'application/zip' length 1117248 bytes (1.1 MB) downloaded 1.1 MB

package ‘rlang’ successfully unpacked and MD5 sums checked Warning in install.packages : cannot remove prior installation of package ‘rlang’ Warning in install.packages : problem copying C:\Users\james\Desktop\Documents\R\win-library\4.0\00LOCK\rlang\libs\x64\rlang.dll to C:\Users\james\Desktop\Documents\R\win-library\4.0\rlang\libs\x64\rlang.dll: Permission denied Warning in install.packages : restored ‘rlang’

The downloaded binary packages are in C:\Users\james\AppData\Local\Temp\RtmpoRW9yz\downloaded_packages WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/ Installing package into ‘C:/Users/james/Desktop/Documents/R/win-library/4.0’ (as ‘lib’ is unspecified) trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/tidyr_1.1.0.zip' Content type 'application/zip' length 1514102 bytes (1.4 MB) downloaded 1.4 MB

package ‘tidyr’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in C:\Users\james\AppData\Local\Temp\RtmpoRW9yz\downloaded_packages WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/ Installing package into ‘C:/Users/james/Desktop/Documents/R/win-library/4.0’ (as ‘lib’ is unspecified) trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/purrr_0.3.4.zip' Content type 'application/zip' length 429884 bytes (419 KB) downloaded 419 KB

package ‘purrr’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in C:\Users\james\AppData\Local\Temp\RtmpoRW9yz\downloaded_packages WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/ Installing package into ‘C:/Users/james/Desktop/Documents/R/win-library/4.0’ (as ‘lib’ is unspecified) trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/stringr_1.4.0.zip' Content type 'application/zip' length 216792 bytes (211 KB) downloaded 211 KB

package ‘stringr’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in C:\Users\james\AppData\Local\Temp\RtmpoRW9yz\downloaded_packages WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/ Installing package into ‘C:/Users/james/Desktop/Documents/R/win-library/4.0’ (as ‘lib’ is unspecified) trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/lubridate_1.7.9.zip' Content type 'application/zip' length 1748364 bytes (1.7 MB) downloaded 1.7 MB

package ‘lubridate’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in C:\Users\james\AppData\Local\Temp\RtmpoRW9yz\downloaded_packages WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/ Installing package into ‘C:/Users/james/Desktop/Documents/R/win-library/4.0’ (as ‘lib’ is unspecified) trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/readr_1.3.1.zip' Content type 'application/zip' length 1716096 bytes (1.6 MB) downloaded 1.6 MB

package ‘readr’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in C:\Users\james\AppData\Local\Temp\RtmpoRW9yz\downloaded_packages WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/ Installing package into ‘C:/Users/james/Desktop/Documents/R/win-library/4.0’ (as ‘lib’ is unspecified) trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/tidyr_1.1.0.zip' Content type 'application/zip' length 1514102 bytes (1.4 MB) downloaded 1.4 MB

package ‘tidyr’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in C:\Users\james\AppData\Local\Temp\RtmpoRW9yz\downloaded_packages WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/ Installing package into ‘C:/Users/james/Desktop/Documents/R/win-library/4.0’ (as ‘lib’ is unspecified) trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/ggplot2_3.3.2.zip' Content type 'application/zip' length 4067278 bytes (3.9 MB) downloaded 3.9 MB

package ‘ggplot2’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in C:\Users\james\AppData\Local\Temp\RtmpoRW9yz\downloaded_packages WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/ Installing package into ‘C:/Users/james/Desktop/Documents/R/win-library/4.0’ (as ‘lib’ is unspecified) trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/highcharter_0.7.0.zip' Content type 'application/zip' length 3001981 bytes (2.9 MB) downloaded 2.9 MB

package ‘highcharter’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in C:\Users\james\AppData\Local\Temp\RtmpoRW9yz\downloaded_packages WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/ Installing package into ‘C:/Users/james/Desktop/Documents/R/win-library/4.0’ (as ‘lib’ is unspecified) trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/tidyverse_1.3.0.zip' Content type 'application/zip' length 440111 bytes (429 KB) downloaded 429 KB

package ‘tidyverse’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in C:\Users\james\AppData\Local\Temp\RtmpoRW9yz\downloaded_packages WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/ Installing package into ‘C:/Users/james/Desktop/Documents/R/win-library/4.0’ (as ‘lib’ is unspecified)

There is a binary version available but the source version is later: binary source needs_compilation tibble 3.0.2 3.0.3 TRUE

Binaries will be installed trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/tibble_3.0.2.zip' Content type 'application/zip' length 413689 bytes (403 KB) downloaded 403 KB

package ‘tibble’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in C:\Users\james\AppData\Local\Temp\RtmpoRW9yz\downloaded_packages WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/ Installing package into ‘C:/Users/james/Desktop/Documents/R/win-library/4.0’ (as ‘lib’ is unspecified) trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/hrbrthemes_0.8.0.zip' Content type 'application/zip' length 2326933 bytes (2.2 MB) downloaded 2.2 MB

package ‘hrbrthemes’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in C:\Users\james\AppData\Local\Temp\RtmpoRW9yz\downloaded_packages WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/ Installing package into ‘C:/Users/james/Desktop/Documents/R/win-library/4.0’ (as ‘lib’ is unspecified) trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/ggthemes_4.2.0.zip' Content type 'application/zip' length 440978 bytes (430 KB) downloaded 430 KB

package ‘ggthemes’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in C:\Users\james\AppData\Local\Temp\RtmpoRW9yz\downloaded_packages WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/ Installing package into ‘C:/Users/james/Desktop/Documents/R/win-library/4.0’ (as ‘lib’ is unspecified) trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/jsonlite_1.7.0.zip' Content type 'application/zip' length 1170880 bytes (1.1 MB) downloaded 1.1 MB

package ‘jsonlite’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in C:\Users\james\AppData\Local\Temp\RtmpoRW9yz\downloaded_packages [[1]] NULL

[[2]] NULL

[[3]] NULL

[[4]] NULL

[[5]] NULL

[[6]] NULL

[[7]] NULL

[[8]] NULL

[[9]] NULL

[[10]] NULL

[[11]] NULL

[[12]] NULL

[[13]] NULL

[[14]] NULL

[[15]] NULL

[[16]] NULL

devtools::install_github("hafen/trelliscopejs") Downloading GitHub repo hafen/trelliscopejs@master These packages have more recent versions available. It is recommended to update all of them. Which would you like to update?

1: All
2: CRAN packages only
3: None
4: rlang (0.4.6 -> 0.4.7) [CRAN] 5: pillar (1.4.4 -> 1.4.6) [CRAN] 6: pkgbuild (1.0.8 -> 1.1.0) [CRAN] 7: backports (1.1.7 -> 1.1.8) [CRAN] 8: processx (3.4.2 -> 3.4.3) [CRAN] 9: xfun (0.14 -> 0.15 ) [CRAN] 10: tibble (3.0.2 -> 3.0.3) [CRAN] 11: Rcpp (1.0.4.6 -> 1.0.5) [CRAN] 12: isoband (0.2.1 -> 0.2.2) [CRAN]

Enter one or more numbers, or an empty line to skip updates: devtools::install_github("abresler/gdeltr2") Enter one or more numbers, or an empty line to skip updates: 1 rlang (0.4.6 -> 0.4.7 ) [CRAN] pillar (1.4.4 -> 1.4.6 ) [CRAN] pkgbuild (1.0.8 -> 1.1.0 ) [CRAN] backports (1.1.7 -> 1.1.8 ) [CRAN] processx (3.4.2 -> 3.4.3 ) [CRAN] xfun (0.14 -> 0.15 ) [CRAN] tibble (3.0.2 -> 3.0.3 ) [CRAN] Rcpp (1.0.4.6 -> 1.0.5 ) [CRAN] isoband (0.2.1 -> 0.2.2 ) [CRAN] checkmate (NA -> 2.0.0 ) [CRAN] moments (NA -> 0.14 ) [CRAN] diptest (NA -> 0.75-7) [CRAN] mclust (NA -> 5.4.6 ) [CRAN] Installing 13 packages: rlang, pillar, pkgbuild, backports, processx, xfun, tibble, Rcpp, isoband, checkmate, moments, diptest, mclust Installing packages into ‘C:/Users/james/Desktop/Documents/R/win-library/4.0’ (as ‘lib’ is unspecified)

There are binary versions available but the source versions are later: binary source needs_compilation rlang 0.4.6 0.4.7 TRUE pillar 1.4.4 1.4.6 FALSE pkgbuild 1.0.8 1.1.0 FALSE backports 1.1.7 1.1.8 TRUE tibble 3.0.2 3.0.3 TRUE

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/processx_3.4.3.zip' Content type 'application/zip' length 1147666 bytes (1.1 MB) downloaded 1.1 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/xfun_0.15.zip' Content type 'application/zip' length 229776 bytes (224 KB) downloaded 224 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/Rcpp_1.0.5.zip' Content type 'application/zip' length 3265784 bytes (3.1 MB) downloaded 3.1 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/isoband_0.2.2.zip' Content type 'application/zip' length 3408747 bytes (3.3 MB) downloaded 3.3 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/checkmate_2.0.0.zip' Content type 'application/zip' length 699101 bytes (682 KB) downloaded 682 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/moments_0.14.zip' Content type 'application/zip' length 56099 bytes (54 KB) downloaded 54 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/diptest_0.75-7.zip' Content type 'application/zip' length 364327 bytes (355 KB) downloaded 355 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/mclust_5.4.6.zip' Content type 'application/zip' length 4630961 bytes (4.4 MB) downloaded 4.4 MB

package ‘processx’ successfully unpacked and MD5 sums checked Error: Failed to install 'trelliscopejs' from GitHub: (converted from warning) cannot remove prior installation of package ‘processx’

"My Text" == 'My Text' [1] TRUE

"My Text" == 'my text' [1] FALSE

Objects -----------------------------------------------------------------

Objects

my_favorite_team <-

  • "Brooklyn Nets"

favoriteNBAPlayerEver <-

  • "Mitch Richmond"

my_favorite_team [1] "Brooklyn Nets"

favoriteNBAPlayerEver [1] "Mitch Richmond"

my_family <-

  • c("Alex", "Liz", "Chase", "Theo") their_type <-
  • c("Adult", "Adult", "Toy Poodle", "Baby")

their_age <-

  • c(33, 32, 2, 0)

my_family [1] "Alex" "Liz" "Chase" "Theo" their_type [1] "Adult" "Adult" "Toy Poodle" "Baby"
their_age [1] 33 32 2 0

all_objects <- c(my_family, their_type,their_age) all_objects [1] "Alex" "Liz" "Chase" "Theo"
[5] "Adult" "Adult" "Toy Poodle" "Baby"
[9] "33" "32" "2" "0"

Data Frames -------------------------------------------------------------

Data Frame

library(dplyr)

Attaching package: ‘dplyr’

The following objects are masked from ‘package:stats’:

filter, lag

The following objects are masked from ‘package:base’:

intersect, setdiff, setequal, union

Warning message: package ‘dplyr’ was built under R version 4.0.2

df_bresler_family <-

  • data_frame(name = my_family, type = their_type, age = their_age) Warning message: data_frame() is deprecated as of tibble 1.1.0. Please use tibble() instead. This warning is displayed once every 8 hours. Call lifecycle::last_warnings() to see where this warning was generated.

df_bresler_family

A tibble: 4 x 3

name type age

1 Alex Adult 33 2 Liz Adult 32 3 Chase Toy Poodle 2 4 Theo Baby 0 View(df_bresler_family) ### Working with the API # api --------------------------------------------------------------------- library(gdeltr2) Error in library(gdeltr2) : there is no package called ‘gdeltr2’ ## Terms sports_terms <- + c('"Brooklyn Nets"', "Caris LeVert", '"Kyrie Irving" Trade', '"Luka Doncic"', + 'NBA "Draft Prospect"', '"Jarrett Allen"') political_terms <- + c('"Bill Perkins"', '"New York City" "City Counsel"') finance_real_estate_terms <- + c("Eastdil", "Condo Bubble", '"JBG Smith"', '"CPPIB"', "Anbang", + "WeWork", '"Goldman Sachs"' , 'Blackstone "Real Estate"') other_terms <- + c("Supergoop", '"LNG"', 'Maryland "High School Football"', + '"Jared Kushner"', '"Eddie Huang"') my_terms <- + c(sports_terms, political_terms, finance_real_estate_terms, other_terms) # domains ----------------------------------------------------------------- news_domains <- + c("nypost.com", "washingtonpost.com", "wsj.com", "gothamgazette.com") sports_domains <- + c("espn.com", "netsdaily.com") finance_real_estate_domains <- + c("realdeal.com", "zerohedge.com", "institutionalinvestor.com", 'pionline.com', + "curbed.com", "archdaily.com") random_domains <- + c("tmz.com", "snopes.com", "alphr.com", "oilprice.com") my_domains <- + c(news_domains, sports_domains, finance_real_estate_domains, random_domains) # GKG --------------------------------------------------------------------- df_gkg <- + get_gdelt_codebook_ft_api(code_book = "gkg") Error in get_gdelt_codebook_ft_api(code_book = "gkg") : could not find function "get_gdelt_codebook_ft_api" my_themes <- + c("ECON_WORLDCURRENCIES_CHINESE_YUAN", # stories about china's currency -- god way to find stories about china's economy + "ECON_BUBBLE", # articles about economic bubble + "TAX_FNCACT_BROKER", # articles about brokers of things + "ECON_HOUSING_PRICES", # articls about housing prices + "ECON_BITCOIN", # articles about bitcoin + "ELECTION_FRAUD", # articles about election fraud + "SOC_POINTSOFINTEREST_GOVERNMENT_BUILDINGS", # articles about government buildings + "WB_1277_BANKRUPTCY_AND_LIQUIDATION", # articles about bankruptcy + "WB_639_REPRODUCTIVE_MATERNAL_AND_CHILD_HEALTH", # articles about pregnancy and child health + "WB_2151_CHILD_DEVELOPMENT", # articles about child development + "TAX_FNCACT_BUILDER" # articles about builders + ) set.seed(1234) random_themes <- + df_gkg %>% pull(idGKGTheme) %>% sample(3) Error in eval(lhs, parent, parent) : object 'df_gkg' not found my_themes <- + c(my_themes, random_themes) Error: object 'random_themes' not found # OCR --------------------------------------------------------------------- my_ocr <- + c( + "Brooklyn Nets", + "Panerai", + "Four Seasons", + "NBA", + "Goldman Sachs", + "Philadelphia Eagles", + "Supergoop", + "Boston Celtics", + "Big Baller Brand", + "BBB", + "Boston Properties" + ) # imagetags --------------------------------------------------------------- df_imagetags <- + get_gdelt_codebook_ft_api(code_book = "imagetags") Error in get_gdelt_codebook_ft_api(code_book = "imagetags") : could not find function "get_gdelt_codebook_ft_api" View(df_imagetags) Error in View : object 'df_imagetags' not found my_image_tags <- + c("Toy Poodle", "poodle", "commercial building", "basketball player", "supermodel") # Image Web --------------------------------------------------------------- df_imageweb <- + get_gdelt_codebook_ft_api(code_book = "imageweb") Error in get_gdelt_codebook_ft_api(code_book = "imageweb") : could not find function "get_gdelt_codebook_ft_api" View(df_imageweb) Error in View : object 'df_imageweb' not found my_image_web <- + c("Jared Kushner", "Empire State Building", "New York City", "Ivanka Trump", + "Tesla Model 3", "Jeremy Lin", "NBA", "Brooklyn Nets" + ) # other_parameters -------------------------------------------------------- my_timespan <- + "36 Hours" df_countries <- + get_gdelt_codebook_ft_api(code_book = "countries") Error in get_gdelt_codebook_ft_api(code_book = "countries") : could not find function "get_gdelt_codebook_ft_api" View(df_countries) Error in View : object 'df_countries' not found my_trelliscope_parameters <- + list( + rows = 1, + columns = 2, + path = NULL + ) # Artlist ----------------------------------------------------------------- get_data_ft_v2_api( + terms = my_terms, + domains = my_domains, + images_web_tag = my_image_web, + images_tag = my_image_tags, + images_ocr = my_ocr, + maximum_records = + gkg_themes = my_themes, Error: unexpected '=' in: " maximum_records = gkg_themes =" modes = c("Artlist"), Error: unexpected ',' in " modes = c("Artlist")," timespans = my_timespan, Error: unexpected ',' in " timespans = my_timespan," trelliscope_parameters = my_trelliscope_parameters ) Error: unexpected ')' in ")" trelliscopeImage Error: object 'trelliscopeImage' not found # Timeline ----------------------------------------------------------------- get_data_ft_v2_api( + terms = my_terms, + domains = my_domains, + images_web_tag = my_image_web, + images_tag = my_image_tags, + images_ocr = my_ocr, + gkg_themes = my_themes, + modes = c("TimelineVolInfo"), + timespans = "12 Weeks", + trelliscope_parameters = my_trelliscope_parameters + ) Error in get_data_ft_v2_api(terms = my_terms, domains = my_domains, images_web_tag = my_image_web, : could not find function "get_data_ft_v2_api" trelliscopeHighcharter Error: object 'trelliscopeHighcharter' not found # wordclouds -------------------------------------------------------------- get_data_ft_v2_api( + terms = my_terms, + domains = my_domains, + images_web_tag = my_image_web, + images_tag = my_image_tags, + images_ocr = my_ocr, + gkg_themes = my_themes, + modes = c("WordCloudEnglish", "WordCloudTheme", "WordCloudImageTags", "WordCloudImageWebTags"), + timespans = "2 weeks", + trelliscope_parameters = list( + rows = 1, + columns = 1, + path = NULL + ) + ) Error in get_data_ft_v2_api(terms = my_terms, domains = my_domains, images_web_tag = my_image_web, : could not find function "get_data_ft_v2_api" trelliscopeWordcloud Error: object 'trelliscopeWordcloud' not found
abresler commented 4 years ago

This tutorial is years old and those functions are deprecated and should not be used.

Once the package is installed you should be able to run this code successfully.

library(gdeltr2)
library(tidyverse)

ft_v2_api(terms = c('"Corona Virus"'))
ft_trending_terms()
ft_terms_sentiment(terms = c('"Corona Virus"'))
jdanowski commented 4 years ago

How do I install the package? When I run this:

devtools::install_github("hafen/trelliscopejs") devtools::install_github("abresler/gdeltr2")

I get these errors:

devtools::install_github("hafen/trelliscopejs") Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : there is no package called ‘processx’ devtools::install_github("abresler/gdeltr2") Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : there is no package called ‘processx’

Searching I find that this may involve Rtools not being installed. Nevertheless, I downloaded rtool40 and installed it. Thanks for helping me get gdeltr2 installed properly!

On Tue, Jul 14, 2020 at 8:22 AM Alex Bresler notifications@github.com wrote:

This tutorial is years old and those functions are deprecated and should not be used.

Once the package is installed you should be able to run this code successfully.

library(gdeltr2) library(tidyverse)

ft_v2_api(terms = c('"Corona Virus"')) ft_trending_terms() ft_terms_sentiment(terms = c('"Corona Virus"'))

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/abresler/gdeltr2/issues/6#issuecomment-658176299, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANBIBMO5JGJJQTFELVVZELR3RL23ANCNFSM4OZCBL6A .

abresler commented 4 years ago

I am not sure what operating system you are using but it says you need processx try installing that and if it tells you packages are missing install the package the warning says is missing.