From 7e16e8592ada30b565dbbdf6d90ab6449c476113 Mon Sep 17 00:00:00 2001 From: f-hafner Date: Fri, 4 Nov 2022 14:02:07 +0000 Subject: [PATCH] drop graduates with ed. degrees --- DESCRIPTION | 2 +- R/get_proquest.R | 3 + R/tools/setup_db_tests.R | 12 +- README.md | 2 +- data-raw/DATASET.R | 2 +- inst/extdata/AcademicGraph.sqlite | Bin 131072 -> 147456 bytes magutils.Rproj | 1 - tests/testthat/mock_db/SELECT-1aa0ce.R | 190 ++++++++++++------ tests/testthat/mock_db/SELECT_-052c29.R | 4 + .../{SELECT_-ad0113.R => SELECT_-64c4e4.R} | 0 tests/testthat/mock_db/SELECT_-a24ff2.R | 4 - tests/testthat/test-example.R | 2 +- 12 files changed, 145 insertions(+), 77 deletions(-) create mode 100644 tests/testthat/mock_db/SELECT_-052c29.R rename tests/testthat/mock_db/{SELECT_-ad0113.R => SELECT_-64c4e4.R} (100%) delete mode 100644 tests/testthat/mock_db/SELECT_-a24ff2.R diff --git a/DESCRIPTION b/DESCRIPTION index 3d9d63d..4d09021 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -8,7 +8,7 @@ Description: Functions to extract, transform and load data on PhD and their License: MIT + file LICENSE Encoding: UTF-8 Roxygen: list(markdown = TRUE) -RoxygenNote: 7.2.0 +RoxygenNote: 7.2.1 Imports: DBI, dbplyr, diff --git a/R/get_proquest.R b/R/get_proquest.R index dc5c042..a2d4c0c 100644 --- a/R/get_proquest.R +++ b/R/get_proquest.R @@ -46,7 +46,10 @@ get_proquest <- function(conn, from, start_year = 1985, end_year = 2005, ...) { " us_universities <- dplyr::tbl(conn, dbplyr::sql(query_keep_us)) + special_degrees <- c("Psy.D.", "Ed.D.", "D.Ed.") # relevant for psyschology + graduates <- dplyr::tbl(conn, "pq_authors") %>% + dplyr::filter(!(.data$degree_level %in% special_degrees)) %>% dplyr::inner_join(us_universities, by = "university_id") %>% dplyr::filter(.data$degree_year >= start_year & .data$degree_year <= end_year) diff --git a/R/tools/setup_db_tests.R b/R/tools/setup_db_tests.R index 5947e6e..0513c6d 100644 --- a/R/tools/setup_db_tests.R +++ b/R/tools/setup_db_tests.R @@ -56,7 +56,7 @@ capture_mockdb(production_db = db_file, limit = 1, lazy = FALSE) ) -files <- c("SELECT-db1387", "SELECT-1aa0ce") +files <- c("SELECT-db1387", "SELECT-1aa0ce", "SELECT-1aa0ce") purrr::map(files, .f = ~copy_fixture( origin = mock_origin, @@ -88,12 +88,13 @@ capture_mockdb(production_db = db_file, ) # Note: some of these here are now deleted and do not exist anymore.. need to clean up! -files <- c("SELECT-6db156", - "SELECT-f49f96", +files <- c("SELECT_-64c4e4", "SELECT-276cf8", + "SELECT-6db156", "SELECT-7c7feb", "SELECT-dfa715", - "SELECT_-ad0113") + "SELECT-f49f96" + ) purrr::map(files, .f = ~copy_fixture( @@ -110,8 +111,7 @@ capture_mockdb(production_db = db_file, ) # Note: some of these here are now deleted and do not exist anymore.. need to clean up! -files <- c("SELECT-124fb3", "SELECT_-a24ff2") - +files <- c("SELECT-124fb3", "SELECT_-052c29") purrr::map(files, .f = ~copy_fixture( origin = mock_origin, diff --git a/README.md b/README.md index 89dc55f..4aab970 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ library(magutils) db_file <- db_example("AcademicGraph.sqlite") conn <- connect_to_db(db_file) #> The database connection is: -#> src: sqlite 3.38.5 [/tmp/RtmpOOS3Cx/temp_libpath3eff04106586a/magutils/extdata/AcademicGraph.sqlite] +#> src: sqlite 3.39.3 [/tmp/RtmpfnS8S0/temp_libpath1e5445e211e0e/magutils/extdata/AcademicGraph.sqlite] #> tbls: author_coauthor, author_output, AuthorAffiliation, current_links, #> current_links_advisors, FieldsOfStudy, FirstNamesGender, pq_advisors, #> pq_authors, pq_fields_mag, pq_unis diff --git a/data-raw/DATASET.R b/data-raw/DATASET.R index 3cc1979..a4d1ccf 100644 --- a/data-raw/DATASET.R +++ b/data-raw/DATASET.R @@ -96,7 +96,7 @@ purrr::map(idx_cla, ## 2. proquest authors / advisors qry <- paste0(" - SELECT goid, firstname, degree_year, university_id + SELECT goid, firstname, degree_year, degree_level, university_id FROM pq_authors WHERE goid IN (", paste(pq_ids, collapse = ", "), ")" diff --git a/inst/extdata/AcademicGraph.sqlite b/inst/extdata/AcademicGraph.sqlite index 63af1821e2491a15d5a32a4dcc91103586167aae..c49d96d77b123d8bd1c8ddf0f0cc7e6debcd5b62 100644 GIT binary patch literal 147456 zcmeHw378bswSQMvcUNy!cYvAc8HQmRhCwEPRQ29bG9p2OAfR9bMVn@(hiMq5hwd3* zP&CttS%^kWVl*0;#N-(h*Cfwq9tPYaZp7VeVxoERB@ts{%;Jmxb8g+*y21C)_ws$u z#M|EobIcns#cx6tTtHC7*uH&LnmrK~@a=B)}KlT&; z3;~ZJ!C%1^K0*-kI6Bwn#n=X_67`=h?Il-{_bbmz6MbLt&G-JyJEn}uKb1Fy9t^FP zeZgmf$9oQX=8KPs)7;m(JB9PZ1=lM_$o}tv$6Kl&lp@+u!g!%L)K}P1?AwtW$t@Ti z87P&P^ldB^`+7&q<-*WNZm>ACxgst+WzmAwi=wA4Uvl!Pi=s=Ge{j*7XnmUKisixR zJNz7ZMrRqtMHj4EI46pQVyJt3a`kvAvS79_eyUlwd~eCD-NKTQFi-27>n-VlsYj~i z;Zqy6t;wafURH6mb~~#Jq{wWj-0YG3hQUHj;u^7?)oAsC!71J2-PIl`a@0{mb%Oo!^%Rb>+YWo_y5c)tI9`Q$$&`wf`Qbu&VQF+|#EGvi zjpPSUD3!P8%Y6%rBl(eHX{chV1iJ^TACMwl^MvsU7F+q;g8u&Epw2lB7HPW4th!d$ z&NEdYCt9Zt>+9j;tc2ws}kt~$g>nM*lFIC4&tIMkOh>ZjlaHcid$p-5+sBNpd z%FT)D&DT^tR*KAnDz2r?SC>&8(Bf>yy7+f&N=G%!hM{fhXyst{hH6}jw6zK2ZM0s) zTXUmB#R~i5ch-TStYpyJRw!4BBV)N@pRb$!96huy)Z8=Ym&TN|nx%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N)$HNZn?ehSGj&+bJLc&eedR<=Wadx^fm7NY~NDl hxx-`s%e}*KclLK(=GyqSEqC-^x=udk_3c4z{{vMX5b6K` diff --git a/magutils.Rproj b/magutils.Rproj index a9e8c51..69fafd4 100644 --- a/magutils.Rproj +++ b/magutils.Rproj @@ -18,6 +18,5 @@ LineEndingConversion: Posix BuildType: Package PackageUseDevtools: Yes -PackageCleanBeforeInstall: Yes PackageInstallArgs: --no-multiarch --with-keep.source PackageRoxygenize: rd,collate,namespace diff --git a/tests/testthat/mock_db/SELECT-1aa0ce.R b/tests/testthat/mock_db/SELECT-1aa0ce.R index 09346e0..4cb39e4 100644 --- a/tests/testthat/mock_db/SELECT-1aa0ce.R +++ b/tests/testthat/mock_db/SELECT-1aa0ce.R @@ -11,23 +11,28 @@ structure(list(type = c("table", "index", "table", "index", "table", "index", "table", "index", "table", "index", "table", "index", "table", "index", "table", "index", "table", "index", "table", "index", "table", "index", "table", "index", "table", "index", -"table", "index", "index", "table", "table", "table", "table", -"table", "table", "index", "table", "index", "index", "table", -"table", "table", "index", "table", "index", "index", "index", -"table", "index", "index", "index", "table", "index", "table", +"table", "table", "table", "table", "table", "table", "index", +"table", "index", "index", "table", "table", "table", "index", +"table", "index", "index", "index", "table", "table", "index", +"table", "index", "table", "table", "index", "table", "index", +"table", "index", "table", "index", "table", "index", "table", +"index", "table", "index", "table", "index", "index", "table", "index", "table", "index", "index", "table", "index", "table", -"index", "table", "index", "table", "index", "table", "index", -"index"), name = c("Authors", "idx_a_AuthorId", "Papers", "idx_p_PaperId", -"FieldsOfStudy", "idx_fos_FieldOfStudyId", "FieldOfStudyChildren", -"idx_fosc_FieldOfStudyId", "PaperFieldsOfStudy", "idx_pfos_PaperIdFoS", -"PaperAuthorAffiliations", "idx_paa_PaperIdAuthorIdAffiliationId", -"PaperReferences", "idx_pr_PaperIdReferenceId", "Affiliations", -"idx_a_AffiliationId", "FirstNames", "idx_fn_FirstName", "idx_p_Year", -"idx_p_DocType", "FirstNamesGender", "idx_fng_FirstName", "AuthorNameSplits", -"idx_ans_AuthorPosition", "sqlite_stat1", "UnclearNamesGender", -"idx_ung_FirstName", "crosswalk_fields", "idx_cf_ParentChildField", -"PaperMainFieldsOfStudy", "idx_pmf_PaperId", "idx_pmf_Field0", -"idx_pmf_Field1", "PaperAuthorUnique", "idx_pau_PaperAuthorId", +"index", "index", "index", "table", "index", "index", "index", +"table", "index", "table", "index", "table", "index", "index", +"table", "index", "table", "index", "table", "index", "index", +"table", "index", "index", "table", "index", "index", "table", +"index", "table", "index", "table", "index"), name = c("Authors", +"idx_a_AuthorId", "Papers", "idx_p_PaperId", "FieldsOfStudy", +"idx_fos_FieldOfStudyId", "FieldOfStudyChildren", "idx_fosc_FieldOfStudyId", +"PaperFieldsOfStudy", "idx_pfos_PaperIdFoS", "PaperAuthorAffiliations", +"idx_paa_PaperIdAuthorIdAffiliationId", "PaperReferences", "idx_pr_PaperIdReferenceId", +"Affiliations", "idx_a_AffiliationId", "FirstNames", "idx_fn_FirstName", +"idx_p_Year", "idx_p_DocType", "FirstNamesGender", "idx_fng_FirstName", +"AuthorNameSplits", "idx_ans_AuthorPosition", "sqlite_stat1", +"UnclearNamesGender", "idx_ung_FirstName", "crosswalk_fields", +"idx_cf_ParentChildField", "PaperMainFieldsOfStudy", "idx_pmf_PaperId", +"idx_pmf_Field0", "idx_pmf_Field1", "PaperAuthorUnique", "idx_pau_PaperAuthorId", "idx_pau_AuthorId", "author_sample", "idx_as_AuthorId", "idx_as_FirstName", "author_fields", "idx_af_AuthorField", "AuthorAffiliation", "idx_aa_AuthorAffilYear", "idx_aa_Affil", "paper_citations", "idx_pc_PaperReferenceIdYear", @@ -50,34 +55,46 @@ structure(list(type = c("table", "index", "table", "index", "table", "estimation_sample_physics", "idx_es_PaperIdAuthorIdYearphysics", "estimation_sample_medicine", "idx_es_PaperIdAuthorIdYearmedicine", "estimation_sample_art", "idx_es_PaperIdAuthorIdYearart", "estimation_sample_chemistry", -"idx_es_PaperIdAuthorIdYearchemistry", "pq_fields_mag", "idx_pqfm_id", -"idx_pqfm_fos", "linked_ids", "linking_info", "cohort_career_decomp", -"cohort_career", "author_performance", "author_selfcites", "idx_asc_AuthorIdYear", -"author_coauthor", "idx_aco_AuthorIdCoAuthorId", "idx_pr_PaperReferenceId", -"linked_ids_advisors", "linking_info_advisors", "author_info_linking", -"idx_ail_AuthorId", "pq_authors", "idx_pqaut_goid", "idx_pqaut_uni", -"idx_pqaut_fname", "pq_advisors", "idx_pqadv_idpos", "idx_pqadv_fname", -"idx_pqadv_relid", "pq_fields", "idx_pqfld_idpos", "pq_unis", -"idx_pqu_id", "current_links", "idx_t_AuthorIdgoid", "idx_t_goid", -"current_links_advisors", "idx_cla_AuthorIdrelid", "author_panel", -"idx_ap_AuthorIdYear", "author_citations", "idx_ac_AuthorIdYear", -"author_output", "idx_ao_AuthorIdYear", "NSFgrants", "ix_NSFgrants_index", -"idx_cla_relid"), tbl_name = c("Authors", "Authors", "Papers", -"Papers", "FieldsOfStudy", "FieldsOfStudy", "FieldOfStudyChildren", -"FieldOfStudyChildren", "PaperFieldsOfStudy", "PaperFieldsOfStudy", -"PaperAuthorAffiliations", "PaperAuthorAffiliations", "PaperReferences", -"PaperReferences", "Affiliations", "Affiliations", "FirstNames", -"FirstNames", "Papers", "Papers", "FirstNamesGender", "FirstNamesGender", -"AuthorNameSplits", "AuthorNameSplits", "sqlite_stat1", "UnclearNamesGender", -"UnclearNamesGender", "crosswalk_fields", "crosswalk_fields", +"idx_es_PaperIdAuthorIdYearchemistry", "linked_ids", "linking_info", +"cohort_career_decomp", "cohort_career", "author_performance", +"author_selfcites", "idx_asc_AuthorIdYear", "author_coauthor", +"idx_aco_AuthorIdCoAuthorId", "idx_pr_PaperReferenceId", "linked_ids_advisors", +"linking_info_advisors", "affiliation_outcomes", "idx_affo_AffiliationId", +"author_collab", "idx_acllb_AuthorCoAuthorYear", "idx_acllb_CoAuthorIdYear", +"idx_acllb_AuthorIdYear", "linked_ids_grants", "linking_info_grants", +"idx_paa_AuthorIdAffiliationId", "NSF_Appropriation", "ix_NSF_Appropriation_GrantID", +"NSF_FieldsOfStudy", "NSF_FoaInformation", "ix_NSF_FoaInformation_GrantID", +"NSF_Fund", "ix_NSF_Fund_GrantID", "NSF_Institution", "ix_NSF_Institution_GrantID", +"NSF_Investigator", "ix_NSF_Investigator_GrantID", "NSF_MAIN", +"ix_NSF_MAIN_GrantID", "NSF_Performance_Institution", "ix_NSF_Performance_Institution_GrantID", +"NSF_ProgramElement", "ix_NSF_ProgramElement_GrantID", "NSF_ProgramReference", +"ix_NSF_ProgramReference_GrantID", "idx_paa_AffiliationId", "cng_institutions", +"idx_cngi_unitid", "links_to_cng", "idx_ltc_fromidunitid", "idx_ltc_unitid", +"cng_distances", "idx_cngd_unitid", "pq_authors", "idx_pqaut_goid", +"idx_pqaut_uni", "idx_pqaut_fname", "pq_advisors", "idx_pqadv_idpos", +"idx_pqadv_fname", "idx_pqadv_relid", "pq_fields", "idx_pqfld_idpos", +"pq_unis", "idx_pqu_id", "pq_fields_mag", "idx_pqfm_id", "idx_pqfm_fos", +"pq_info_linking", "idx_pil_goid", "author_info_linking", "idx_ail_AuthorId", +"author_field0", "idx_af0_authorfield", "idx_af0_field", "current_links", +"idx_t_AuthorIdgoid", "idx_t_goid", "current_links_advisors", +"idx_cla_AuthorIdrelid", "idx_cla_relid", "author_panel", "idx_ap_AuthorIdYear", +"author_citations", "idx_ac_AuthorIdYear", "author_output", "idx_ao_AuthorIdYear" +), tbl_name = c("Authors", "Authors", "Papers", "Papers", "FieldsOfStudy", +"FieldsOfStudy", "FieldOfStudyChildren", "FieldOfStudyChildren", +"PaperFieldsOfStudy", "PaperFieldsOfStudy", "PaperAuthorAffiliations", +"PaperAuthorAffiliations", "PaperReferences", "PaperReferences", +"Affiliations", "Affiliations", "FirstNames", "FirstNames", "Papers", +"Papers", "FirstNamesGender", "FirstNamesGender", "AuthorNameSplits", +"AuthorNameSplits", "sqlite_stat1", "UnclearNamesGender", "UnclearNamesGender", +"crosswalk_fields", "crosswalk_fields", "PaperMainFieldsOfStudy", "PaperMainFieldsOfStudy", "PaperMainFieldsOfStudy", "PaperMainFieldsOfStudy", -"PaperMainFieldsOfStudy", "PaperAuthorUnique", "PaperAuthorUnique", -"PaperAuthorUnique", "author_sample", "author_sample", "author_sample", -"author_fields", "author_fields", "AuthorAffiliation", "AuthorAffiliation", -"AuthorAffiliation", "paper_citations", "paper_citations", "author_gender", -"author_gender", "author_gender", "paper_outcomes", "paper_outcomes", -"estimation_sample_history", "estimation_sample_history", "estimation_sample_geology", -"estimation_sample_geology", "estimation_sample_economics", "estimation_sample_economics", +"PaperAuthorUnique", "PaperAuthorUnique", "PaperAuthorUnique", +"author_sample", "author_sample", "author_sample", "author_fields", +"author_fields", "AuthorAffiliation", "AuthorAffiliation", "AuthorAffiliation", +"paper_citations", "paper_citations", "author_gender", "author_gender", +"author_gender", "paper_outcomes", "paper_outcomes", "estimation_sample_history", +"estimation_sample_history", "estimation_sample_geology", "estimation_sample_geology", +"estimation_sample_economics", "estimation_sample_economics", "estimation_sample_geography", "estimation_sample_geography", "estimation_sample_philosophy", "estimation_sample_philosophy", "estimation_sample_sociology", "estimation_sample_sociology", @@ -92,17 +109,28 @@ structure(list(type = c("table", "index", "table", "index", "table", "estimation_sample_business", "estimation_sample_physics", "estimation_sample_physics", "estimation_sample_medicine", "estimation_sample_medicine", "estimation_sample_art", "estimation_sample_art", "estimation_sample_chemistry", "estimation_sample_chemistry", -"pq_fields_mag", "pq_fields_mag", "pq_fields_mag", "linked_ids", -"linking_info", "cohort_career_decomp", "cohort_career", "author_performance", -"author_selfcites", "author_selfcites", "author_coauthor", "author_coauthor", -"PaperReferences", "linked_ids_advisors", "linking_info_advisors", -"author_info_linking", "author_info_linking", "pq_authors", "pq_authors", +"linked_ids", "linking_info", "cohort_career_decomp", "cohort_career", +"author_performance", "author_selfcites", "author_selfcites", +"author_coauthor", "author_coauthor", "PaperReferences", "linked_ids_advisors", +"linking_info_advisors", "affiliation_outcomes", "affiliation_outcomes", +"author_collab", "author_collab", "author_collab", "author_collab", +"linked_ids_grants", "linking_info_grants", "PaperAuthorAffiliations", +"NSF_Appropriation", "NSF_Appropriation", "NSF_FieldsOfStudy", +"NSF_FoaInformation", "NSF_FoaInformation", "NSF_Fund", "NSF_Fund", +"NSF_Institution", "NSF_Institution", "NSF_Investigator", "NSF_Investigator", +"NSF_MAIN", "NSF_MAIN", "NSF_Performance_Institution", "NSF_Performance_Institution", +"NSF_ProgramElement", "NSF_ProgramElement", "NSF_ProgramReference", +"NSF_ProgramReference", "PaperAuthorAffiliations", "cng_institutions", +"cng_institutions", "links_to_cng", "links_to_cng", "links_to_cng", +"cng_distances", "cng_distances", "pq_authors", "pq_authors", "pq_authors", "pq_authors", "pq_advisors", "pq_advisors", "pq_advisors", "pq_advisors", "pq_fields", "pq_fields", "pq_unis", "pq_unis", -"current_links", "current_links", "current_links", "current_links_advisors", +"pq_fields_mag", "pq_fields_mag", "pq_fields_mag", "pq_info_linking", +"pq_info_linking", "author_info_linking", "author_info_linking", +"author_field0", "author_field0", "author_field0", "current_links", +"current_links", "current_links", "current_links_advisors", "current_links_advisors", "current_links_advisors", "author_panel", "author_panel", "author_citations", -"author_citations", "author_output", "author_output", "NSFgrants", -"NSFgrants", "current_links_advisors"), sql = c("CREATE TABLE Authors(\n AuthorId INTEGER,\n ImportanceRank INTEGER, \n NormalizedName TEXT,\n DisplayName TEXT,\n LastKnownAffiliationId INTEGER,\n PaperCount INTEGER,\n PaperFamilyCount INTEGER,\n CitationCount INTEGER,\n CreatedDate TEXT\n )", +"author_citations", "author_output", "author_output"), sql = c("CREATE TABLE Authors(\n AuthorId INTEGER,\n ImportanceRank INTEGER, \n NormalizedName TEXT,\n DisplayName TEXT,\n LastKnownAffiliationId INTEGER,\n PaperCount INTEGER,\n PaperFamilyCount INTEGER,\n CitationCount INTEGER,\n CreatedDate TEXT\n )", "CREATE UNIQUE INDEX idx_a_AuthorId \n ON Authors (AuthorId ASC)\n ", "CREATE TABLE Papers(\n PaperId INTEGER,\n ImportanceRank INTEGER, \n Doi TEXT,\n DocType TEXT,\n PaperTitle TEXT,\n OriginalTitle TEXT,\n BookTitle TEXT,\n Year INTEGER,\n Date TEXT,\n OnlineDate TEXT,\n Publisher TEXT,\n JournalId INTEGER,\n ConferenceSeriesId INTEGER,\n ConferenceInstanceId INTEGER,\n Volume TEXT,\n Issue TEXT,\n FirstPage TEXT,\n LastPage TEXT,\n ReferenceCount INTEGER,\n CitationCount INTEGER,\n EstimatedCitation INTEGER,\n OriginalVenue INTEGER,\n FamilyId INTEGER,\n FamilyRank INTEGER,\n DocSubTypes TEXT,\n CreatedDate TEXT\n )", "CREATE UNIQUE INDEX idx_p_PaperId\n ON Papers (PaperId ASC)\n ", @@ -186,9 +214,6 @@ structure(list(type = c("table", "index", "table", "index", "table", "CREATE UNIQUE INDEX idx_es_PaperIdAuthorIdYearart on estimation_sample_art (PaperId ASC, AuthorId, Year)", "CREATE TABLE estimation_sample_chemistry(\n PaperId INT,\n AuthorId INT,\n DocType TEXT,\n Year INT,\n JournalId INT,\n CitationCount INT,\n CitationCount_y10,\n CitationCount_y5,\n AuthorCount,\n FieldLvl1 INT\n)", "CREATE UNIQUE INDEX idx_es_PaperIdAuthorIdYearchemistry on estimation_sample_chemistry (PaperId ASC, AuthorId, Year)", -"CREATE TABLE pq_fields_mag (\n goid INT\n , position INT\n , fieldname TEXT\n , mag_field0 INT\n , flag TEXT)", -"CREATE UNIQUE INDEX idx_pqfm_id on pq_fields_mag (goid ASC, mag_field0 ASC)", -"CREATE INDEX idx_pqfm_fos on pq_fields_mag (mag_field0 ASC)", "CREATE TABLE linked_ids(\n AuthorId INT\n , goid INT \n , link_score REAL\n , iteration_id INT)", "CREATE TABLE linking_info(\n iteration_id INT\n , field TEXT\n , recall REAL\n , startyear INT\n , endyear INT\n , date TEXT\n , testing INT\n , n_match INT\n , n_distinct INT\n , train_name TEXT\n , institution INT\n , fieldofstudy_cat INT\n , fieldofstudy_str INT\n , keywords INT\n , mergemode TEXT\n )", "CREATE TABLE `cohort_career_decomp` (\n `gender` TEXT,\n `cohort` REAL,\n `YearsExperience` REAL,\n `CovQualQuant` REAL,\n `CitationPerPaper` REAL,\n `PaperCount` REAL,\n `TotalForwardCitations` REAL,\n `AuthorCount` INTEGER,\n `FieldOfStudyId` INTEGER\n)", @@ -201,8 +226,41 @@ structure(list(type = c("table", "index", "table", "index", "table", "CREATE INDEX idx_pr_PaperReferenceId ON PaperReferences (PaperReferenceId ASC)", "CREATE TABLE linked_ids_advisors(\n relationship_id TEXT\n , AuthorId INT\n , link_score REAL\n , iteration_id INT)", "CREATE TABLE linking_info_advisors(\n iteration_id INT\n , field TEXT\n , recall REAL\n , startyear INT\n , endyear INT\n , date TEXT\n , testing INT\n , n_match INT\n , n_distinct INT\n , train_name TEXT\n , institution INT\n , fieldofstudy_cat INT\n , fieldofstudy_str INT\n , keywords INT\n , mergemode TEXT\n )", -"CREATE TABLE author_info_linking(\n AuthorId INT,\n keywords,\n institutions,\n coauthors,\n institutions_career\n)", -"CREATE UNIQUE INDEX idx_ail_AuthorId ON author_info_linking (AuthorId ASC)", +"CREATE TABLE affiliation_outcomes(\n PublicationCount,\n AffiliationId INT\n)", +"CREATE UNIQUE INDEX idx_affo_AffiliationId ON affiliation_outcomes (AffiliationId ASC)", +"CREATE TABLE author_collab (AuthorId INTEGER, CoAuthorId INTEGER, Year INTEGER)", +"CREATE UNIQUE INDEX idx_acllb_AuthorCoAuthorYear ON author_collab (AuthorId ASC, CoAuthorId ASC, Year)", +"CREATE INDEX idx_acllb_CoAuthorIdYear ON author_collab (CoAuthorId ASC, Year)", +"CREATE INDEX idx_acllb_AuthorIdYear ON author_collab (AuthorId ASC, Year)", +"CREATE TABLE linked_ids_grants(\n GrantID TEXT\n , AuthorId INT\n , link_score REAL\n , iteration_id INT)", +"CREATE TABLE linking_info_grants(\n iteration_id INT\n , field TEXT\n , recall REAL\n , startyear INT\n , endyear INT\n , date TEXT\n , testing INT\n , n_match INT\n , n_distinct INT\n , train_name TEXT\n , institution INT\n , fieldofstudy_cat INT\n , fieldofstudy_str INT\n , keywords INT\n , mergemode TEXT\n )", +"CREATE INDEX idx_paa_AuthorIdAffiliationId ON PaperAuthorAffiliations (AuthorId ASC, AffiliationId ASC)", +"CREATE TABLE \"NSF_Appropriation\" (\n\"GrantID\" TEXT,\n \"Folder\" INTEGER,\n \"Position\" INTEGER,\n \"Code\" TEXT,\n \"Name\" TEXT,\n \"AppSymbID\" TEXT\n)", +"CREATE INDEX \"ix_NSF_Appropriation_GrantID\"ON \"NSF_Appropriation\" (\"GrantID\")", +"CREATE TABLE \"NSF_FieldsOfStudy\" (\n\"Organization_Directorate_Abbreviation\" TEXT,\n \"Organization_Directorate_ShortName\" TEXT,\n \"Organization_Division_Abbreviation\" TEXT,\n \"Organization_Division_ShortName\" TEXT,\n \"NormalizedName\" TEXT\n)", +"CREATE TABLE \"NSF_FoaInformation\" (\n\"GrantID\" TEXT,\n \"Folder\" INTEGER,\n \"Position\" INTEGER,\n \"Code\" TEXT,\n \"Name\" TEXT\n)", +"CREATE INDEX \"ix_NSF_FoaInformation_GrantID\"ON \"NSF_FoaInformation\" (\"GrantID\")", +"CREATE TABLE \"NSF_Fund\" (\n\"GrantID\" TEXT,\n \"Folder\" INTEGER,\n \"Position\" INTEGER,\n \"Code\" TEXT,\n \"Name\" TEXT,\n \"FundSymbID\" INTEGER\n)", +"CREATE INDEX \"ix_NSF_Fund_GrantID\"ON \"NSF_Fund\" (\"GrantID\")", +"CREATE TABLE \"NSF_Institution\" (\n\"GrantID\" TEXT,\n \"Folder\" INTEGER,\n \"Position\" INTEGER,\n \"Name\" TEXT,\n \"CityName\" TEXT,\n \"ZipCode\" TEXT,\n \"PhoneNumber\" TEXT,\n \"StreetAddress\" TEXT,\n \"CountryName\" TEXT,\n \"StateName\" TEXT,\n \"StateCode\" TEXT,\n \"CONGRESSDISTRICT\" TEXT,\n \"CongressDistrictOrg\" TEXT,\n \"OrgUEINum\" TEXT,\n \"OrgLGLBusName\" TEXT,\n \"OrgPrntUEINum\" TEXT,\n \"StreetAddress2\" TEXT,\n \"OrgDUNSNum\" REAL,\n \"OrgPrntDUNSNum\" REAL,\n \"CountyName\" TEXT\n)", +"CREATE INDEX \"ix_NSF_Institution_GrantID\"ON \"NSF_Institution\" (\"GrantID\")", +"CREATE TABLE \"NSF_Investigator\" (\n\"GrantID\" TEXT,\n \"Folder\" INTEGER,\n \"Position\" INTEGER,\n \"FirstName\" TEXT,\n \"LastName\" TEXT,\n \"PIFullName\" TEXT,\n \"EmailAddress\" TEXT,\n \"PIPhon\" TEXT,\n \"NSFID\" TEXT,\n \"StartDate\" TEXT,\n \"RoleCode\" TEXT,\n \"PIMidInit\" TEXT,\n \"PISufxName\" TEXT,\n \"EndDate\" TEXT,\n \"EndDateEpoch\" REAL,\n \"RecentPIFlag\" REAL,\n \"ID\" TEXT,\n \"StartDateEpoch\" TEXT,\n \"StartYear\" TEXT,\n \"EndYear\" TEXT,\n \"StartYearEpoch\" TEXT\n)", +"CREATE INDEX \"ix_NSF_Investigator_GrantID\"ON \"NSF_Investigator\" (\"GrantID\")", +"CREATE TABLE \"NSF_MAIN\" (\n\"GrantID\" TEXT,\n \"Folder\" INTEGER,\n \"Position\" INTEGER,\n \"Award_AwardTitle\" TEXT,\n \"Award_AGENCY\" TEXT,\n \"Award_AwardEffectiveDate\" TEXT,\n \"Award_AwardExpirationDate\" TEXT,\n \"Award_AwardTotalIntnAmount\" REAL,\n \"Award_AwardAmount\" REAL,\n \"Award_AbstractNarration\" TEXT,\n \"Award_MinAmdLetterDate\" TEXT,\n \"Award_MaxAmdLetterDate\" TEXT,\n \"Award_TranType\" TEXT,\n \"Award_CfdaNum\" TEXT,\n \"Award_NSFParUseFlag\" REAL,\n \"Award_FundAgcyCode\" REAL,\n \"Award_AwdgAgcyCode\" REAL,\n \"Award_AwardID\" INTEGER,\n \"Award_FundOblg\" TEXT,\n \"Award_ARRAAmount\" REAL,\n \"Award_AwardEffectiveYear\" TEXT,\n \"Award_AwardExpirationYear\" TEXT,\n \"Award_MinAmdLetterYear\" TEXT,\n \"Award_MaxAmdLetterYear\" TEXT,\n \"AwardInstrument_Value\" TEXT,\n \"Organization_Code\" REAL,\n \"Organization_Directorate_Abbreviation\" TEXT,\n \"Organization_Directorate_LongName\" TEXT,\n \"Organization_Division_Abbreviation\" TEXT,\n \"Organization_Division_LongName\" TEXT,\n \"POR_DRECONTENT\" TEXT,\n \"POR_PorCopyTxt\" TEXT,\n \"ProgramOfficer_SignBlockName\" TEXT,\n \"ProgramOfficer_PoEmai\" TEXT,\n \"ProgramOfficer_PoPhon\" REAL,\n \"Organization_Directorate_ShortName\" TEXT,\n \"Organization_Division_ShortName\" TEXT\n)", +"CREATE INDEX \"ix_NSF_MAIN_GrantID\"ON \"NSF_MAIN\" (\"GrantID\")", +"CREATE TABLE \"NSF_Performance_Institution\" (\n\"GrantID\" TEXT,\n \"Folder\" INTEGER,\n \"Position\" INTEGER,\n \"Name\" TEXT,\n \"CityName\" TEXT,\n \"StateCode\" TEXT,\n \"ZipCode\" TEXT,\n \"StreetAddress\" TEXT,\n \"CountryCode\" TEXT,\n \"CountryName\" TEXT,\n \"StateName\" TEXT,\n \"CountryFlag\" REAL,\n \"CONGRESSDISTRICT\" TEXT,\n \"CongressDistrictPerf\" TEXT,\n \"CountyName\" TEXT\n)", +"CREATE INDEX \"ix_NSF_Performance_Institution_GrantID\"ON \"NSF_Performance_Institution\" (\"GrantID\")", +"CREATE TABLE \"NSF_ProgramElement\" (\n\"GrantID\" TEXT,\n \"Folder\" INTEGER,\n \"Position\" INTEGER,\n \"Code\" TEXT,\n \"Text\" TEXT\n)", +"CREATE INDEX \"ix_NSF_ProgramElement_GrantID\"ON \"NSF_ProgramElement\" (\"GrantID\")", +"CREATE TABLE \"NSF_ProgramReference\" (\n\"GrantID\" TEXT,\n \"Folder\" INTEGER,\n \"Position\" INTEGER,\n \"Code\" TEXT,\n \"Text\" TEXT\n)", +"CREATE INDEX \"ix_NSF_ProgramReference_GrantID\"ON \"NSF_ProgramReference\" (\"GrantID\")", +"CREATE INDEX idx_paa_AffiliationId ON PaperAuthorAffiliations (AffiliationId ASC)", +"CREATE TABLE \"cng_institutions\" (\n\"unitid\" INTEGER,\n \"normalizedname\" TEXT,\n \"originalname\" TEXT,\n \"city\" TEXT,\n \"stabbr\" TEXT,\n \"basic2021\" INTEGER,\n \"latitude\" REAL,\n \"longitude\" REAL\n)", +"CREATE UNIQUE INDEX idx_cngi_unitid ON cng_institutions (unitid ASC)", +"CREATE TABLE \"links_to_cng\" (\n\"from_id\" INTEGER,\n \"unitid\" INTEGER,\n \"link_score\" REAL,\n \"link_flag\" TEXT,\n \"from_dataset\" TEXT\n)", +"CREATE INDEX idx_ltc_fromidunitid ON links_to_cng(from_id ASC, unitid ASC)", +"CREATE INDEX idx_ltc_unitid ON links_to_cng(unitid ASC)", "CREATE TABLE \"cng_distances\" (\n\"unitid\" INTEGER,\n \"unitid2\" INTEGER,\n \"distance_km\" REAL\n)", +"CREATE UNIQUE INDEX idx_cngd_unitid ON cng_distances (unitid ASC, unitid2 ASC)", "CREATE TABLE pq_authors( goid INTEGER\n , fullname TEXT\n , firstname TEXT\n , degree_year INTEGER\n , degree_level TEXT\n , university_id INTEGER\n , department TEXT\n , originaltitle TEXT\n , thesistitle TEXT )", "CREATE UNIQUE INDEX idx_pqaut_goid ON pq_authors (goid ASC)", "CREATE INDEX idx_pqaut_uni ON pq_authors (university_id ASC)", @@ -211,19 +269,27 @@ structure(list(type = c("table", "index", "table", "index", "table", "CREATE INDEX idx_pqadv_idpos ON pq_advisors (goid ASC)", "CREATE INDEX idx_pqadv_fname ON pq_advisors (firstname ASC)", "CREATE UNIQUE INDEX idx_pqadv_relid ON pq_advisors(relationship_id)", "CREATE TABLE pq_fields( goid INTEGER\n , position INTEGER\n , fieldname TEXT\n , fieldcode INTEGER )", -"CREATE INDEX idx_pqfld_idpos ON pq_fields (goid ASC)", "CREATE TABLE pq_unis( university_id INTEGER\n , originalname TEXT\n , normalizedname TEXT\n , location TEXT\n )", +"CREATE INDEX idx_pqfld_idpos ON pq_fields (goid ASC)", "CREATE TABLE pq_unis( university_id INTEGER\n , originalname TEXT\n , normalizedname TEXT\n , location TEXT\n , us_stabbr TEXT\n )", "CREATE UNIQUE INDEX idx_pqu_id ON pq_unis (university_id ASC)", +"CREATE TABLE pq_fields_mag (\n goid INT\n , position INT\n , fieldname TEXT\n , mag_field0 INT\n , flag TEXT)", +"CREATE UNIQUE INDEX idx_pqfm_id on pq_fields_mag (goid ASC, mag_field0 ASC)", +"CREATE INDEX idx_pqfm_fos on pq_fields_mag (mag_field0 ASC)", +"CREATE TABLE pq_info_linking(\n goid INT,\n fields,\n advisors\n)", +"CREATE UNIQUE INDEX idx_pil_goid ON pq_info_linking (goid ASC)", +"CREATE TABLE author_info_linking(\n AuthorId INT,\n keywords,\n institutions,\n coauthors,\n main_institutions_career,\n main_us_institutions_career,\n main_us_institutions_year,\n all_us_institutions_year,\n year_papertitle\n)", +"CREATE UNIQUE INDEX idx_ail_AuthorId ON author_info_linking (AuthorId ASC)", +"CREATE TABLE author_field0(\n AuthorId INT,\n FieldOfStudyId_lvl0 INT,\n Degree\n)", +"CREATE UNIQUE INDEX idx_af0_authorfield ON author_field0 (AuthorId ASC, FieldOfStudyId_lvl0 ASC) ", +"CREATE INDEX idx_af0_field ON author_field0 (FieldOfStudyId_lvl0 ASC) ", "CREATE TABLE current_links(\n AuthorId INT,\n goid INT,\n link_score REAL,\n iteration_id INT\n)", "CREATE UNIQUE INDEX idx_t_AuthorIdgoid ON current_links (AuthorId ASC, goid ASC)", "CREATE UNIQUE INDEX idx_t_goid ON current_links (goid ASC)", "CREATE TABLE current_links_advisors(\n AuthorId INT,\n relationship_id TEXT,\n link_score REAL,\n iteration_id INT\n)", "CREATE UNIQUE INDEX idx_cla_AuthorIdrelid ON current_links_advisors (AuthorId ASC, relationship_id ASC)", +"CREATE UNIQUE INDEX idx_cla_relid ON current_links_advisors (relationship_id ASC)", "CREATE TABLE author_panel(AuthorId INT,Year INT)", "CREATE UNIQUE INDEX idx_ap_AuthorIdYear on author_panel (AuthorId ASC, Year)", "CREATE TABLE author_citations(\n AuthorId INT,\n Year INT,\n CitationCount\n)", "CREATE UNIQUE INDEX idx_ac_AuthorIdYear on author_citations (AuthorId ASC, Year)", "CREATE TABLE author_output(\n AuthorId INT,\n Year INT,\n PaperCount,\n TotalAuthorCount,\n TotalForwardCitations\n)", -"CREATE UNIQUE INDEX idx_ao_AuthorIdYear on author_output (AuthorId ASC, Year)", -"CREATE TABLE \"NSFgrants\" (\n\"index\" INTEGER,\n \"Folder\" INTEGER,\n \"File\" TEXT,\n \"AwardTitle\" TEXT,\n \"AGENCY\" TEXT,\n \"AwardEffectiveDate\" TEXT,\n \"AwardExpirationDate\" TEXT,\n \"AwardTotalIntnAmount\" INTEGER,\n \"AwardAmount\" INTEGER,\n \"Value\" TEXT,\n \"Code\" TEXT,\n \"Abbreviation\" TEXT,\n \"LongName\" TEXT,\n \"SignBlockName\" TEXT,\n \"MinAmdLetterDate\" TEXT,\n \"MaxAmdLetterDate\" TEXT,\n \"TRAN_TYPE\" TEXT,\n \"CFDA_NUM\" TEXT,\n \"NSF_PAR_USE_FLAG\" INTEGER,\n \"FUND_AGCY_CODE\" INTEGER,\n \"AWDG_AGCY_CODE\" INTEGER,\n \"AwardID\" INTEGER,\n \"FirstName\" TEXT,\n \"LastName\" TEXT,\n \"PI_FULL_NAME\" TEXT,\n \"NSF_ID\" TEXT,\n \"StartDate\" TEXT,\n \"RoleCode\" TEXT,\n \"Name\" TEXT,\n \"CityName\" TEXT,\n \"ZipCode\" TEXT,\n \"PhoneNumber\" TEXT,\n \"StreetAddress\" TEXT,\n \"CountryName\" TEXT,\n \"StateName\" TEXT,\n \"StateCode\" TEXT,\n \"CONGRESSDISTRICT\" TEXT,\n \"CONGRESS_DISTRICT_ORG\" TEXT,\n \"ORG_UEI_NUM\" TEXT,\n \"ORG_LGL_BUS_NAME\" TEXT,\n \"ORG_PRNT_UEI_NUM\" TEXT,\n \"CONGRESS_DISTRICT_PERF\" TEXT,\n \"Text\" TEXT,\n \"FUND_OBLG\" TEXT,\n \"PI_MID_INIT\" TEXT,\n \"StreetAddress2\" TEXT,\n \"ORG_DUNS_NUM\" INTEGER,\n \"ORG_PRNT_DUNS_NUM\" INTEGER,\n \"CountyName\" TEXT,\n \"EmailAddress\" TEXT,\n \"PI_PHON\" TEXT,\n \"PI_SUFX_NAME\" TEXT,\n \"CountryFlag\" INTEGER,\n \"CountryCode\" TEXT,\n \"PO_EMAI\" TEXT,\n \"PO_PHON\" INTEGER,\n \"AbstractNarration\" TEXT,\n \"APP_SYMB_ID\" TEXT,\n \"EndDate\" TEXT,\n \"FUND_SYMB_ID\" INTEGER,\n \"DRECONTENT\" TEXT,\n \"POR_COPY_TXT\" TEXT,\n \"ARRAAmount\" INTEGER,\n \"EndDateEpoch\" REAL,\n \"RecentPIFlag\" REAL,\n \"ID\" TEXT,\n \"StartDateEpoch\" TEXT\n)", -"CREATE INDEX \"ix_NSFgrants_index\"ON \"NSFgrants\" (\"index\")", -"CREATE UNIQUE INDEX idx_cla_relid ON current_links_advisors (relationship_id ASC)" -)), class = "data.frame", row.names = c(NA, -132L)) +"CREATE UNIQUE INDEX idx_ao_AuthorIdYear on author_output (AuthorId ASC, Year)" +)), class = "data.frame", row.names = c(NA, -171L)) diff --git a/tests/testthat/mock_db/SELECT_-052c29.R b/tests/testthat/mock_db/SELECT_-052c29.R new file mode 100644 index 0000000..c81397f --- /dev/null +++ b/tests/testthat/mock_db/SELECT_-052c29.R @@ -0,0 +1,4 @@ +structure(list(goid = c(303763395L, 303483090L, 303690188L), + position = c(0L, 0L, 0L), relationship_id = c("303763395_0", + "303483090_0", "303690188_0"), gender = c("Male", "Male", + "Male")), class = "data.frame", row.names = c(NA, -3L)) diff --git a/tests/testthat/mock_db/SELECT_-ad0113.R b/tests/testthat/mock_db/SELECT_-64c4e4.R similarity index 100% rename from tests/testthat/mock_db/SELECT_-ad0113.R rename to tests/testthat/mock_db/SELECT_-64c4e4.R diff --git a/tests/testthat/mock_db/SELECT_-a24ff2.R b/tests/testthat/mock_db/SELECT_-a24ff2.R deleted file mode 100644 index ca191af..0000000 --- a/tests/testthat/mock_db/SELECT_-a24ff2.R +++ /dev/null @@ -1,4 +0,0 @@ -structure(list(goid = c(303794974L, 303763395L, 303483090L), - position = c(0L, 0L, 0L), relationship_id = c("303794974_0", - "303763395_0", "303483090_0"), gender = c("Male", "Male", - "Male")), class = "data.frame", row.names = c(NA, -3L)) diff --git a/tests/testthat/test-example.R b/tests/testthat/test-example.R index 2c4ecf0..ca94eed 100644 --- a/tests/testthat/test-example.R +++ b/tests/testthat/test-example.R @@ -2,7 +2,7 @@ test_that("db_example() finds right file", { expect_error(db_example("randomfile"), - regexp = "no file found|No file found") + regexp = "no file found|No file found|Can't find package file") # R CMD check gives "no file found", test() gives "No file found" expect_match(db_example("AcademicGraph.sqlite"), "AcademicGraph") })