diff options
author | Camil Staps | 2021-09-13 11:35:26 +0200 |
---|---|---|
committer | Camil Staps | 2021-09-13 11:35:26 +0200 |
commit | f04a92d660b2e3838a38fb2b88328cb770b33b4d (patch) | |
tree | f601ddcbb7f20246fdb33a0d172c71bc83cc2091 /resources/pug/finals | |
parent | Update meta description (diff) |
Add conferences page
Diffstat (limited to 'resources/pug/finals')
-rw-r--r-- | resources/pug/finals/conferences.pug | 212 |
1 files changed, 212 insertions, 0 deletions
diff --git a/resources/pug/finals/conferences.pug b/resources/pug/finals/conferences.pug new file mode 100644 index 0000000..ab3694a --- /dev/null +++ b/resources/pug/finals/conferences.pug @@ -0,0 +1,212 @@ +extends /layout.pug + +block extra_head + meta(name='description', content='PhD candidate in Semitic linguistics') + + style. + table.conferences { + margin-top: 1em; + } + + table.conferences tr.year { + border-color: black; + border-style: solid; + border-width: 1px 0 0 0; + } + + table.conferences tr.spacer { + height: .8ex; + } + + table.conferences tr.year td { + padding-bottom: .4ex; + } + + table.conferences tr.entry { + color: gray; + } + + table.conferences i.fas, table.conferences i.fab { + margin-right: .2ex; + } + +block titleContainer + +block content + - + const BIKE_CARBON_FOOTPRINT_KM = 30; + const DOMESTIC_FLIGHT_THRESHOLD = 500; + + h1 Visited conferences + + p. + This page gives an overview of the conferences, workshops, and summer schools I have visited together with the #[strong travel carbon footprint]. + The #[strong accomodation] I used is also listed, but not included in the carbon footprint. + The calculation is based on averages from #[a(href='https://ourworldindata.org/travel-carbon-footprint', target='_blank') Our World in Data]. + + p. + For #[strong biking], I counted 30g CO#[sub 2] / km as a rough estimate based on my diet. + #[strong Flights] shorter than 500km are counted as 'domestic' (255g / km), otherwise they are counted as short/long-haul (averaged on 153g / km). + Distances (when hovering a travel mode symbol) are given for one-way trip only (but the footprint is computed for all travel). + + p. + I don't know much about computing carbon footprint. + #[strong Please let me know if you think something can be done better!] + + p. + The carbon footprint per capita of the Netherlands was #[strong 9.66] t (9,660,000 g) in 2017, according to #[a(href='https://ourworldindata.org/co2/country/netherlands?country=NLD~DEU~DNK~SWE~FRA~BEL', target='_blank') Our World in Data]. + The global average was #[strong 4.79] t (4,790,000 g) in 2016, according to #[a(href='https://www.worldometers.info/co2-emissions/co2-emissions-per-capita/', target='_blank') Worldometer]. + + - + // Accepts "Y-M-D to [[Y-]M-]D", i.e. you can leave out repeated parts in + // the second date. "2019-7-8 to 10" means "2019-7-8 to 2019-7-10". + // You can also give only one date. + function parse_date_range(s) { + s = s.split(' to ').map(d => d.split('-')); + + let from = {year: s[0][0], month: s[0][1], day: s[0][2]}; + + // If only day or month-day is given in the second date, add year-month + // or year from the first date. + let to; + if (s.length == 1) + to = from; + else if (s[1].length == 1) + to = {year: from.year, month: from.month, day: s[1][0]}; + else if (s[1].length == 2) + to = {year: from.year, month: s[1][0], day: s[1][1]}; + else + to = {year: s[1][0], month: s[1][1], day: s[1][2]}; + + return { + from: new Date(from.year, from.month-1, from.day), + to: new Date(to.year, to.month-1, to.day) + }; + } + + function nr_of_days(conf) { + return 1 + (conf.to - conf.from) / 24 / 3600 / 1000; + } + + // Computes footprint in grams CO2, according to + // https://ourworldindata.org/travel-carbon-footprint. + // See the explanation in the paragraph at the top of the page. + function compute_carbon_footprint(conf) { + let footprint = 0; + + if (conf.bike) + footprint += BIKE_CARBON_FOOTPRINT_KM * conf.bike; + if (conf.ferry) + footprint += 19 * conf.ferry; + if (conf.plane) + footprint += (conf.plane < DOMESTIC_FLIGHT_THRESHOLD ? 255 : 153) * conf.plane; + if (conf.train) + footprint += 41 * conf.train; + + return footprint * (conf.multiplier || 2); + } + + function year_summary(conferences, year) { + conferences = conferences.filter(c => c.from.getFullYear() == year); + + return { + conferences: conferences.length, + total_days: conferences.map(nr_of_days).reduce((x,y) => x + y, 0), + total_footprint: conferences.map(compute_carbon_footprint).reduce((x,y) => x + y, 0), + }; + } + + let conferences = []; + + mixin conf(dates, location, distance, shorttitle, title) + - + let conf = parse_date_range(dates); + conf.location = location; + conf.distance = distance; + conf.shorttitle = shorttitle; + conf.title = title || shorttitle; + + Object.assign(conf, attributes); + + conf.footprint = compute_carbon_footprint(conf); + + conferences.push(conf); + + mixin listconferences() + - + conferences.sort((x,y) => x.from - y.from || x.to - y.to); + let last_year = null; + + table.conferences + thead + tr + th Year + th Month + th Location + th Travel modes + th(colspan=2) Carbon footprint (g CO#[sub 2]) + th Accomodation + th Title + + - for (const conf of conferences) + if last_year != conf.from.getFullYear() + - last_year = conf.from.getFullYear(); + - let summary = year_summary(conferences, last_year); + tr.spacer + tr.year + td= conf.from.getFullYear() + td(colspan=7). + #[strong= summary.conferences] conference#{summary.conferences == 1 ? '' : 's'} + over #[strong= summary.total_days] day#{summary.total_days == 1 ? '' : 's'}, + for a total of #[strong= (summary.total_footprint).toLocaleString('en')]g CO#[sub 2], + averaging #[strong= (summary.total_footprint / summary.total_days).toLocaleString('en', {maximumFractionDigits: 0})]g CO#[sub 2] / day. + + tr.entry + td + + td(title!=conf.from.toDateString() + ' to ' + conf.to.toDateString()) + = conf.from.toLocaleString('default', {month: 'short'}) + if conf.from.getMonth() != conf.to.getMonth() + | – + = conf.to.toLocaleString('default', {month: 'short'}) + + td + = conf.location + if conf.distance + = ' (' + (conf.distance).toLocaleString('en') + 'km)' + + td + if conf.bike + i.fas.fa-bicycle(alt='Bike', title!='Bike: ' + conf.bike + 'km') + if conf.ferry + i.fas.fa-ship(alt='Ferry', title!='Ferry: ' + conf.ferry + 'km') + if conf.train + i.fas.fa-train(alt='Train', title!='Train: ' + conf.train + 'km') + if conf.plane + i.fas.fa-plane(alt='Plane', title!='Plane: ' + conf.plane + 'km') + + td.text-right= (conf.footprint).toLocaleString('en') + + td.text-right= (conf.footprint / nr_of_days(conf)).toLocaleString('en', {maximumFractionDigits: 0}) + ' / day' + + td + if conf.airbnb + i.fab.fa-airbnb(alt='Airbnb', title='Airbnb') + if conf.hotel + i.fas.fa-hotel(alt='Hotel', title='Hotel') + if conf.friendstay + i.fas.fa-home(alt='With a friend', title='With a friend') + + td + a(href!=conf.url, target='_blank', title!=conf.title)!= conf.shorttitle + + +conf('2017-7-10 to 21', 'Leiden', 61, 'Summer School in Languages and Linguistics', 'Leiden Summer School in Languages and Linguistics')(train=75, multiplier=20, url='https://www.universiteitleiden.nl/en/education/study-programmes/summer-schools/summer-school-in-languages-and-linguistics') + + +conf('2019-7-8 to 10', 'Cambridge', 393, 'BHLAP', 'Biblical & Rabbinic Hebrew: New Perspectives in Philology & Linguistics')(bike=305, ferry=200, airbnb, url='https://www.ames.cam.ac.uk/whats-on/events-archive/biblical-rabinic-hebrew-conference') + +conf('2019-10-7 to 8', 'Utrecht', 59, 'CLSoR', 'Workshop on Cross-Linguistic Semantics of Reciprocals')(train=72, friendstay, url='https://rocky.sites.uu.nl/workshop-on-cross-linguistic-semantics-of-reciprocals/') + + +conf('2020-3-31', 'Online', 0, '#SemiticsTwitterCoronaConference')(url='https://www.academia.edu/42297049/') + +conf('2020-10-11', 'Online', 0, 'Syntax Workshop')(url='https://sites.google.com/view/syntaxworkshop') + +conf('2020-11-29 to 12-11', 'Online', 0, 'SBL Annual', 'SBL Annual Meeting')(url='https://www.sbl-site.org/meetings/Congresses_Abstracts.aspx?MeetingId=37') + + +listconferences() |