Monthly Archives: November 2016

R Open Lab – Writing Loops

The topic for today is writing loops in R. Looping is equivalent to iterating or just replicating instructions. By letting the computer take over the repetitive work, we make our life much easier. We also talked a bit about how to avoid writing loops and make our code more efficient. 

Thank you to everyone who showed up today. Today’s session is the last session for this semester. Good luck with the finals and see you guys next year! 😀

Map Club — WORKSHOP (Part I) — D3.js

20160901_banner_fall_v1

In its second to last session, Map Club took on the first part of a guided introduction to D3.js. D3.js is a JavaScript library for manipulating documents based on data. This workshop, focusing on the general setup and visualization capabilities of the library, led participants through the basics of SVG, data types, and generating simple shapes from custom arrays.

At root, complex visualizations are comprised of basic elements. Jacques Bertin’s six retinal properties describe the different visual attributes one can use to differentiate between data-driven shapes. With some help from the MDN SVG element reference, attendees learned how to apply graphic styles to SVG primitives in the browser, achieving Bertin’s vision with a few lines of code.

bertin

01

chart

From top: Jacques Bertin’s six retinal properties, a series of colorful circles from a workshop example, a stacked bar chart generated using D3.js

Map Club will meet for its final session of the semester on the afternoon of December 2nd. We will walk through basic geovisualization capabilities in D3.js, building upon the knowledge introduced in this workshop. Hope to see you there!

Sign up here if you would like to receive updates on future Map Club sessions. For this session’s resources and materials, visit the Map Club Github repository.

R Open Lab – dplyr package

This Wednesday we talked about how to use the dplyr package in R. The dplyr package makes data manipulation faster, easier and more straightforward. We covered the syntax and functions of the package, and tried it out on our Walmart Store Sales dataset. We also briefly introduced R Notebook and R presentation.

R open lab will be suspended next Wednesday due to the Thanksgiving holiday.

See you guys on Wednesday 11/30/2016 10:00-12:00 at DSSC!

Also, we will host a R workshop about Simple Linear Regression this Friday 11/19/2016 10:00-11:00 at the Science & Engineering LIbrary. Beginners are welcome!

Map Club — Cartogram Hexmaps with Tilegrams

20160901_banner_fall_v1

The latest session of Map Club took a data journalism bent: last Friday, we focused on creating cartogram hexmaps with Tilegrams, a generator by data visualization studio Pitch Interactive. The tool enables users to quickly create proportionate hex-based maps of the United States using custom or built-in data, and export generated maps to both SVG and topojson.

Tilegrams provides intricate functionality for tweaking state proportions to be statistically accurate, and is relatively versatile in its export capabilities. It did have a tendency to lose state labels and borders in its SVG output, providing a less-than-detailed file for download than the browser would reflect. Participants nonetheless created a range of interesting images, uploading Tilegrams topojson data to the geojson.io interface (a tool that Map Club explored in a session from earlier this semester), downloading and visualizing data from the U.S. Census (2010), and editing and rendering a custom CSV file in the data upload window.

ruoran_edited_02

daniel_edited

emily

From top: population count Tilegrams topojson file imported into geojson.io by Ruoran Lin, urban populations by state (US Census 2010) by Daniel Chi Cook, population counts per state (working)

Next week, for its penultimate session, our meeting will be a guided workshop focused on a general introduction to the D3.js JavaScript library. Part II of the D3.js workshop, focused specifically on geovisualization, will take place after Thanksgiving. Hope to see you there!

Map Club has a mailing list! Sign up here if you would like to receive updates on future sessions. For this session’s resources and materials, visit the Map Club Github repository.

Python Open Labs – Session 7

Strings form an important data type in any programming language, especially involving text, processing files such as log files, articles etc. Python provides a string as a built-in data type supported with strong library functions that we looked at in today’s session.

The course material for the same can be accessed on: https://goo.gl/YP0c2E

Next week we will move ahead with handling files in python and extracting data from text files, so knowing strings before that class will come in really handy to get you up to speed.

See you next Friday, November 18th at 11:00 AM at DSSC Lehman Library 🙂

Map Club — WORKSHOP — Introduction to QGIS

20160901_banner_fall_v1

Last Friday, Map Club embarked upon its second workshop of the semester. This time, we focused on QGIS, a free and open source geographic information system that offers powerful tools for data editing, viewing, and analysis. Participants learned how to import shapefiles into the interface, explore data using the attribute table, and visualize land use in Manhattan with public building footprint data. 

01

02

03

daniel

From top: zoom to layer, attribute layer, land use map, Daniel Chi Cook

This coming Friday will be a free-form hack session on CartoGrid, a grid-based cartogram generator. Hope to see you there!

Sign up here if you would like to receive updates on future Map Club sessions. For this session’s resources and materials, visit the Map Club Github repository.

Python Open Labs – Session 6

Hi

In the 6th session of Python Open Labs, today we covered the concepts on comparison operators, logical operations and complex logical expressions. If you attended today’s session, I encourage you all to try out the practice problems from the slides on the google drive link given below.

Python Open Labs Slides: https://goo.gl/YP0c2E

Tip of the day: Practise! Practise! Practise!  (It’s one thing that remains constant)

Hope to see you next Friday, 11:00 AM at DSSC