Skip to content

Instantly share code, notes, and snippets.

@mtaptich
mtaptich / Readme.md
Last active July 27, 2016 15:29
Urban Dynamometer Driving Schedule

Urban Dynamometer Driving Schedule is the standardized dynamometer test on fuel economy that represents city driving conditions for light-duty vehicles.

@mtaptich
mtaptich / README.md
Last active June 5, 2016 22:12
Intake Fraction (PM2.5)

Intake fraction (iF) is a measurement used to describe the mass of pollution inhaled for some quantity of pollution emitted to the atmosphere. Scientists, engineers, and public health officials use this metric in the process of evaluating the exposure consequences attributable to a given emissions source.

The map above shows iF measurements for particulate matter taken from the Air Pollution Emission Experiments and Policy model. Notice that differences in proximate population density and local meteorology can produce substantial variability in iFs.

@mtaptich
mtaptich / README.md
Last active June 5, 2016 17:33
Capture the Plume!

The control of contaminant migration in groundwater is a common task for environmental engineers. One way of completing this work is by installing recovery wells downstream of the chemical plume. In this visualization, I illustrate how pumping rates effect the "capture zone" of the recovery well under various groundwater flow rates. The setting assumes that the plume is contained within a confined aquifer that is 30m thick. The coordinates are a plan view of the system and the groundwater flow direction is shown via the moving circles.

@mtaptich
mtaptich / index.html
Last active May 28, 2019 05:07
MUNI Greenhouse Gas Emissions (Realtime)
<!DOCTYPE html>
<meta charset="utf-8">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<style>
html{
background-color: #000;
}
body {
width: 1024px;
@mtaptich
mtaptich / README.md
Last active March 12, 2018 03:17
Filter map with slider in d3.js

A simple way to filter spatial data in d3.js using HTML5 range input slider.

Data: The greenhouse gas emissions needed to ship logs for lumber, pulping, etc. to Chicago by a combination of rail and truck freight modes. We call the spatial extent in which trade is possible given an environmental budget a freightshed. Read more about this concept, DOI: 10.1021/acs.est.5b01697.

@mtaptich
mtaptich / README.md
Last active June 23, 2016 20:15
EIO-LCA Visualization

Economic Input-Output Life Cycle Assessment (EIO-LCA) is a method to quantify the material, energy, and environmental impacts resulting from activities in our economy. The Economic Input-Output (EIO) method was first formalized by Nobel Prize winning economist, Wassily Leontief, in the 1970s. It took two decades before the computation performance of modern computers was sufficient enough to utilize this model at scale. Since the mid-1990s, EIO-LCA has been used to estimate economy-wide environmental impacts of many products and services, such as automobiles, refrigerators, computers, paper, retail trade, food systems, etc.

In this illustrative example, I model a simple economy consisting of three industrial sectors: steel, electric

@mtaptich
mtaptich / README.md
Last active March 16, 2016 02:28
Bus Fuel Consumption

A simple interface for visualizing the marginal effects on fuel combustion given a change in vehicle attributes.

@mtaptich
mtaptich / README.md
Last active March 15, 2016 21:58
Knapsack Table

A simple example of 0/1 Knapsack Problem Dynamic Programming in d3.js.

Items are first ranked according to weight. Next, at each stage (e.g., item:capacity combination) in the algorithm, the model assesses whether adding a new item (row) improves the solution at that paritcular weight capacity (column). If so, it adds the new item and updates the best solution; otherwise, it obtains the previous best solution. Click the tiles to examine each step.

Once the final solution is found, the model back calculates the optimum item set. Rows with highlighted tiles (blue) correspond to items in this set.

Note: This model purposefully shows only one solution. Can you determine when multiple solutions exist?

@mtaptich
mtaptich / README.md
Last active March 8, 2016 03:25
Canvas + Interpolate

Particles flowing along a gradient.

@mtaptich
mtaptich / README.md
Last active May 28, 2019 05:09
Simple Traveler

Simple example of displaying a route in Leaflet using d3.js.