Biometric Mapping II

This is Part 2 of a series on my Biometric Mapping project. See the first post for an introduction.

bm1.JPG

Biometric Mapping is about selecting one or more metrics, such as temperature, light, heart rate, or neural activity, and mapping it with some kind of positioning system. These can be mixed and matched to produce devices for mapping the unseen characteristics of different spaces. So far, I've adopted Arduino as the platform for collecting these metrics. Arduinos are single-board micro controllers that can host sensors and run software to record the data they collect. 

For the first experiment in mapping, I paired temperature as my metric with time-lapse photography as my positioning device. I have an Arduino board with a temperature sensor that illuminates one to three LEDs based on the air temperature in that location. By attaching a 9v battery as a mobile power source, I can then set up a long exposure photo and carry the Arduino around the room for 30 seconds. The warmest places in the room activate the red LED, and the coolest places in the room activate the green. Success! Now on to a more ambitious pairing.

bm5.JPG

Next, I want to measure temperature and daylight with GPS as my positioning system. Unlike the LED long exposure photography, I will actually have to record the data I collect and sync it to a time stamp and GPS coordinates.

bm2.JPG

This is how the Arduino is set up. I have a battery pack for mobile power (6 AA batteries are more efficient than a 9v), a TMP36 temperature sensor, and a photocell for detecting light. I need a real-time clock for recording the time, and I need a way to store all of this data. I'm using an Adafruit data logger shield to keep time and record it to an SD card.

IMG_20180209_131508233 - Copy.jpg

The data logger shield requires some header pins to be soldered onto it so it can be inserted on top of the Arduino. I edited some example Arduino programs so that it would record light, temperature, and a time stamp once a second, and uploaded the program to the Arduino. Once the code is uploaded, it stays on the Arduino and immediately begins working when the battery pack is plugged in. There are GPS shields for Arduino that would allow me to record location as well, but for now, I'm using a GPS app on my phone with a time stamp, and running the two simultaneously. Now it's ready for data collection!

IMG_20180210_162058613 - Copy.jpg

The setup is a little conspicuous, so I found it to be more discrete and efficient to set it up on the front of my car or bike, with a paper shield to hide all the fun bits, leaving only the temperature and light sensors exposed. Then I go for a joyride through whatever space I want to map.

Now for the second half of the workflow. This part came a lot more naturally to me, because I spend much more of my time with Excel and Grasshopper than I do with Arduino. I upload the GPS path from my phone to the computer, and upload the data from the SD card. Both of these come in the form of a .CSV, which I combine into one file.

bm4.JPG

I read the .CSV file through Grasshopper, and break out each data point: Time, Light, Temperature, Latitude, and Longitude. This particular joyride was 30 minutes, or about 1,800 seconds, which means 1,800 data points. If this becomes too dense for some operations down the line, I add a sift pattern to only take every other data point, or every third data point, and so on. I'm also choosing the domain of each, because my phone GPS and Arduino don't start at exactly the same time, and I'll need to calibrate it slightly to sync. I'm converting degrees latitude and longitude to feet, because working with true degrees is awful in Rhino. A big issue I had with this setup is that the GPS app on my phone didn't always record a data point every second. It was more like two out of every three second. So I had to interpolate that data and re-plot it to get a single data point every second. Finally, I'm plotting the location with a value to get paths like this:

Light in the Pearl District, San Antonio

Light in the Pearl District, San Antonio

Temperature in the Pearl District, San Antonio

Temperature in the Pearl District, San Antonio

Once I have all of this mapped, I'm using Proving Ground's Non-Linear Regression component, a fun new tool from LunchBoxML. Nonlinear regression takes several three-dimensional points (X=longitude, Y=latitude, Z=light or temperature) and interpolates the rest of the surface.

Nonlinear regression to interpolate the temperature of the rest of the space, as the domain expands.

Nonlinear regression to interpolate the temperature of the rest of the space, as the domain expands.

Nonlinear regression worked very well for this, it just just takes some fiddling with the sigma value to get meaningful results. A low sigma value (left) is very local and does not smooth itself out or interpolate very far from a real data point. A high value (right) smooths things out a little too much for this scale.

bm6.JPG

By overlaying the light and temperature maps onto a plan, I get a somewhat accurate map.

Temperature at the Pearl

Temperature at the Pearl

Daylight at the Pearl

Daylight at the Pearl

I consider this a good proof of concept, and now I'll have to think carefully about what tests would be most meaningful to do next. These maps don't yet tell me anything surprising: It appears to be darker under bridges and behind tall buildings. This is about the scalar limit of GPS. Being in or near a building seems to interfere with its accuracy, so if I want to actually map interior spaces with more precision, I will need to explore other positioning options besides GPS.

The more passes I take in a location, the more accurate the results will be. This is not a bad amount of data for a half hour bike ride in a space this big, but it would be interesting to get more accurate and nuanced results in a smaller space.

Next steps are too think about what other metrics to measure (perhaps incorporate some biometrics?) and to consider alternative positioning systems.

Biometric Mapping

These metrics are usually collected manually, either at an early site visit, or as a post-occupancy evaluation of a built project. It usually involves printing a gridded plan of a building and walking through with a daylight meter, thermometer, or anemometer and taking readings every few feet while marking it on a clipboard. This is cumbersome and it takes a long time to map a large space. 

Read More

Enkrateia

For the last 24 months I've recorded my activities in six categories: Daily, Health, Music, Social, Work, and Education (each represented by a different color in the graph below). I started this for the purpose of self-accountability during grad school, when there just aren't enough hours in the day. This lives in a giant Excel spreadsheet that I update daily.

The following is a snapshot of 2015. More thorough analysis to come.

Read More

Watercolor Wednesday

A few new drawings from Watercolor Wednesday, a weekly lunchtime watercolor class conducted by Matt Morris at Lake | Flato.

Lake | Flato's Josey Pavilion. The trees are black watercolor paint with a very dry brush, and the grass was done with charcoal pencil. Fun Fact: use a nail to make indentations for the grass, then go over the surface with a charcoal pencil. The vertical indentations will stay white.

A section through my Texas Academy of Science project. From right to left: entrance at Heritage Plaza, gift shop, courtyard amphitheater, planetarium, and gallery over the Trinity River.  This is white charcoal pencil on black foam core, with blue charcoal sky.

Lake | Flato's El Cosmico in Marfa, Texas, re-imagined as a monolithic stone ruin. A monument marking sunrise and sunset on the summer solstice.

A section perspective done with black watercolor and charcoal.

Fajada Butte at Chaco Canyon. Watercolor on black foam core.

One Year of Shirts

For the last year, I've recorded what color shirt I wear each day.

And the results are shocking.

No, not really.

Here they are, from May 1, 2015 to April 30, 2016.

6 white shirts at Chaco Canyon in May.

Less black in the summer, more black in the winter.

Much less color diversity after starting work in September.

114 days of dark blue (31%).  

179 days of any shade of blue (49%)

Bluest month: January (45% dark blue) (65% any shade).

Yes, I have more than one dark blue shirt.

Most consecutive days with the same color: 3 (on 6 occasions).

Next year: socks!

Energy Dots

Detailed home energy data is becoming more accessible with energy providers like CPS and PG&E replacing their electric meters with smart meters that log hourly data.  If you have hourly energy data and feel the urge to make a shiny rainbow calendar from it, here's how to make one with Grasshopper for Rhino.  This is seven months of my apartment energy use, with an energy dot every 15 minutes. The radius of each dot is relative to my total energy use at that time. The maximum value was about 1.8 kWh. The dot color represents the outside temperature, <40 degrees in blue, and >85 in red.

This is similar to an energy use graphic by Michael VanDaniker, but this simplifies the weather data from Weather Underground so you don't need to know how to use their API. 

The Grasshopper script, available for download here, takes a spreadsheet of energy data and a spreadsheet of weather data and plots out the energy dots in 3D.

If you have a smart meter installed by CPS, login to your dashboard, select My Energy Use > Access My Energy Portal, then Select view: by day.  Select 'Export your data' and 'Export usage for a range of days'. Open your .csv Excel file and delete all the title rows so your first line of data is in Row 1 like the image above.

Weather Underground has daily historical data available for download. Go to your city, select History > Custom, select the same date range as before, and scroll all the way to the bottom and select 'Comma Delimited File' to get hourly weather data as text. Copy and paste everything into Excel.

When your data is copied into Excel, make sure your data in column A is highlighted, select Data > Text to Columns > Delimited > Next > Check Tab and Comma > Next > Finish. Now your data should be separated into columns like the image on the right. Save your two spreadsheets as .csv or Comma Delimited files.

Now you're ready to import into Grasshopper!

The calendar view at the top is from the Top viewport in Rhino. Set the background to black by going to Tools > Options > Appearance > Color. Then export a hi-res image from Rhino by hitting Ctrl: P and selecting 'Image File' as the destination. Remember to check the 'Background Color' box under the Visibility tab.

After I export the image, I put it into Photoshop and add some Gaussian blur and Motion blur to smooth it out (Filter > Blur > Motion Blur, then set the right angle). Duplicate the original layer and set every duplicate layer to the 'Lighten' blending mode so they can be overlaid.

From the Front viewport in Rhino, we get a view of each day overlaid on top of the next.  Dots are vertically offset and colored based on outside temperature.  If you have even more detailed data from individual circuits, you can set the vertical offset to represent another variable like HVAC energy and get a nice energy profile of your building.

And the Perspective View is just for fun.