> For the complete documentation index, see [llms.txt](https://www.sonificationkit.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.sonificationkit.com/data-sonification/exercises/exercise-3-new-york-city-evictions.md).

# Exercise 3: New York City Evictions

**Goal**: Sonify the trend of residential evictions in New York City since 2017, intentionally revealing the “quiet” during the COVID-19 pandemic, and the concerning increase since the moratorium ended.

**Tools**: Python, Logic Pro X

**Method**: Parameter Mapping

{% hint style="info" %}
Choose one 👉 *Jupyter Notebook* or your *Dev Environment / IDE* of choice.\
Not sure? Jupyter Notebook is web-based, and doesn't require a Python installation on your local machine.
{% endhint %}

***

### Method 1: Jupyter Notebook

1. Download the files in [this folder](https://github.com/awalmer/Sonification-Exercises/tree/main/NYC%20Evictions/Jupyter) and save them to a folder on your computer.
2. Launch Jupyter by going to [this page](https://jupyter.org/try-jupyter/). Drag and drop your downloaded folder of files into the panel on the left side.\
   (You can also create a new folder and upload your files manually.)\
   ![](/files/MuDXLdXEWmqtCYwyCV90)
3. Enter the folder and double-click on the notebook file, “nyc-evictions-data2midi.ipynb.”
4. Run each cell in the notebook by pressing Shift + Enter. (Or you can run the entire script: Run > Run All Cells.)
5. The cells are organized by steps with headers and include comments. Read each section to understand the logic of the code.\
   ![](/files/mE5X43nxoU9juLKzZCtr)
6. A MIDI file called “nyc-evictions.mid” will be generated. Download this file (Right click > Download).

### Method 2: Good Old Python

1. Download the files in [this folder](https://github.com/awalmer/Sonification-Exercises/tree/main/NYC%20Evictions/Python) and save them to a folder on your computer.
2. Open the downloaded folder in your favorite IDE (*integrated development environment*). I like to use Visual Studio Code.
3. Run the script – it is organized by steps, with plenty of little comments. Read each section to understand the logic of the code.
4. A MIDI file called “nyc-evictions.mid” will be generated. Huzzah!

### Audio Editing

{% hint style="success" %}
Continue these steps after completing the steps in Method 1 or 2.&#x20;
{% endhint %}

1. Launch your audio editor of choice. I prefer Logic Pro X (this is a DAW \~ *digital audio workstation*), but there are other [options](/data-sonification/tools.md#audio-editing-tools).
2. Place the MIDI file into a new Software Instrument track.
3. Select your preferred software instrument, and adjust effects until you are satisfied with the resulting sound.
4. Consider further [customization](/data-sonification/audio-editing.md#some-customization-examples-to-consider) of your sonification. \
   &#x20; <i class="fa-arrow-right">:arrow-right:</i>   Add a background soundscape, or auditory icons to indicate events. Here are some [free audio sample resources](/data-sonification/tools.md#audio-sample-resources) for you.\
   &#x20; <i class="fa-arrow-right">:arrow-right:</i>   Add a tempo marker to indicate the passing of each year.\
   &#x20; <i class="fa-arrow-right">:arrow-right:</i>   Make it yours!
5. When you are happy with your sonification, export and share! File > Bounce > Project or Section… > save your file.
6. The project is now an audio file that can be embedded in a digital article or attached to an animated visualization. Like [this](https://youtu.be/8h3_ijIudHo?si=-j4sqVETh9uBVXlS), for example!

<br>

Data Source: [NYC OpenData](https://data.cityofnewyork.us/City-Government/Evictions/6z8x-wfk4/about_data).
