Skip to content

Commit

Permalink
Merge pull request #451 from georgetown-cset/445-no-last-complete-year
Browse files Browse the repository at this point in the history
Remove "last complete year" and 5-year counts columns
  • Loading branch information
brianlove authored Jun 24, 2024
2 parents e8f50b4 + 9e729f0 commit 155c354
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 79 deletions.
2 changes: 1 addition & 1 deletion web/gui-v2/src/static_data/data.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion web/gui-v2/src/static_data/overall_data.json

Large diffs are not rendered by default.

30 changes: 0 additions & 30 deletions web/gui-v2/src/static_data/table_columns.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,16 +240,6 @@ const columnDefinitions = [
category: "publications",
...generateSliderColDef("articles", "ai_pubs_top_conf"),
},
{
title: `AI papers in last complete year (${overall.endArticleYear})`,
key: "ai_pubs_last_full_year",
aggregateType: "median",
category: "publications",
...generateSliderColDef(
"articles",
"ai_pubs_last_full_year",
),
},
{
title: "CV publications",
key: "cv_publications",
Expand Down Expand Up @@ -278,16 +268,6 @@ const columnDefinitions = [
category: "publications",
...generateSliderColDef("articles", "all_publications"),
},
{
title: "5-year total publications",
key: "all_pubs_5yr",
aggregateType: "median",
category: "publications",
...generateSliderColDef(
"articles",
"all_pubs_5yr"
),
},
{
title: "Citations to AI pubs",
key: "citations",
Expand Down Expand Up @@ -350,16 +330,6 @@ const columnDefinitions = [
category: "patents",
...generateSliderColDef("patents", "all_patents"),
},
{
title: "5-year total patents",
key: "all_patents_5yr",
aggregateType: "median",
category: "patents",
...generateSliderColDef(
"patents",
"all_patents_5yr"
),
},
{
title: "Agricultural patents",
key: "agri_patents",
Expand Down
17 changes: 0 additions & 17 deletions web/scripts/retrieve_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -852,18 +852,6 @@ def add_derived_metrics(js: dict, end_article_year: int, end_patent_year: int) -
:param end_patent_year: End year to use for patent metrics
:return: None (mutates js)
"""
# 5-year publication counts
article_end_idx = YEARS.index(end_article_year)
article_yearly_counts = js["articles"]["all_publications"]["counts"]
five_year_articles = sum(article_yearly_counts[article_end_idx-4:article_end_idx+1])
js["articles"]["all_pubs_5yr"] = {"counts": [], "total": five_year_articles, "isTopResearch": False}

# 5-year patent counts
patent_end_idx = YEARS.index(end_patent_year)
patent_yearly_counts = js["patents"]["all_patents"]["counts"]
five_year_patents = sum(patent_yearly_counts[patent_end_idx-4:patent_end_idx+1])
js["patents"]["all_patents_5yr"] = {"counts": [], "total": five_year_patents, "table": None}

# AI publication percentage
ai_pubs_pct = get_field_percentage(js, "articles", "all_publications", "ai_publications")
js["articles"]["ai_pubs_percent"] = {"counts": [], "total": ai_pubs_pct, "isTopResearch": False}
Expand All @@ -872,11 +860,6 @@ def add_derived_metrics(js: dict, end_article_year: int, end_patent_year: int) -
ai_patents_pct = get_field_percentage(js, "patents", "all_patents", "ai_patents")
js["patents"]["ai_patents_percent"] = {"counts": [], "total": ai_patents_pct, "table": None}

# AI pubs in last complete year
ai_yearly_counts = js["articles"]["ai_publications"]["counts"]
ai_last_complete_year = ai_yearly_counts[article_end_idx]
js["articles"]["ai_pubs_last_full_year"] = {"counts": [], "total": ai_last_complete_year, "isTopResearch": False}


def clean_row(row: str, refresh_images: bool, lowercase_to_orig_cname: dict, market_key_to_link: dict,
end_article_year: int = END_ARTICLE_YEAR, end_patent_year: int = END_PATENT_YEAR) -> dict:
Expand Down
15 changes: 0 additions & 15 deletions web/tests/test_data/alphabet_output.json
Original file line number Diff line number Diff line change
Expand Up @@ -181,21 +181,11 @@
"total": 32,
"isTopResearch": false
},
"ai_pubs_last_full_year": {
"counts": [],
"total": 29,
"isTopResearch": false
},
"ai_pubs_percent": {
"counts": [],
"total": 17.7,
"isTopResearch": false
},
"all_pubs_5yr": {
"counts": [],
"total": 675,
"isTopResearch": false
},
"ai_citation_counts": {
"counts": [
0,
Expand Down Expand Up @@ -923,11 +913,6 @@
"total": 153,
"table": "application"
},
"all_patents_5yr": {
"counts": [],
"table": null,
"total": 7960
},
"ai_patents_percent": {
"counts": [],
"table": null,
Expand Down
15 changes: 0 additions & 15 deletions web/tests/test_data/hugging_face_output.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,21 +135,11 @@
"total": 13,
"isTopResearch": false
},
"ai_pubs_last_full_year": {
"counts": [],
"total": 8,
"isTopResearch": false
},
"ai_pubs_percent": {
"counts": [],
"total": 78.3,
"isTopResearch": false
},
"all_pubs_5yr": {
"counts": [],
"total": 23,
"isTopResearch": false
},
"ai_citation_counts": {
"counts": [
0,
Expand Down Expand Up @@ -877,11 +867,6 @@
"growth": null,
"table": null
},
"all_patents_5yr": {
"counts": [],
"table": null,
"total": 0
},
"ai_patents_percent": {
"counts": [],
"table": null,
Expand Down

0 comments on commit 155c354

Please sign in to comment.