Skip to content

Commit

Permalink
drop the not dones
Browse files Browse the repository at this point in the history
  • Loading branch information
mnyrop committed May 27, 2022
1 parent 35fa40c commit 18d8c2f
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 74 deletions.
17 changes: 14 additions & 3 deletions lib/parsers/default.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
module Parsers
module Default
def self.parse(data, array_keys=[])
data = inject_order data
data = compact_all data
data = split_arrays(data, array_keys) unless array_keys.empty?
data = convert_bools data
data = drop_not_done data
data
end

Expand All @@ -18,9 +20,11 @@ def self.convert_bools(data)
end

def self.compact_all(data)
data.map do |h|
h.compact
end
data.map { |h| h.compact }
end

def self.drop_not_done(data)
data.reject { |h| !h['done'] }
end

def self.split_semicolon_string(string)
Expand All @@ -33,5 +37,12 @@ def self.split_arrays(data, keys)
hash
end
end

def self.inject_order(data)
data.map.with_index do |h, i|
h['order'] = i.to_s.rjust(3, "0")
h
end
end
end
end
1 change: 0 additions & 1 deletion lib/tasks/fetch/people.rake
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ namespace :fetch do
Utils.wget_sheet(sheet_key, csv_file) unless ENV['SKIP_WGET']

data = Utils.csv_open csv_file
data = Utils.inject_order data
data = Parsers::Default.parse data, array_keys
data = Parsers::People.parse data

Expand Down
1 change: 0 additions & 1 deletion lib/tasks/fetch/projects.rake
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ namespace :fetch do
Utils.wget_sheet(sheet_key, csv_file) unless ENV['SKIP_WGET']

data = Utils.csv_open csv_file
data = Utils.inject_order data
data = Parsers::Default.parse data, array_keys
data = Parsers::Projects.parse data
tags = Parsers::Projects.pull_tags data
Expand Down
7 changes: 0 additions & 7 deletions lib/utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,4 @@ def self.write_to_file(content, file)
FileUtils.mkdir_p File.dirname(file)
File.open(file, "w") { |f| f.write content }
end

def self.inject_order(data)
data.map.with_index do |h, i|
h['order'] = i.to_s.rjust(3, "0")
h
end
end
end
13 changes: 13 additions & 0 deletions source/_data/courses.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
description: Provides an introduction to the practice, history, and principles of
programming for students in the humanities through the Python language.
url: https://benschmidt.org/code21
order: '000'
- pid: 1089-fa21
done: true
number: CEH-GA.1089
Expand All @@ -36,6 +37,7 @@
will include readings on network culture and digital curation by authors such
as McLuhan, Gitelman, Castells, Shirky, Manovich, Cohen, Ramsay, and Galloway.
url: https://kimon.hosting.nyu.edu/sites/dh-collections-connections/
order: '001'
- pid: 1121-sp22
done: true
number: DHSS-GA.1121
Expand All @@ -58,6 +60,7 @@
data is messy and culturally contingent, and where the reading audience is not
necessarily trained or interested in statistics.'
url: https://benschmidt.org/WWD22
order: '002'
- pid: 1137-sp22
done: true
number: CEH-GA.1137
Expand All @@ -76,6 +79,7 @@
that are used as alternatives to textual explanation. We will work with digital
tools for analyzing and visualizing humanities data, such as AbbyFine, Voyant,
Topic Modeling Tool, ArcGIS, and Agisoft Metashape.
order: '003'
- pid: 1122-sp22
done: true
number: DHSS-GA.1122
Expand All @@ -92,6 +96,7 @@
our notions of discourse and explore how websites can be used for scholarly communication.
A deeper understanding of these topics will help you make better decisions not
only in your own web development practice but also in sharing your work more effectively.
order: '004'
- pid: 1121-fa22
done: true
number: DHSS-GA.1120
Expand All @@ -104,6 +109,7 @@
description: Provides an introduction to the practice, history, and principles of
programming for students in the humanities through the Python language.
url: https://benschmidt.org/code21
order: '005'
- pid: 1089-fa22
done: true
number: CEH-GA.1089
Expand All @@ -127,6 +133,7 @@
will include readings on network culture and digital curation by authors such
as McLuhan, Gitelman, Castells, Shirky, Manovich, Cohen, Ramsay, and Galloway.
url: https://kimon.hosting.nyu.edu/sites/dh-collections-connections/
order: '006'
- pid: 1121-sp23
done: true
number: DHSS-GA.1121
Expand All @@ -143,6 +150,7 @@
and a series of programming worksets that will teach you how to do a variety of
types of data analysis and visualization.'
url: https://benschmidt.org/WWD22
order: '007'
- pid: 1122-sp23
done: true
number: DHSS-GA.1122
Expand All @@ -157,6 +165,7 @@
our notions of discourse and explore how websites can be used for scholarly communication.
A deeper understanding of these topics will help you make better decisions not
only in your own web development practice but also in sharing your work more effectively.
order: '008'
- pid: 1137-sp23
done: true
number: CEH-GA.1137
Expand All @@ -175,6 +184,7 @@
that are used as alternatives to textual explanation. We will work with digital
tools for analyzing and visualizing humanities data, such as AbbyFine, Voyant,
Topic Modeling Tool, ArcGIS, and Agisoft Metashape.
order: '009'
- pid: 3032-fa22
done: true
number: CEH-GA 3032
Expand Down Expand Up @@ -203,6 +213,7 @@
and current events we will be studying relate to the day-to-day progress coming
out of their race.
url: https://kimon.hosting.nyu.edu/sites/citizenship-in-the-digital-age/
order: '010'
- pid: 3047-fa22
done: true
number: CEH-GA 3047
Expand Down Expand Up @@ -232,6 +243,7 @@
relative strengths and weaknesses, including Google Maps/Earth, StoryMap JS, Tableau,
ArcGIS, ESRI StoryMaps and ARIS.
url: https://kimon.hosting.nyu.edu/sites/space-place-data/
order: '011'
- pid: 1089-001-fa22
done: true
number: CEH-GA 1089-001, MSMS-GA 1089-001
Expand All @@ -254,3 +266,4 @@
these networks and collections to present intellectual arguments in new ways and
tell more compelling stories.
url: https://kimon.hosting.nyu.edu/sites/dh-collections-connections/
order: '012'
20 changes: 0 additions & 20 deletions source/_data/people.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
- affil_fac
link: https://library.nyu.edu/people/zachary-coble/
local_image: coble.jpg
display_order: '1'
original_image: https://s3.amazonaws.com/nyulibraries-www-assets/people-images/zachary-coble.jpg
order: '000'
affiliated: true
Expand All @@ -21,7 +20,6 @@
- affil_fac
link: https://benschmidt.org
local_image: schmidt.jpg
display_order: '2'
original_image: https://benschmidt.org/authors/admin/avatar_hu100dbceb67e8fdbed30bfdcfd276f9b6_54689_250x250_fill_lanczos_center_2.png
order: '001'
affiliated: true
Expand All @@ -33,7 +31,6 @@
- exec_com
link: https://library.nyu.edu/people/marii-nyrop/
local_image: nyrop.jpg
display_order: '3'
order: '002'
affiliated: true
- pid: karlin
Expand All @@ -44,7 +41,6 @@
- exec_com
link: https://library.nyu.edu/people/jojo-karlin/
local_image: karlin.jpg
display_order: '4'
original_image: https://commons.gc.cuny.edu/files/avatars/5851/5d7424f5d81ff-bpfull.jpg
order: '003'
affiliated: true
Expand All @@ -56,7 +52,6 @@
- exec_com
link: https://library.nyu.edu/people/himanshu-mistry/
local_image: mistry.jpg
display_order: '4'
original_image: https://s3.amazonaws.com/nyulibraries-www-assets/people-images/himanshu-mistry.jpg
order: '004'
affiliated: true
Expand All @@ -68,7 +63,6 @@
- exec_com
link: https://wp.nyu.edu/fas-edtech/about/our-team/
local_image: appert.jpg
display_order: '5'
original_image: https://s18798.pcdn.co/fas-edtech/wp-content/uploads/sites/354/2021/12/appert2021headshot-300x295.jpg
order: '005'
affiliated: true
Expand All @@ -82,7 +76,6 @@
- proj_pi
link: https://library.nyu.edu/people/nicholas-wolf/
local_image: wolf.jpg
display_order: '6'
original_image: https://as.nyu.edu/content/dam/nyu-as/irelandHouse/images/headshots-portraits-promopics-etc/Faculty/Nicholas%20Wolf.JPG
order: '006'
affiliated: true
Expand All @@ -95,7 +88,6 @@
- exec_com
link: https://steinhardt.nyu.edu/people/ben-maddox
local_image: maddox.jpg
display_order: '7'
original_image: https://steinhardt.nyu.edu/sites/default/files/styles/nyu_profile_image/public/2021-03/4E0BD43F-9787-445D-B0E5-F425455FC5DB%20-%20Ben%20Maddox.jpeg?h=14580d8e&itok=4CrKN7lM
order: '007'
affiliated: true
Expand Down Expand Up @@ -382,18 +374,6 @@
local_image: zehngut-willits.jpg
original_image: https://as.nyu.edu/content/dam/nyu-as/history/images/BryanZehngutWillits.jpg
order: '037'
- pid: zohar
name: Ryan Zohar
titles: Dual Degree Graduate Student, Kevorkian Center and Palmer School
site_roles:
- fellow
order: '038'
- pid: deniz
name: Fatma Deniz
titles: Doctoral Student in Middle Eastern and Islamic Studies
site_roles:
- fellow
order: '039'
- pid: ansari
done: true
name: Ahmed Ansari
Expand Down
20 changes: 0 additions & 20 deletions source/_data/projects.yml
Original file line number Diff line number Diff line change
Expand Up @@ -756,26 +756,6 @@
local_image: wax.jpg
original_img: https://minicomp.github.io/wax/img/logo.png
order: '027'
- pid: inquisite
done: false
title: Inquisite
category: Other
tags:
- linked-open-data
abstract: Closely aligned with the objects of NewYorkScapes to provide support for
the creation, design, and preservation of humanities data, support for the software
platform Inquisite is being sought to facilitate the use of research data in the
classroom and on long-term project development. Data and discipline agnostic,
the platform is intended to fill needs among faculty and researchers for a low-technology-barrier
interface for hosting and documenting data iteratively for research management
purposes.
pis:
- wolf
- augst
link: http://www.inquisite.org/
local_image: inquisite.jpg
original_img: http://www.inquisite.org/images/inquisite_collage.png
order: '028'
- pid: bookworm
done: true
title: Bookworm
Expand Down
22 changes: 0 additions & 22 deletions source/_projects/inquisite.md

This file was deleted.

0 comments on commit 18d8c2f

Please sign in to comment.