Skip to content

Instantly share code, notes, and snippets.

View abresler's full-sized avatar

Alex Bresler abresler

View GitHub Profile
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 3.
typeFile,isActiveForeignPrincipal,countryForeignPrincipal,nameForeignPrincipal,nameRegistrant,countDaysActiveForeignPrincipalFARA,dateRegistrationForeignPrincipal,dateTerminationForeignPrincipal,locationForeignPrincipal,nameForeignPrincipalDetail,idFARA,dateRegistration,addressStreet1ForeignPrincipal,nameRegistrantDetail,addressStreet2ForeignPrincipal,cityForeignPrincipal,stateForeignPrincipal,zipcodeForeignPrincipal,urlFARA
FARA_All_ForeignPrincipals,TRUE,CHINA,"VIRGO STAR, INC. ON BEHALF OF CRRC NORTH AMERICA, INC.",CROSSROADS STRATEGIES LLC,NA,2019-07-18,NA,"ONE ROCKELLER PLAZA SUITE 2802 NEW YORK, NY 10020",NA,6702,2019-07-18,ONE ROCKELLER PLAZA,NA,SUITE 2802,NEW YORK,NY,10020,https://efile.fara.gov/bulk/zip/FARA_All_ForeignPrincipals.xml.zip
FARA_All_ForeignPrincipals,TRUE,CHINA,"IFLYTEK CO., LTD. THROUGH PILLSBURY WINTHROP SHAW PITTMAN LLP","CHARTWELL STRATEGY GROUP, LLC",NA,2019-06-28,NA,"HEFEI CITY, NO. 666 WANGJIANG ROAD WEST ANHUI PROVINCE",NA,6518,2018-02-02,"HEFEI CITY, NO. 666 WANGJIANG ROAD WEST
We can make this file beautiful and searchable if this error is corrected: It looks like row 7 should actually have 16 columns, instead of 2. in line 6.
isUncompletedTransaction,typeTransaction,yearTransaction,monthTransaction,dateInvestment,nameEntityChinese,nameEntityInvestment,amountInvestment,pctShare,sectorInvestment,subSectorInvestment,countryInvestment,regionInvestment,isBRI,isGreenfield,amountEnterpriseValueEntity
FALSE,FOREIGN INVESTMENTS,2005,JANUARY,2005-01-01,MINMETALS,CUBAPETROLEO,"$500,000,000", NA,METALS,NA,CUBA,NORTH AMERICA,FALSE,TRUE,"NA"
FALSE,FOREIGN INVESTMENTS,2005,JANUARY,2005-01-01,CHINA ACADEMY OF SCIENCES,IBM,"$1,740,000,000", NA,TECHNOLOGY,NA,USA,USA,FALSE,FALSE,"NA"
FALSE,FOREIGN INVESTMENTS,2005,FEBRUARY,2005-02-01,MINMETALS,CODELCO,"$550,000,000",50.00%,METALS,COPPER,CHILE,SOUTH AMERICA,FALSE,TRUE,"$1,100,000,000"
FALSE,FOREIGN INVESTMENTS,2005,MARCH,2005-03-01,MCC,HIGHLANDS PACIFIC,"$670,000,000",85.00%,METALS,STEEL,PAPUA NEW GUINEA,EAST ASIA,FALSE,TRUE,"$788,235,294"
FALSE,FOREIGN INVESTMENTS,2005,APRIL,2005-04-01,CNOOC,MEG ENERGY,"$130,000,000",17.00%,ENERGY,OIL,CANADA,NORTH AMERICA,FALSE,FALSE,"$764,705,882"
FALSE,FOREIGN INV
We can't make this file beautiful and searchable because it's too large.
dateTransaction,sectorInvestment,typeDirection,typeStake,typeInvestment,typeInvestor,countryInvestor,stateInvestment,amountInvestment,monthTransaction,yearTransaction,amountInvestmentCumulativeQuarter,typeStrategy,stateInvestor,isGreenfield
2018-02-01,Information and Communications Technology (ICT),us-china,Controlling,Greenfield,Private,usa,Inner Mongolia,"$160,000,000",2,2018,"$160,000,000",Strategic,CA,TRUE
2018-02-01,Information and Communications Technology (ICT),us-china,Controlling,Greenfield,Private,usa,Beijing,"$160,000,000",2,2018,"$160,000,000",Strategic,CA,TRUE
2018-02-01,Information and Communications Technology (ICT),us-china,Controlling,Greenfield,Private,usa,Shanghai,"$160,000,000",2,2018,"$160,000,000",Strategic,CA,TRUE
2018-02-01,Information and Communications Technology (ICT),us-china,Controlling,Greenfield,Private,usa,Sichuan,"$160,000,000",2,2018,"$160,000,000",Strategic,CA,TRUE
2018-01-01,Automotive,us-china,Minority,Greenfield,Private,usa,Chongqing,"$120,000,000",1,2018,"$60,000,000",St
We can't make this file beautiful and searchable because it's too large.
dateTransaction,sectorInvestment,typeDirection,typeStake,typeInvestment,typeInvestor,countryInvestor,stateInvestment,amountInvestment,monthTransaction,yearTransaction,amountInvestmentCumulativeQuarter,typeStrategy,stateInvestor,isGreenfield
2018-02-01,Information and Communications Technology (ICT),us-china,Controlling,Greenfield,Private,usa,Inner Mongolia,"$160,000,000",2,2018,"$160,000,000",Strategic,CA,TRUE
2018-02-01,Information and Communications Technology (ICT),us-china,Controlling,Greenfield,Private,usa,Beijing,"$160,000,000",2,2018,"$160,000,000",Strategic,CA,TRUE
2018-02-01,Information and Communications Technology (ICT),us-china,Controlling,Greenfield,Private,usa,Shanghai,"$160,000,000",2,2018,"$160,000,000",Strategic,CA,TRUE
2018-02-01,Information and Communications Technology (ICT),us-china,Controlling,Greenfield,Private,usa,Sichuan,"$160,000,000",2,2018,"$160,000,000",Strategic,CA,TRUE
2018-01-01,Automotive,us-china,Minority,Greenfield,Private,usa,Chongqing,"$120,000,000",1,2018,"$60,000,000",St
docname from to pre keyword post pattern
Adams-1825 5601 5601 of the Pacific and to China still require that the protecting china
Jackson-1831 3907 3907 restrictions may impose . To China and the East Indies our china
van Buren-1838 10469 10469 trade of the Indian and China seas , in the whale china
van Buren-1840 8568 8568 on its way to the China and Indian seas for the china
Tyler-1843 3868 3868 from the United States to China in August of the present china
Tyler-1843 3905 3905 , on his route to China . In regard to the china
Tyler-1843 7229 7229 , the American minister to China , on board . There china
Polk-1845 9090 9090 . The commissioner appointed to China during the special session of china
Polk-1845 9198 9198 concluded with the Emperor of China . Since the return of china
library(asbmisc)
library(nbastatR)
library(tidyverse)
nbastatR::teams_players_stats(seasons = 2019, tables = "clutch", modes = "Totals")
dict_players <- nbastatR::nba_players()
dataClutchPlayers %>%
filter(fga > 20) %>%
left_join(dict_players %>% select(idPlayer, urlPlayerPhoto)) %>%
We can't make this file beautiful and searchable because it's too large.
codeProductOrService,descriptionProductOrService,dateStart,dateEnd,descriptionFullProductService,exclusionsProductService,notesProductService,includesProductService
10,WEAPONS,NA,NA,NA,NA,"THIS GROUP INCLUDES COMBAT WEAPONS AS WELL AS WEAPON-LIKE NONCOMBAT ITEMS, SUCH AS LINE THROWING DEVICES AND PYROTECHNIC PISTOLS. ALSO INCLUDED IN THIS GROUP ARE WEAPON NEUTRALIZING EQUIPMENT, SUCH AS DEGAUSSERS, AND DECEPTION EQUIPMENT, SUCH AS CAMOUFLAGE NETS. EXCLUDED FROM THIS GROUP ARE FIRE CONTROL AND NIGHT DEVICES CLASSIFIABLE IN GROUPS 12 OR 58.",NA
1000,NA,2012-12-03,2010-01-06,NA,NA,NA,NA
1005,"GUNS, THROUGH 30MM",2010-01-11,NA,"GUNS, THROUGH 30 MM","TURRETS, AIRCRAFT.",NA,"MACHINE GUNS; BRUSHES, MACHINE GUN AND PISTOL."
1005,"GUNS, THROUGH 30 MM",NA,NA,"GUNS, THROUGH 30 MM","TURRETS, AIRCRAFT.",NA,"MACHINE GUNS; BRUSHES, MACHINE GUN AND PISTOL."
1010,"GUNS, OVER 30MM UP TO 75MM",2010-01-11,NA,"GUNS, OVER 30 MM UP TO 75 MM",NA,NA,"BREECH MECHANISMS; MOUNTS GRENADE LAUNCHERS FOR INTEGRAL-CARTRIDGE GRENADES, SINGL
codeProductOrService,descriptionProductOrService,dateStart,dateEnd,descriptionFullProductService,exclusionsProductService,notesProductService,includesProductService
10,WEAPONS,NA,NA,NA,NA,"THIS GROUP INCLUDES COMBAT WEAPONS AS WELL AS WEAPON-LIKE NONCOMBAT ITEMS, SUCH AS LINE THROWING DEVICES AND PYROTECHNIC PISTOLS. ALSO INCLUDED IN THIS GROUP ARE WEAPON NEUTRALIZING EQUIPMENT, SUCH AS DEGAUSSERS, AND DECEPTION EQUIPMENT, SUCH AS CAMOUFLAGE NETS. EXCLUDED FROM THIS GROUP ARE FIRE CONTROL AND NIGHT DEVICES CLASSIFIABLE IN GROUPS 12 OR 58.",NA
1000,NA,2012-12-03,2010-01-06,NA,NA,NA,NA
1005,"GUNS, THROUGH 30MM",2010-01-11,NA,"GUNS, THROUGH 30 MM","TURRETS, AIRCRAFT.",NA,"MACHINE GUNS; BRUSHES, MACHINE GUN AND PISTOL."
1005,"GUNS, THROUGH 30 MM",NA,NA,"GUNS, THROUGH 30 MM","TURRETS, AIRCRAFT.",NA,"MACHINE GUNS; BRUSHES, MACHINE GUN AND PISTOL."
1010,"GUNS, OVER 30MM UP TO 75MM",2010-01-11,NA,"GUNS, OVER 30 MM UP TO 75 MM",NA,NA,"BREECH MECHANISMS; MOUNTS GRENADE LAUNCHERS FOR INTEGRAL-CARTRIDGE GRENADES, SINGL
library(gdeltr2)
terms <- c("Jarrett Allen", "Brooklyn Nets")
domains <- c("netsdaily.com")
dates <- generate_dates(start_date = "2019-01-01", end_date = Sys.Date(), time_interval = "days")
get_data_ft_v2_api(terms = terms, domains = domains, visualize_results = F, dates = dates, modes = "artlist")
library(tidyverse)
library(nbastatR) # devtools::install_github("abresler/nbastatR")
df_player_dict <-
nbastatR::get_bref_player_dictionary() %>%
filter(!is.na(countSeasons))
df_roty_winners <-
nbastatR::get_bref_awards(awards = c("Rookie of the Year"))
all_data <-