diff --git a/Rakefile b/Rakefile index aea417c2..13972c1f 100644 --- a/Rakefile +++ b/Rakefile @@ -297,7 +297,8 @@ end task :report => "artifacts/grant_report.txt" task :ub_report do - UBSOE::generate_yearly_report(2017) + + UBSOE::generate_yearly_report(Time.now().year-1) end file "artifacts/nsf_merit_blurb.txt" => [ $db.files, "artifacts", "Rakefile" ].flatten do diff --git a/db/cv/okennedy/grants.json b/db/cv/okennedy/grants.json index 0281e715..179dca43 100644 --- a/db/cv/okennedy/grants.json +++ b/db/cv/okennedy/grants.json @@ -1,4 +1,21 @@ [ + { "title" : "SCC-CIVIC-PG Track B: Food System Research, Education, Action, and Policy for Resilience (REAP Resilience)", + "agency" : "NSF: CIVIC", + "role" : "Co-PI", + "amount" : 50000, + "effort" : "20%", + "status" : "submitted", + "start" : "01/01/2021", "end" : "04/31/2021", + "type" : "grant", + "commitment" : { }, + "projects" : ["vizier"], + "copis" : [ + "Samina Raja", + "Sara Behdad", + "Debabrata Talukdar", + "Srirangaraj Setlur" + ] + }, { "title" : "Physical Layout Optimization & Query Transformation for messy JSON collection", "agency" : "Oracle University Relations", "role" : "PI", @@ -45,12 +62,12 @@ { "title" : "Collaborative Research: III: MEDIUM: U4U - Taming Uncertainty with Uncertainty-Annotated Databases", "agency" : "NSF: CISE: IIS: MEDIUM", "role" : "Co-PI", - "amount" : 663996, + "amount" : 532923, "effort" : "50%", "status" : "submitted", "start" : "08/15/2020", "end" : "08/14/2024", "type" : "grant", - "commitment" : { "summer" : 0.5 }, + "commitment" : { "summer" : 0.25 }, "projects" : ["mimir", "vizier"], "copis" : [ "Atri Rudra" @@ -58,7 +75,7 @@ "collaborative" : [ { "institution" : "Illinois Inst. Tech.", "pis" : ["Boris Glavic"], - "amount" : 535014 + "amount" : 466569 } ] }, @@ -67,7 +84,7 @@ "role" : "Co-I", "amount" : 4252944, "effort" : "100%", - "status" : "submitted", + "status" : "rejected", "start" : "08/01/2020", "end" : "07/30/2024", "type" : "grant", "commitment" : { "summer" : 0.5 } diff --git a/db/cv/okennedy/talks.json b/db/cv/okennedy/talks.json index e208db1c..afefde42 100644 --- a/db/cv/okennedy/talks.json +++ b/db/cv/okennedy/talks.json @@ -1,4 +1,12 @@ [ + { "talk" : "How to Start Collaborating with CSE to Solve Global Health Problems", "date" : "May 2020", + "venue" : "University at Buffalo: Center for Global Health Equity" }, + { "talk" : "Safe, Reusable Heuristic Data Transformation (through Caveats)", "date" : "Dec 2019", + "venue" : "Northeastern University" }, + { "talk" : "Safe, Reusable Heuristic Data Transformation (through Caveats)", "date" : "Dec 2019", + "venue" : "Tableau, Inc." }, + { "talk" : "Safe, Reusable Heuristic Data Transformation (through Caveats)", "date" : "Dec 2019", + "venue" : "University of Massachusetts Amherst" }, { "talk" : "Just-In-Time Data Structures", "date" : "May. 2019", "venue" : "University of Waterloo" }, { "talk" : "Don't Wrangle, Guess Instead (with Mimir)", "date" : "Jan. 2018", diff --git a/db/people.json b/db/people.json index 03c28262..04fdf1f1 100644 --- a/db/people.json +++ b/db/people.json @@ -1,4 +1,12 @@ { + "Fatemeh Nargesian" : { + "institution" : "University of Rochester", + "updated" : "2020" + }, + "Michael Brachmann" : { + "institution" : "University at Buffalo", + "updated" : "2020" + }, "Carlos Bautista" : { "institution" : "New York University", "updated" : "2019" diff --git a/db/venues.json b/db/venues.json index 03cb10e4..c50e7c4e 100644 --- a/db/venues.json +++ b/db/venues.json @@ -166,7 +166,7 @@ }, "2019" : { "location" : "Los Angeles, CA, USA", - "date" : "August 26, 2015" + "date" : "August 26, 2019" } } }, diff --git a/lib/text.rb b/lib/text.rb index a6a75abb..f96351a9 100644 --- a/lib/text.rb +++ b/lib/text.rb @@ -20,8 +20,7 @@ module Text end def date_to_time(d) - case d - when Numeric then Time.new(d) + case d when Numeric then Time.new(d) when /([a-zA-Z]+)\.? +([0-9]+)/ then month, yr = $1, $2 Time.new(yr, idx_of_month(month)) @@ -99,7 +98,7 @@ module Text elsif not r["date"].nil? extracted_year = case r["date"] - when /[a-z]+\. (\d\d\d\d)/ then $1 + when /[a-z]+\.? (\d\d\d\d)/ then $1 else raise "Invalid date format: #{r["date"]}" end return extracted_year.to_i >= year @@ -148,4 +147,10 @@ module Text parts[-1] # last name ] end -end \ No newline at end of file +end + +class TextClass + include Text +end + +TextUtils = TextClass.new \ No newline at end of file diff --git a/lib/ubreporting.rb b/lib/ubreporting.rb index e7179412..8214c68a 100644 --- a/lib/ubreporting.rb +++ b/lib/ubreporting.rb @@ -1,6 +1,7 @@ - +require "text.rb" module UBSOE + def UBSOE::generate_yearly_report(since_year) puts "-------------------------------------------------------" @@ -54,7 +55,6 @@ module UBSOE puts "| Advising |" puts "-------------------------------------------------------" puts "" - puts puts( $db["lab/members"] .map { |k, person| @@ -62,6 +62,31 @@ module UBSOE } .join("\n\n------\n\n") ) + puts "" + puts "" + puts "-------------------------------------------------------" + puts "| Grants |" + puts "-------------------------------------------------------" + puts "" + puts( + $db["cv/okennedy/grants"] + .select { |grant| grant["status"] == "accepted" } + .select { |grant| if /([0-9]{4})/ =~ grant["start"] then $1.to_i >= since_year end } + .map { |grant| + title = grant["title"] + amount = grant["amount"] + agency = grant["agency"] + effort = + case grant.fetch("effort", nil) + when /([0-9]+)%/ then $1.to_f / 100.0 * amount + when nil then nil + else raise "Unknown effort format #{grant["effort"]}" + end + "#{title}\n#{agency}\n#{TextUtils.format_money(amount)}#{if effort.nil? then "" else " (#{TextUtils.format_money(effort)} by effort)" end}" + } + ) + puts + puts end end