<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Dan Henri on Medium]]></title>
        <description><![CDATA[Stories by Dan Henri on Medium]]></description>
        <link>https://medium.com/@djosephhenri?source=rss-e850b85608de------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*bOLEqcdPi50-njfhHqnbCQ.jpeg</url>
            <title>Stories by Dan Henri on Medium</title>
            <link>https://medium.com/@djosephhenri?source=rss-e850b85608de------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 17:19:55 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@djosephhenri/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[A List of Geo-Visualizations]]></title>
            <link>https://medium.com/@djosephhenri/a-list-of-geo-visualizations-af2577d6cf16?source=rss-e850b85608de------2</link>
            <guid isPermaLink="false">https://medium.com/p/af2577d6cf16</guid>
            <category><![CDATA[geoviz]]></category>
            <category><![CDATA[maps]]></category>
            <category><![CDATA[dataviz]]></category>
            <category><![CDATA[geospatial]]></category>
            <dc:creator><![CDATA[Dan Henri]]></dc:creator>
            <pubDate>Wed, 19 Sep 2018 14:14:55 GMT</pubDate>
            <atom:updated>2018-10-27T06:14:16.892Z</atom:updated>
            <content:encoded><![CDATA[<p>This is a list of interesting web maps, or other geographical visualizations that I’ve found online. I hope people who are interested in making web maps can find some inspiration here, and that everyone can just learn a little about what these maps are trying to show. I’ll be updating it whenever I find a something new.</p><p><a href="https://earth.nullschool.net/"><strong>Earth</strong></a> —<strong> </strong>A pretty well-known but very cool 3d model of earth with live-updating data like wind-speed, particulate matter, and humidity.</p><p><a href="https://air.nullschool.net/"><strong>Tokyo Wind Map</strong></a><strong> </strong>— Very similar to the above, but just within the boundaries of Tokyo.</p><p><a href="https://vdata.nikkei.com/newsgraphics/income-map/#10/139.5394/35.5747/2016/1/0,2,68,255"><strong>Map of Change in Income Per Person / 一人あたり所得増減マップ</strong></a><strong> — </strong>Map of Japan showing change in income per person from one year to the next. Blue means less, red means more.</p><p><a href="https://dsl.richmond.edu/panorama/redlining/#loc=4/36.71/-96.93&amp;opacity=0.8"><strong>Mapping Inequality</strong></a> — A map displaying the old redlining maps made by the Government’s Home Owners’ Loan Corporation. Basically ranked neighborhoods’ loan potential by how many minorities lived there. You can look at the descriptions of each neighborhood and see just how blatantly bigoted this was.</p><p><a href="https://planninglabs.nyc/projects/"><strong>NYC Planning Labs</strong></a> — NYC Planning Labs is a sort of branch of the NYC Planning Department who just focus on using the vast amount of planning-related data NYC has and making cool and informative interactive visualizations with it. Their page has multiple interesting projects to explore.</p><p><a href="http://America is more diverse than ever — but still segregated"><strong>America is more diverse than ever — but still segregated</strong></a> — Astounding, amazing, ambitious project from Washington Post reporters Aaron Williams and Armand Emamdjomeh showing the level of diversity and segregation in US cities.</p><p><a href="https://demographics.virginia.edu/DotMap/"><strong>The Racial Dot Map</strong></a> — A dot map of the US where one dot represents one person color-coded by census race category. Shows some pretty stark divisions and helped me understand how serious segregation is in the US.</p><p><a href="https://www.vox.com/a/lead-exposure-risk-map"><strong>Lead Risk Map</strong></a> — Map from Vox showing lead poisoning risk across the US. This is what got me into maps.</p><p><a href="https://outline-prod.imgix.net/20180523-iMQoHr2lMNq6V208e9jf?auto=&amp;fm=mp4&amp;q=60&amp;w=1280&amp;s=01baa938e7226ad4329246727bdb41cf"><strong>Growth of China’s Subways</strong></a><strong> </strong>— Map-ish gif showing the incredible rate of growth of Chinese Subways from 1990–2020.</p><p><a href="https://www.nytimes.com/interactive/2016/05/18/upshot/which-buildings-in-manhattan-couldnt-be-built-again-today.html"><strong>Which Buildings in Manhattan Couldn’t be Built again Today</strong></a><strong> — </strong>Map showing what existing buildings in Manhattan wouldn’t be allowed to be built with today’s regulations.</p><p><a href="http://www.ninepointfive.org/"><strong>9.5</strong></a> — A 3d globe displaying the location and intensity of every earthquake over the past 30 years.</p><p><a href="https://www.nytimes.com/interactive/2018/10/12/us/map-of-every-building-in-the-united-states.html"><strong>A Map of Every Building in America</strong></a> — Amazing map showing the outline of every building in the US.</p><p><a href="https://1945.melbourne/"><strong>Melbourne 1945</strong></a> — Aerial imagery of Melbourne from 1945 and 2015 (I think). Urban sprawl galore.</p><p><a href="https://pudding.cool/2018/10/city_3d/"><strong>Human Terrain</strong></a> — Interactive map showing change in population over time from cities all around the world.</p><p>That’s it for now! I know I’ve seen many more great maps than this but I can’t remember them at the moment. I’ll be adding more as I come across them though.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=af2577d6cf16" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mapping Detroit’s high-poverty areas and their access to public transit using geopandas, Mapbox…]]></title>
            <link>https://medium.com/@djosephhenri/mapping-detroits-high-poverty-areas-and-their-access-to-public-transit-using-geopandas-mapbox-72fa21a0bd79?source=rss-e850b85608de------2</link>
            <guid isPermaLink="false">https://medium.com/p/72fa21a0bd79</guid>
            <category><![CDATA[detroit]]></category>
            <category><![CDATA[transportation]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[urban-planning]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Dan Henri]]></dc:creator>
            <pubDate>Thu, 17 May 2018 14:14:34 GMT</pubDate>
            <atom:updated>2018-05-20T09:34:15.751Z</atom:updated>
            <content:encoded><![CDATA[<h3>Mapping Detroit’s high-poverty areas and their access to public transit using geopandas, Mapbox, and Turf.js</h3><p>This article/tutorial will be mostly the process of how I go about making a map which shows the areas of high poverty in Detroit, and their access to public transport. For a little background, Detroit generally has <a href="https://www.freep.com/story/news/local/2015/02/06/michigan-detroit-public-transit/22926133/">terrible</a> public transit compared to other large US cities. In 2016, three counties in the Metro Detroit area voted on a comprehensive transportation bill which failed to pass. There was a plan to put another plan up to a vote in 2018, which is <a href="https://www.detroitnews.com/story/news/local/oakland-county/2018/02/07/brooks-patterson-regional-transit/110201742/">now in jeopardy</a> because one country administrator.</p><p>This exercise will attempt to investigate a small part of this story: poor residents’ access to public transit. I’m defining access here by the proximity of a transit station. This won’t actually reveal how useful any station or line is for an individual. You can have a bus stop right outside your house and still have a 2 hour commute if you depend on transit. But that and other issues are outside of the scope of this project. Without further ado, let’s get to our data.</p><h4>Data Gathering</h4><p>As far as I know, the best data to get for this project would be American Community Survey data from the Census Bureau. First thing I’ll do is get my census tract boundary data. A census tract is the second smallest geographical unit that the Census Bureau breaks their data into. Because we are mapping at quite a small scale, a smaller unit of geography would be nice, but the statistical margin of error for our data is too high for my liking at that scale. Instead of getting this data from the Census Bureau, I’m going to go to the official <a href="https://data.detroitmi.gov/">Detroit Open Data</a> portal. We can get the data in GeoJSON format <a href="https://data.detroitmi.gov/Government/Census-Tracts-2010/mbx2-k8cj">here</a>. Now throw it into <a href="http://mapshaper.org/">Mapshaper</a> to have a look:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bB_IX5PqF8KHOBt2fAPbQA.png" /><figcaption>Yes, that hole is supposed to be there.</figcaption></figure><p>Looks like Detroit, so we’re on the right track. I named this file “detroit-tracts.geojson”, for reference. Now, let’s find data on the poverty rate by block group.</p><p>To get this data we’ll use the US Census Bureaus API. Personally I had a really difficult time getting any of my calls to work, so I ended up using the Python package “census” and “us”. It would be easier to just use a curl command in the terminal but I just couldn’t make it work. Below are the commands I used in a Python 3 Jupyter Notebook to download, view, and export the data as a csv:</p><pre>from census import Census<br>from us import states<br>import pandas as pd<br>import json</pre><pre>##<em>Download census data for all of Wayne Country</em><br>c = Census(&quot;<em>YOUR_KEY_HERE</em>&quot;)<br>pov_list = c.acs5.state_county_blockgroup((&#39;NAME&#39;, &#39;B17001_001E&#39;), &#39;26&#39;, &#39;163&#39;, Census.ALL)</pre><pre>##<em>Convert data to json format</em><br>pov_json = json.dumps(pov_list)</pre><pre>##<em>Put in pandas dataframe</em><br>pov_df = pd.read_json(pov_json)<br>pov_df.head()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/1*85zWyQi_nYZRDkp-CNeXUQ.png" /><figcaption>Output of the dataframe.head() command</figcaption></figure><pre>##<em>export census data as csv</em><br>pov_df.to_csv(&quot;pov-data.csv&quot;, index=False)</pre><p>B01003_001E and B17001_002E are the estimates for the estimated total population in the census tracts and the estimated number of people living below the poverty line respectively. It also seems like you can’t download census tract info by city, so I downloaded all of Wayne County, which contains all of Detroit. To use the Census package you will need your own census api key, which you can download <a href="https://api.census.gov/data/key_signup.html"><strong>here</strong></a>.</p><p>The next step is to merge our two datasets. I used a separate Jupyter Notebook also running Python 3 for this. If you use Python for anything to do with data you probably are aware of pandas — a library that makes it easy to handle and manipulate data — but you may not be aware of geopandas. Geopandas is a library based on pandas which allows you to handle and manipulate geography-encoded (spatial) data, for instance our geojson file. It also allows you to perform some spatial processing functions. Geopandas is great because it basically works the same as pandas, so if you already know pandas it’s easy to pick up. I’ll use it just a bit in this notebook:</p><pre>import pandas as pd<br>import geopandas as gpd<br>import numpy as np</pre><pre>##<em>import census data we just downloaded to pandas dataframe<br></em>pov_df = pd.read_csv(&#39;pov-data.csv&#39;)</pre><pre>##<em>import Detroit geojson file from earlier using geopandas<br></em>tracts = gpd.read_file(&quot;./detroit-tracts.geojson&quot;)</pre><pre>##<em>view tracts data<br></em>tracts.head()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1015/1*ghEPi3u8xvnU1Q-9VEL-Sg.png" /><figcaption>output of tracts.head()</figcaption></figure><p>The above shows how the tracts.head() output as it appears in a notebook. there are more columns to the right as well. It would help to reduce file size and increase readability to drop any unnecessary columns, which is what is occurring below:</p><pre>##<em>drop unnecessary columns and rename &#39;tractce_10&#39; to &#39;tracts&#39;<br></em>tracts = tracts.drop(tracts.columns[np.r_[0, 1, 2, 5, 7, 8, 11, 12, 13]], axis=1)<br>tracts = tracts.rename({&#39;tractce_10&#39;:&#39;tract&#39;}, axis=1)<br>tracts.head()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/747/1*A6COJpAMwhpTsm5jwhX-SQ.png" /><figcaption>Output of tracts.head()</figcaption></figure><p>That’s much better. We’ve reduced the columns so they at least all fit in the notebook view without having to scroll to the right. By the way, see that “geometry” column? That’s Geopandas in action. That column stores all of the geographic data for each feature. In this case that’s polygons representing Census Tracts. I’ve also kept a few columns in the dataframe which we won’t use right away, but may be useful in the future.</p><p>The next step is to change the data types stored in the tracts dataframe to something numerical. I’m not sure why the values end up as strings sometimes, but if we don’t change them, we won’t be able to join our two data sets together. The following code changes the features into either</p><pre>tracts[&#39;shape_area&#39;] = tracts[&#39;shape_area&#39;].astype(np.float64)<br>tracts[&#39;awater_10&#39;] = tracts[&#39;awater_10&#39;].astype(np.int64)<br>tracts[&#39;geoid_10&#39;] = tracts[&#39;geoid_10&#39;].astype(np.int64)<br>tracts[&#39;aland_10&#39;] = tracts[&#39;aland_10&#39;].astype(np.int64)<br>tracts[&#39;tract&#39;] = tracts[&#39;tract&#39;].astype(np.int64)</pre><p>Now for the part you’ve all been waiting for, to join our two data sets into one so that each census tract is associated with its correct poverty data. To do this we’ll use Pandas’ .merge() function with the how = &#39;inner&#39; option. This is basically the same as an inner join in SQL. If you’re not familiar with SQL joins that’s ok. The thing that is important to know is that this next part will find the column called “tract” in both our geographic and poverty datasets, and will combine them based on the number in those columns. If the numbers match, the associated data will all be put into the same row in the dataframe. If you want to know more, check out the <a href="https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.merge.html">pandas documentation</a> or this <a href="https://stackoverflow.com/questions/38549/what-is-the-difference-between-inner-join-and-outer-join">stack overflow question</a> about SQL joins. Below is the actual code:</p><pre>tracts = tracts.merge(pov_df, how=&#39;inner&#39;, on=&#39;tract&#39;)<br>tracts</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/987/1*3Qt-ikkSwNo1LCpGV2vnkw.png" /><figcaption>tracts output</figcaption></figure><p>Feel free to explore the output of tracts to make sure it worked correctly.</p><p>The next thing to do is drop the rows that make up Belle Isle, where no one lives. This isn’t necessary to do but it I think it will make our map clearer. These rows are id 296 to 309 (you can tell because they’re poverty data columns both read zero and have a higher water area than the others:</p><pre>tracts = tracts.drop(tracts.index[296: 310])</pre><p>We also need to create a column which contains a number representing the ratio of people in poverty for each census tract. As of now “B01003_001E” represents the total estimated population of a census tract and “B17001_002E” represents the estimated number of those people under the poverty line. To get our ratio we just need the outcome of “B17001_002E” / “B01003_001E”:</p><pre>tracts[&#39;pov_rate&#39;] = tracts[&#39;B17001_002E&#39;] / tracts[&#39;B01003_001E&#39;]<br>tracts</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/989/1*Dju__KnIOPzpizmciAewNA.png" /><figcaption>tracts output</figcaption></figure><p>As you can see in the tracts output, we now have a column with a poverty rate for each</p><p>Now the last thing to do in this Python notebook is extract the data. I extracted it as GeoJSON and called it “pov-rate.geojson”.</p><pre>tracts.to_file(&#39;pov-rate.geojson&#39;, driver=&#39;GeoJSON&#39;)</pre><p>Great! We’ve gathered and cleaned up our spatial poverty data. Now we will work on displaying it for the web.</p><p><strong>Getting Set Up with Mapbox</strong></p><p>There’s a couple of different methods you can use to style a basemap for your final map. I’m using <a href="https://www.mapbox.com/"><strong>Mapbox</strong></a> because I think it looks nice, and it integrates with <a href="https://www.mapbox.com/mapbox-gl-js/api/"><strong>Mapbox GL JS</strong></a> for the display of the basemap and data, which is a very cool new Javascript library from Mapbox. You’ll need to make an account (free) to begin. Once you do that, you’ll need to create and style your basemap. I’m not going to get into those details because Mapbox already had a <a href="https://www.mapbox.com/help/choropleth-studio-gl-pt-1/"><strong>good tutorial</strong></a> on how to do this. Just replace the data they use in that tutorial with our data we’ve prepared above. You can choose your own colors ramp, number of categories, and breaks. I made a category for every ten percentage point of poverty rate increase until I hit 50%. So I made a step at 10% poverty, 20%, 30%, 40%, and 50%, for a total of six colors. I used <a href="http://colorbrewer2.org/"><strong>ColorBrewer2</strong></a><strong> </strong>to help choose a color scheme. I also created a category with the color black for the three tracts in our data without any people in them.</p><p><strong>Displaying with Javascript using Mapbox GL JS</strong></p><p>To display this map using Mapbox GL JS, we’ll need to start coding. Again, I won’t be getting into the details of this part either as Mapbox has yet another <a href="https://www.mapbox.com/help/choropleth-studio-gl-pt-2/"><strong>good tutorial</strong></a> about how to do this. The only thing I’ll add is that when you are writing the code which displays the poverty rate when a tract is moused over, remember to use Math.floor(tracts[0].properties.pov_rate * 100) in order to display the actual percentage and not the decimal ratio.</p><p>If all goes well, you should end up with something like the picture below: an interactive map of poverty in Detroit! For a working product click <a href="https://biskwikman.github.io/projects/detroit-poverty-map/"><strong>here</strong></a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yzXj9n4dsoi9KCCM_cJmNg.png" /></figure><p>This concludes part one. I’m hoping that for part two I can integrate turf.js into this app in order to measure access to transport and any potential disparities between poorer and wealthier areas in the city. I hope to make it interactive and fun to investigate, so keep an eye out for it!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=72fa21a0bd79" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Deportation Files: Part 1 — Utinan Won]]></title>
            <link>https://medium.com/@djosephhenri/the-deportation-files-part-1-utinan-won-a3ac9fdf6fff?source=rss-e850b85608de------2</link>
            <guid isPermaLink="false">https://medium.com/p/a3ac9fdf6fff</guid>
            <category><![CDATA[policy]]></category>
            <category><![CDATA[undocumented]]></category>
            <category><![CDATA[open-borders]]></category>
            <category><![CDATA[immigration]]></category>
            <category><![CDATA[japan]]></category>
            <dc:creator><![CDATA[Dan Henri]]></dc:creator>
            <pubDate>Wed, 02 May 2018 10:58:34 GMT</pubDate>
            <atom:updated>2018-05-15T12:47:22.746Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction to the Series</h3><p>At the moment there is a magnifying glass on immigration issues in the US, and for good reason. There is a presidential administration that is hostile to immigration — both legal and illegal — and the US has a relatively high proportion of undocumented immigrants compared to other developed countries. The result has been untold amounts of stress and misery for undocumented immigrants in the US, with deportations on the rise, and the potential end of both DACA — a program to protect undocumented people who arrived in the US as children— and the Temporary Protective Status for hundreds of thousands of Central Americans and Haitians, the human tragedy unfolding right now is highly visible and occurring at a large scale.</p><p>But while the US’s immigration-based humanitarian tragedy may be one of the most visible and largest in scale among wealthy countries, the is far from alone. Countries everywhere are quietly deporting people who have lived in within their borders for decades, forcibly separating families, and sending immigrants into dangerous or even deadly areas. Every decision to deport a human being has the potential to result in a small-scale tragedy.</p><p>This is the first in a series of stories focusing on individuals affected by deportation from countries around the world. The goal of this series is to highlight these individual’s lives, and to show them as more than numbers in an annual government immigration control report. How did they end up in their country of residence? What are they policy mechanisms that put them at risk of deportation? What is their place in their community pre-deportation? How has this affected them and those around them mentally, physically, and emotionally?</p><p>I’m not going to be completely neutral in this series. I wanted to write this series because when I often find deportation to be unjust and damaging to society. In my conversations with people who live in the country they were born as citizens in, I find that the level of understanding of their own country’s immigration system is, understandably, very low. Citizens often never have first-hand experience with their own immigration system after all. Many people underestimate how difficult it is to enter a county, and how hard it is to stay — legally — even after you’ve put down roots. I want people to concretely understand the policies that lead to deportations, and the types of people that can get caught up in them.</p><p>The rest of this article will focus on a single case of a person facing deportation.</p><h3>The Case of Utinan Won</h3><p>Utinan Won was born in Japan. He spent his early childhood moving between Kofu and Nagano. When he was 13, he and his mother drove two hours to Tokyo, entered the Immigration Bureau, gave themselves up to the authorities; they had both been living in Japan illegally. Utinan had been illegally residing in the country since he was born.</p><p>This situation occurred because Utinan’s mother, Lonsan, who is originally from Thailand, came to Japan as a result of human trafficking. She was forced to work as a sex worker for a number of years before she met Utinan’s father, another undocumented Thai immigrant, who was deported shortly after Utinan’s birth. Because both her and Utinan’s father were undocumented, Utinan has never been able to have legal status in Japan, despite it being the country he was born in.</p><p>Because of his status, Utinan was never able to enroll in school. The act of surrendering themselves to the authorities in Tokyo actually allowed Utinan to legally go to school while their case was being processed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/724/1*eDkAwNZOoXRUIMlvxXOmXQ.jpeg" /><figcaption>Utinan Won</figcaption></figure><p>Utinan’s mother, Lonsan, returned to Thailand in 2016, when Utinan was 16. This was in response to a Tokyo District Court decision which stated her return to her home country would Utinan’s case to be re-evaluated, which could result in the granting of a Special Permission of Residence — a type of residence which can be granted to undocumented immigrants in certain circumstances. Utinan cannot read or write Thai, and can only speak a little, as Japan is his home country. This, in addition to the fact that Utinan wished to stay in Japan led Lonsan to make the difficult decision to leave Utinan in the care of another Japanese family when she left. Media organizations were at the Narita airport in September 2016 when Lonson said her last goodbye to her son before going to Thailand. When asked about the event Utinan said “I’m sad, that’s all I can say. It’s like I can’t even express anything besides sadness. Sadness and loneliness.”</p><p>Japanese immigration officers offering undocumented children permission to stay on the condition that their parents leave does not seem unheard of. In 2016, <a href="https://www.reuters.com/article/us-japan-detention-children-thailand/a-mother-leaves-japan-so-that-her-teen-son-can-stay-idUSKBN13H170">Reuters reported</a> that they spoke to five other families who were verbally offered this deal by immigration agents.</p><p>However, despite Lonsan leaving Japan in order to give Utinan the greatest chance of staying in his home country, a few months later the Tokyo High Court came to the decision that Utinan’s then-pending deportation order should be upheld. A decision which prompted audible disgust by Utinan’s supporters in the court. Utinan initially appealed this to the Supreme Court, but because of the approximately 3-year-long wait, decided to attempt to be re-evaluated by directly appealing to the Minister for Justice, stating “In 3 years I’ll be 20 years old. It’s an important time in my life to just be waiting around without doing anything and feeling anxious because of the upcoming decision. I wouldn’t be able to stand it.”</p><p>In December of 2017, Utinan was called into the Tokyo Immigration Office and given a 1-year residency card. While his long fight to remain in his country of birth is by no means over, he has scored a major victory by being granted legal residency. However, there is no certainty that this card will be renewed in December 2018, or if he will ever be issued citizenship or permanent residency.</p><p><strong>The policy behind the scenes</strong></p><p>There are various policies and circumstances which led to this situation with Utinan. But for the purposes of this piece, I’ll focus on birthright citizenship and human trafficking.</p><p>There are two general ways people become citizens of a country at birth, jus soli and jus sanguinis. Jus soli (right of the soil) countries in general allow any child born in that country to become a citizen at birth, regardless of the status of the parents. Jus sanguinis (right of the blood) countries grant citizenship to children by virtue of the citizenship of their parents. Most countries that have jus soli also have some form of jus sanguinis. So for example, the United States is a jus soli country, but also has a relatively unremarkable jus sanguinis system by worldwide standards, in which United States citizens can generally pass on their citizenship to their children regardless of place of birth. This mixed system is not the norm, and is generally found among most countries in the Americas as well as a smattering of others around the world. Utinan’s problem was that he happened to be born in Japan, which has no just soli laws.</p><p>Because Japan has no jus soli laws, and his mother Lonsan was undocumented, Utinan wasn’t able to go to school until he and his mother surrendered themselves to immigration authorities, and since then he has faced the threat of deportation. His only hope is using an obscure and opaque bureaucratic process and hope that the Minister for Justice feels favorable to him when the next deadline rolls around, and perhaps allows him to stay in the country permanently. If this sounds bad, keep in mind that this is normal throughout the world. In Utinan had been born in most places in Europe, Asia, or Africa under the same conditions he would likely be in a similar situation, or already deported.</p><p>Additionally, Lonsan was originally a victim of human trafficking. Japan does have protections on the books in place for victims of human trafficking, such as not allowing the banning of entry to or deportation from Japan for crimes committed as a direct result of human trafficking (<a href="https://www.state.gov/j/tip/rls/tiprpt/countries/2017/271213.htm">according to the US Department of State</a>). While this is a good idea in spirit, it seems that Lonsan was not considered to fall into this category. This brings up the question of who, exactly, does? Do only crimes committed under the direct pressure of an abuser or trafficker count? This seems to be the case. The reality is more complex. Victims of trafficking often have had their passports confiscated from them by their abusers and are pressured and sometimes threatened not to go to the police. In Lonsan’s case, she appears to have built a life in Japan while under these conditions, all while breaking the law by working without authorization and being present in Japan. Her situation has come about precisely because of her being the victim of human trafficking.</p><h4>Recommendations</h4><p>Utinan and Lonsan’s situations could have been made much less miserable if Japan had some provisions to allow children born in Japan to obtain permanent residence or citizenship. While a pure jus soli system is preferable in my view, something less open would still improve outcomes. For example, Australia and the UK have systems which allow for this after the child has been in the country for a number of years. These policies at least recognize that deporting a child after said child spent a number of years in the country in question will have a negative impact on the child. Additionally, Japan could do more for victims of human trafficking, and have more generous visa allowances for them, allowing them to stay if they have established connections. Having policy which acknowledges that it is impossible to live without breaking immigration and labor laws as a victims of human trafficking, even if the victim is eventually able to escape their abusers, is also a good idea.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a3ac9fdf6fff" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating a Population Density Map of Toyota City, Japan Using d3-geo’s CLI (and some other stuff) —…]]></title>
            <link>https://medium.com/@djosephhenri/creating-a-population-density-map-of-toyota-city-japan-using-d3-geos-cli-and-some-other-stuff-4bbfb73f37e5?source=rss-e850b85608de------2</link>
            <guid isPermaLink="false">https://medium.com/p/4bbfb73f37e5</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[d3]]></category>
            <category><![CDATA[geospatial]]></category>
            <category><![CDATA[japan]]></category>
            <dc:creator><![CDATA[Dan Henri]]></dc:creator>
            <pubDate>Wed, 14 Mar 2018 04:24:52 GMT</pubDate>
            <atom:updated>2018-03-29T01:28:10.927Z</atom:updated>
            <content:encoded><![CDATA[<h3>Creating a Population Density Map of Toyota City, Japan Using d3-geo’s CLI (and some other stuff) — Part 3</h3><p><em>This is a tutorial series based on Mike Bostock’s </em><a href="https://medium.com/@mbostock/command-line-cartography-part-2-c3a82c5c0f3"><em>Command-Line Cartography</em></a><em>. Read </em><a href="https://medium.com/@djosephhenri/creating-a-population-density-map-of-toyota-city-japan-using-d3-geos-cli-and-some-other-stuff-705632a55e8f"><em>part 1</em></a><em> and </em><a href="https://medium.com/@djosephhenri/creating-a-population-density-map-of-toyota-city-japan-using-d3-geos-cli-and-some-other-stuff-396c5b6dc225"><em>part 2</em></a><em> of this series here.</em></p><p>In the third and final part of this series, we will be finishing up our choropleth map! This means adding an appropriate color scheme and key, among other things.</p><p>In <a href="https://medium.com/@djosephhenri/creating-a-population-density-map-of-toyota-city-japan-using-d3-geos-cli-and-some-other-stuff-705632a55e8f">part 1</a> of this series, we made a quick choropleth using our data before we shrank it using TopoJSON in <a href="https://medium.com/@djosephhenri/creating-a-population-density-map-of-toyota-city-japan-using-d3-geos-cli-and-some-other-stuff-396c5b6dc225">part 2</a>. We’ll do the same thing now with our quantized TopoJSON data. This next part is kind of complex, but it’s basically a bunch of commands piped together which extracts our ‘choumes’ object from our topology and converts into a feature collection in GeoJSON format, then uses ndjson-map to add a fill property representing a color for each choume based on population density. We then use ndjson-split to separate the data by features, and the finally use geo2svg to create an svg. This is nice because we don’t have to create a bunch of intermediary files, but also not nice because it’s kind of a pain to put this into the terminal:</p><pre>topo2geo choumes=- \<br>  &lt; toyota-quant-topo.json \<br>  | ndjson-map -r d3 &#39;z = d3.scaleSequential(d3.interpolateViridis).domain([0, 265]), d.features.forEach(f =&gt; f.properties.fill = z(f.properties.density)), d&#39; \<br>  | ndjson-split &#39;d.features&#39; \<br>  | geo2svg -n --stroke none -p 1 -w 960 -h 960 \<br>  &gt; toyota-choumes-color.svg</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/898/1*-4g6abCNtJHAXgp_B70oww.png" /></figure><p>Okay, so we’ve shown that this process works with our TopoJSON, but our map has the same issue of not showing enough variation, especially in the eastern part of the city. Even the denser, more urban area in the southwest shows little variation in color. To help with this, we’ll use <a href="http://colorbrewer2.org/#type=sequential&amp;scheme=BuGn&amp;n=3">ColorBrewer 2.0</a>, a great website/application for help with map color schemes. The <a href="https://github.com/d3/d3-scale-chromatic">d3-scale-chromatic</a> npm package provides an API for ColorBrewer, which is what we’ll use:</p><pre>npm install -g d3-scale-chromatic</pre><p>Now we’ll use the color scheme OrRd(orange-red):</p><pre>topo2geo choumes=- \<br>  &lt; toyota-quant-topo.json \<br>  | ndjson-map -r d3 -r d3=d3-scale-chromatic &#39;z = d3.scaleThreshold().domain([0, 1, 2, 4, 10, 30, 60, 120, 265]).range(d3.schemeOrRd[9]), d.features.forEach(f =&gt; f.properties.fill = z(f.properties.density)), d&#39; \<br>  | ndjson-split &#39;d.features&#39; \<br>  | geo2svg -n --stroke none -p 1 -w 960 -h 960 \<br>  &gt; toyota-choumes-color.svg</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/927/1*NYlAreMe19GABiPj4YRQvg.png" /></figure><p>Looking pretty good. I played around with the thresholds until I got something I thought gave a good amount of detail. I just want to point out I’m no color expert and I may be breaking some established practices here. This looks quite pretty, but I personally think it’s a little easier on your eyes if we take out the ‘stroke none’ option to get this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/904/1*oX0HZ8O_n668M8XyEXKwOQ.png" /></figure><p>Not quite as beautiful, but it just makes more sense to me.</p><p>Okay, This is where I’ll end it for now. I’m hoping to come back and update it with a key soon. So stay on the lookout for part 4 if you are interested.</p><p>I thought I would take the time for some closing thoughts about this whole process. I have to say, I don’t think I’ll be using this method to make maps regularly anytime soon. It’s quite convoluted and lengthy for the result. I do think it is very very cool that all these tools are available though, and I’m glad I went through the process of learning about them. I’m sure I’ll be using them to manipulate data in the future, but most likely as part of a different workflow. Regardless of this, these tools definitely are a win for the geospatial data visualization scene. It’s always nice to see more ways to do something. Next time I would like to like to see how the workflow in <a href="https://beta.observablehq.com/">Observable</a> or using a Python stack goes.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4bbfb73f37e5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating a Population Density Map of Toyota City, Japan Using d3-geo’s CLI (and some other stuff) —…]]></title>
            <link>https://medium.com/@djosephhenri/creating-a-population-density-map-of-toyota-city-japan-using-d3-geos-cli-and-some-other-stuff-396c5b6dc225?source=rss-e850b85608de------2</link>
            <guid isPermaLink="false">https://medium.com/p/396c5b6dc225</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[d3js]]></category>
            <category><![CDATA[geospatial]]></category>
            <category><![CDATA[japan]]></category>
            <dc:creator><![CDATA[Dan Henri]]></dc:creator>
            <pubDate>Wed, 14 Mar 2018 01:33:06 GMT</pubDate>
            <atom:updated>2018-03-14T06:32:33.130Z</atom:updated>
            <content:encoded><![CDATA[<h3>Creating a Population Density Map of Toyota City, Japan Using d3-geo’s CLI (and some other stuff) — Part 2</h3><p><em>This is a tutorial series based on Mike Bostock’s </em><a href="https://medium.com/@mbostock/command-line-cartography-part-2-c3a82c5c0f3"><em>Command-Line Cartography</em></a><em>. Read </em><a href="https://medium.com/@djosephhenri/creating-a-population-density-map-of-toyota-city-japan-using-d3-geos-cli-and-some-other-stuff-705632a55e8f"><em>part 1</em></a><em> and </em><a href="https://medium.com/@djosephhenri/creating-a-population-density-map-of-toyota-city-japan-using-d3-geos-cli-and-some-other-stuff-4bbfb73f37e5"><em>part 3</em></a><em> of this series here.</em></p><p>In part 1, we manipulated our data in a way which allowed us to create an early version of our population density choropleth map of Toyota. In this part, we’re going to work on reducing our file size. The file size of our GeoJSON ended up being about 3.3MB. That’s not huge, but it would be nice to have it smaller. If you are interested in having a deeper understanding of how all of this works, check out <a href="https://medium.com/@mbostock/command-line-cartography-part-3-1158e4c55a1e">part 3 of Mike Bostock’s tutorial.</a> I won’t be getting too deep into it.</p><p>First, we’ll convert out GeoJSON into TopoJSON. TopoJSON is similar to GeoJSON, but for reasons I won’t get into, smaller in file size and can be manipulated to be even smaller. With a little bit of work, TopoJSON files can be identical in topology to GeoJSON while being significantly smaller.</p><p>Let’s install the <a href="https://github.com/topojson/topojson/blob/master/README.md#api-reference">TopoJSON CLI</a>:</p><pre>npm install -g topojson</pre><p>Now we’ll convert our GeoJSON into TopoJSON using geo2topo, which is part of the package we just installed:</p><pre>geo2topo -n \<br>  choumes=toyota-density.ndjson \<br>  &gt; toyota-choumes-topo.json</pre><p>First thing to notice here is that we are inputting our NDJSON file with density encoded. The ‘-n’ lets geo2topo know that we are using NDJSON. The other weird thing here is ‘choumes=’. This isn’t a keyword, any word you use here will be used as an object in the resulting TopoJSON which will contain the topology. I used choumes because that is generally what these administrative areas are called in Japan (I don’t think all of them are choumes but most are, there may be a more appropriate name for them). Putting the topology in an object is necessary for TopoJSON to work it’s magic and reduce our filesize.</p><p>And as you can see, its size has already been reduce to 1.9MB. Pretty good! If you wanted to, you could reduce it even further by using <a href="https://github.com/topojson/topojson-simplify/blob/master/README.md#toposimplify">toposimplify</a>. At this scale, it seemed like overkill, and had too much of an effect on the topology, so I didn’t do it. If you do want to do it, you could use something like below:</p><pre>toposimplify -p 1 -f \<br>  &lt; toyota-choumes-topo.json \<br>  &gt; toyota-choumes-simp.json</pre><p>What I did do is use <a href="https://github.com/topojson/topojson-client/blob/master/README.md#topoquantize">topoquantize</a>. This basically does some math and gets rid of all the numbers after the decimal points in the in the coordinates while only resulting in a small visible effect. It’s kind of amazing:</p><pre>topoquantize 1e5 \<br>  &lt; toyota-choumes-topo.json \<br>  &gt; toyota-quant-topo.json</pre><p>So after this, my file size is a mere 542KB. That’s significantly smaller that the 3.3MB we started with, and that’s the power of TopoJSON! Below is the output in <a href="http://mapshaper.org/">Mapshaper</a> (upside down again). As you can see it looks exactly the same.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/915/1*jz1hy7zDC31iu5Aml6JsbQ.png" /></figure><p><a href="https://medium.com/@mbostock/command-line-cartography-part-3-1158e4c55a1e">Mike Bostock’s tutorial</a> goes over some very cool topomerge stuff. So if you are interested in utilizing other, larger administrative areas for this map I would suggest checking it out. I will just be sticking with the choumes and so won’t go over it.</p><p>I’ll leave it there for now, because next time we’ll be doing a lot of work to finish our map.</p><p><a href="https://medium.com/@djosephhenri/creating-a-population-density-map-of-toyota-city-japan-using-d3-geos-cli-and-some-other-stuff-705632a55e8f"><em>Part 1</em></a></p><p><a href="https://medium.com/@djosephhenri/creating-a-population-density-map-of-toyota-city-japan-using-d3-geos-cli-and-some-other-stuff-4bbfb73f37e5"><em>Part 3</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=396c5b6dc225" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating a Population Density Map of Toyota City, Japan Using d3-geo’s CLI (and some other stuff) —…]]></title>
            <link>https://medium.com/@djosephhenri/creating-a-population-density-map-of-toyota-city-japan-using-d3-geos-cli-and-some-other-stuff-705632a55e8f?source=rss-e850b85608de------2</link>
            <guid isPermaLink="false">https://medium.com/p/705632a55e8f</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[geospatial]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[d3js]]></category>
            <category><![CDATA[japan]]></category>
            <dc:creator><![CDATA[Dan Henri]]></dc:creator>
            <pubDate>Sat, 03 Mar 2018 05:22:07 GMT</pubDate>
            <atom:updated>2018-03-14T07:54:39.430Z</atom:updated>
            <content:encoded><![CDATA[<h3>Creating a Population Density Map of Toyota City, Japan Using d3-geo’s CLI (and some other stuff) — Part 1</h3><p><em>This is a tutorial series based on Mike Bostock’s </em><a href="https://medium.com/@mbostock/command-line-cartography-part-2-c3a82c5c0f3"><em>Command-Line Cartography</em></a><em>. Read </em><a href="https://medium.com/@djosephhenri/creating-a-population-density-map-of-toyota-city-japan-using-d3-geos-cli-and-some-other-stuff-396c5b6dc225"><em>part 2</em></a><em> and </em><a href="https://medium.com/@djosephhenri/creating-a-population-density-map-of-toyota-city-japan-using-d3-geos-cli-and-some-other-stuff-4bbfb73f37e5"><em>part 3</em></a><em> of this series here.</em></p><p><em>Note: What was going to be part 2 of this series has been added into part 1. Originally, part 1 went over separate population data, but I realized this is not necessary as the boundary data already has all the information necessary. If anyone was following along waiting for part 2, sorry for the change in format. If you feel stuck have a look at </em><a href="https://medium.com/@mbostock/command-line-cartography-part-2-c3a82c5c0f3"><em>part 2 of Mike Bostock’s tutorial</em></a><em>, which I’m basing this on.</em></p><p>This post will document how I go about making a choropleth map of Japan showing population density using d3. I will actually be basing this off of Mike Bostock’s <a href="https://medium.com/@mbostock/command-line-cartography-part-1-897aa8f8ca2c">Command-Line Cartography</a> tutorial series. So it might be useful if you are confused about anything in that tutorial, or if you are interested in using open data from the Japanese government, which is where we’ll get our data.</p><p>Quick note, you may have never heard of Toyota City. It’s a relatively small city on the outskirts of Nagoya (a large major city) with a bit less than half a million people. I lived there for a year and really enjoyed it, that is the only reason I’m choosing this city.</p><p>Let’s get right into it. First, we’ll need to download the data to work with. For this project, we’ll only need one set of data: Cartographic boundary data. This is the data for the actual boundary data of Toyota City, including all the smaller administrative boundaries within the city. In this case, we’ll be using official government administrative boundary data from the 2015 Japanese Census. The great thing about using official boundary data like this is that there is official census data which corresponds to each individual area. For this map that will allow us to see the population of each individual area.</p><p><em>NOTE: Japanese boundary data includes area and population! This is everything we need to compute population density. If you are using data from another source or country, you may need a separate dataset which contains population data.</em></p><h4>Boundary Data</h4><p>To download the cartographic boundary data, go to the <a href="https://www.e-stat.go.jp/gis/statmap-search?page=2&amp;type=2&amp;aggregateUnitForBoundary=A&amp;toukeiCode=00200521&amp;toukeiYear=2015&amp;serveyId=A002005212015&amp;coordsys=1&amp;format=shape&amp;prefCode=23">Japanese government’s open data portal</a>, e-Stat. That link will take you to a page with different administrative areas. We want to click on the blue box to the right of the row that says “23211 豊田市”. This will get us a shapefile version of our Toyota City administrative boundary data. Shapefile is a spatial data format created by ESRI, the makers of ArcGIS. It’s probably the most widely used format so it can function with many tools.</p><p>Let’s check to see if our data is what we think it is. If you have a GIS suite (QGIS or ESRI) you can throw it in there and see what comes up. But for this tutorial, we’ll use a really handy web tool called Mapshaper. First off, let’s go to the <a href="http://mapshaper.org/">Mapshaper website</a>. Drag and drop the .shp file you just downloaded (there will be others as well, but just use the .shp). Leave all the settings as they are for the dialog box that comes up and click “import”. If you see something similar to the picture below, you’re good to go!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TY5O7WUwYZ9ihwso2zExgg.png" /><figcaption>The administrative boundaries of beautiful Toyota City!</figcaption></figure><p>So we’ve confirmed that we have working shapefile data. Next, we’ll get the population data which corresponds to each of these administrative areas. While shapefile data is handy for many things, there are forms which are better suited for the web and for D3. A popular format is GeoJSON, a version of the popular JSON data format. The great thing about JSON and GeoJSON is that they are written in Javascript, and thus are easy to implement on the web.</p><h4>Editing Boundary Data</h4><p>In Mike Bostock’s tutorial, he uses his npm tool called “shapefile” in order to convert shapefile data to GeoJSON data. This will probably work in most situations, but it wasn’t handling the Japanese characters which are in our data, and output them as strange, random looking characters. I even tried encoding the shapefile as UTF-8, still no luck. Luckily, I found the our trusty Mapshaper website we used before does the trick. Just put in the shapefile data (drag and drop all of the shapefiles this time) in, and there will be an option in the top right corner to export. Click this and export as GeoJSON. Open it up is an editor and it should look something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gd7svKIZ7ycmgk9ZY3j6wQ.png" /><figcaption>As you can see, our Japanese characters are a-ok here.</figcaption></figure><p>The next step is to properly project our data. When I say project I mean choose a projection such as the Mercator or Albers, which you may have heard of. What you not have heard is that there are tons of these projections which are used for different regions of the world and for different purposes. We want to project our data now because it is faster to display pre-projected data rather than using computing power to project it properly upon display in a browser. There are tons of ways to project your data, and I’ll be honest, I had some issues actually getting it properly projected for this project. The way I’ll show here is the same way Mike Bostock shows in his tutorial, using terminal commands for d3. This way is honestly very painful compared to others, but it does allow us to fit our map into a bounding box for when we export it as an svg image. So let’s install the proper d3 tool:</p><pre>npm install -g d3-geo-projection</pre><p>Now, the projection we’ll be using is <a href="http://spatialreference.org/ref/epsg/3099/">EPSG:3099</a>. This is one specifically for displaying medium scale topography in the area of Japan Toyota falls in. If you are looking for a specific projection for a different geographic area, the <a href="http://spatialreference.org/">Spatial Reference website</a> is a good resource. Unfortunately, there is no option in d3 to simply input the projection identifier into, instead, we need to dig into its <a href="http://spatialreference.org/ref/epsg/3099/html/">specifications</a> and extract the necessary info. Like I said, a bit painful but that’s what we’ll do. This is what the command ends up as:</p><pre>geoproject &#39;d3.geoTransverseMercator().rotate([-135, 0]).fitSize([960, 960], d)&#39; &lt; toyota-data.json &gt; toyota-proj.json</pre><p>A little explanation of the above: ‘<a href="https://github.com/d3/d3-geo-projection/blob/master/README.md#geoproject">geoproject</a>’ is one of the tools we just installed. In the <a href="http://spatialreference.org/ref/epsg/3099/html/">EPSG:3099 specifications</a>, it states the projection it uses is ‘transverse mercator’, so we put that in as the d3 projection. We take the ‘central meridian’ and ‘latitude of origin’ values and put them in d3’s ‘rotate()’ function, with the central meridian being negative. The ‘fitSize()’ function is what is most useful about geoproject here, it fits our data into our 960 by 960 bounding box.</p><p>Great, now we have a properly projected GeoJSON file of Toyota! Let’s have a look at it by creating an svg image of it using another d3 cli command:</p><pre>geo2svg -w 960 -h 960 &lt; toyota-proj.json &gt; toyota-proj.svg</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/769/1*oGspLaomZn2wgHhadzHGCw.png" /><figcaption>Quite different from the unprojected form in Mapshaper</figcaption></figure><p>The next step is to convert this data into a format that will make it easy to work with and edit in the command line. To do this we’ll use <a href="https://github.com/mbostock/ndjson-cli">ndjson-cli</a>, a command-line module for converting JSON files to newline-delimited JSON files (NDJSON). Basically JSON formatted so that each line is a value. In this case, each line of our GeoJSON file will be a feature (feature is GeoJSON terminology). To get started, let’s install ndjson-cli:</p><pre>npm install -g ndjson-cli</pre><p>Now to create an NDJSON formatted file from our data, splitting it into one feature per line:</p><pre>ndjson-split &#39;d.features&#39; &lt; toyota-fit.json &gt; toyota.ndjson</pre><p>Not only is this handy for manipulating data, it’s much more readable as well:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VT1mxUOTDuVS0v53-uevRg.png" /><figcaption>Only the first 2 lines are visible here, but they each contain all the info for one feature</figcaption></figure><p>The properties on interest to us are AREA, which contains the area of the feature in square meters, and JINKO, which contains the population of the feature. Because they are both conveniently already attached to the data, we can calculate the density. The command below will use ndjson-map to do that while dropping all the other properties we don’t need, which will make our file smaller. For more information about ndjson-map, <a href="https://github.com/mbostock/ndjson-cli#map">see the documentation:</a></p><pre>ndjson-map &#39;d.properties = {density: Math.floor(d.properties.JINKO / (d.properties.AREA / 10000))}, d&#39; &lt; toyota.ndjson &gt; toyota-density.ndjson</pre><p>AREA is divided by 1000 to convert the measurement to people per hectare (10000 square meters). The result should look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TZVDeZab3B1jI4fVXhFK7A.png" /><figcaption>density is now the only property</figcaption></figure><p>Now let’s transform our data back into regular old GeoJSON using <a href="https://github.com/mbostock/ndjson-cli#reduce">ndjson-reduce</a> and <a href="https://github.com/mbostock/ndjson-cli#map">ndjson-map</a>:</p><pre>ndjson-reduce \<br>  &lt; toyota-density.ndjson \<br>  | ndjson-map &#39;{type: &quot;FeatureCollection&quot;, features: d}&#39; \<br>  &gt; toyota-density.json</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Klpx8JYOhZq7nUnKxPhqTA.png" /></figure><p>If we throw it into Mapshaper:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/917/1*wPy6AOZ18T8u3c9JuYuzDQ.png" /></figure><p>We get an upside down map. This is because Mapshaper and SVG treat the <em>y</em> axis opposite. So it will appear normally in SVG.</p><p>Now let’s use D3 to make a quick choropleth in the terminal. First we install D3:</p><pre>npm install -g d3</pre><p>Now we’ll use ndjson-map with D3 (via ‘-r d3&#39;) to create a ‘fill’ property using the Viridis color scheme. We’ll be using our previous NDJSON file here:</p><pre>ndjson-map -r d3 \<br>  &#39;(d.properties.fill = <br>d3.scaleSequential(d3.interpolateViridis).domain([0, 265])<br>(d.properties.density), d)&#39; \<br>  &lt; toyota-density.ndjson \<br>  &gt; toyota-color.ndjson</pre><p>I have put 265 people per hectare as the max value here. I found out the max value by inputting this command:</p><pre>ndjson-top &#39;a.properties.density - b.properties.density&#39; \<br>  &lt; toyota-density.ndjson</pre><p>This will spit the whole file in your terminal, with the last feature being having the highest density value.</p><p>Now convert it to SVG with geo2svg:</p><pre>geo2svg -n --stroke none -p 1 -w 960 -h 960 \<br>  &lt; toyota-color.ndjson \<br>  &gt; toyota-color.svg </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/893/1*2FQTGrJbPNA_gPBSw_f_ug.png" /><figcaption>Right-side up this time!</figcaption></figure><p>Ok so this looks quite pretty and if you compare it to an aerial image of Toyota it seems to make sense. We still need to make it so we can more easily distinguish between population density in the lower density area though, as well as add important things like a key. But we’ll get there in future parts!</p><p><a href="https://medium.com/@djosephhenri/creating-a-population-density-map-of-toyota-city-japan-using-d3-geos-cli-and-some-other-stuff-396c5b6dc225"><em>Part 2</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=705632a55e8f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How “feel-good” planning policies are turning Melbourne into a city for the rich]]></title>
            <link>https://medium.com/@djosephhenri/how-feel-good-planning-policies-are-turning-melbourne-into-a-city-for-the-rich-c913ff41fd4f?source=rss-e850b85608de------2</link>
            <guid isPermaLink="false">https://medium.com/p/c913ff41fd4f</guid>
            <category><![CDATA[environment]]></category>
            <category><![CDATA[urban-planning]]></category>
            <category><![CDATA[australia]]></category>
            <category><![CDATA[melbourne]]></category>
            <category><![CDATA[immigration]]></category>
            <dc:creator><![CDATA[Dan Henri]]></dc:creator>
            <pubDate>Mon, 05 Jun 2017 02:39:19 GMT</pubDate>
            <atom:updated>2017-09-15T19:36:05.851Z</atom:updated>
            <content:encoded><![CDATA[<p>If there’s one thing Melburnians love, it’s talking about how “liveable” Melbourne is. This is understandable, Melbourne has been ranked as as the number one most liveable city by The Economist for some years now. This can lead to lots of self-congratulating and perhaps a lack of awareness of the issues that are actually affecting many residents of the city.</p><p>An important part of this liveability, it is thought, are the various “leafy” suburbs throughout the inner-city area. In Melbourne, it is as if these suburbs are the very definition of liveability. These suburbs are full of old single family homes and tree-lined streets. People want to protect the character of these areas because they like them. In protecting these areas from “unreasonable” development, it also allows residents to create the narrative in which they — the progressive, nature-loving hero — are fighting against the developers and local council, who always seem to be joined in an unholy union forcing the worst of capitalist excess upon the local residents. This idea, I argue, is generally bullshit.</p><p>I certainly won’t argue that capitalism is intrinsically aligned with the long term interests of city planning, or that it doesn’t provide incentives to local government organisations or developers to create developments which don’t have positive impacts on cities. However, developments that many Melburnians are vehemently against in the name of protecting liveability or neighbourhood character are exactly what the city needs in order to grow sustainably. And it is growing, with at extra 107,770 people added from 2015 to 2016. That’s a rate of about 2.4% per year.</p><p>This growth rate has prompted some of Melbourne’s and Australia’s more privileged self-styled “progressives” to react with divisive, nationalist, and racist rhetoric about the limits of growth all while claiming the moral high ground. Apparently the neighbourhood character of old white suburbs and some vague sense of “sustainability” are more worthy-progressive causes than not being racist. Take, for example, some Sustainable Australia’s view of immigration taken from their website:</p><blockquote>Our immigration practices should <strong>not</strong> be ethnically or religiously based, but they must allow for more intensive screening of and support for <strong>all </strong>prospective immigrants than is currently the case. There are serious dangers in not devoting sufficient resources to managing our immigration intake. The Department of Immigration is simply overloaded with work. Lowering our immigration intake back to the sustainable long term average level (see below) will help the Department of Immigration recover and secure a sustainable Australia.</blockquote><p>In order to do so, they advocate the following:</p><blockquote>Withdraw the States, Territories and their government agencies from proactive population growth policies including:</blockquote><blockquote>Programs marketing states and territories to prospective international residents.</blockquote><blockquote>All Department of Immigration permanent and temporary visa programs including Regional Sponsored Migration Schemes, State/Territory Sponsored Business Owners and State/Territory Sponsored Investors.</blockquote><p>For a more Melbourne-specific, and less veiled racist organisation, look no further than Can Do Better, who “reject” the “trend of excessive population growth through the ever increasing levels of immigration.”</p><p>Trump and Bannon wish they had “progressives” like this is the US.</p><p>This rate of growth in Melbourne and Australia in general, while something to take seriously, is not the looming environmental and social catastrophe some “environmental” groups would have you think it is. Melbourne is also not unique in experiencing a relatively high rate of population growth in a developed economy. For example, Greenville, South Carolina is growing at a rate of 5.8% per year while Austin, Texas is growing at a rate of 2.9% per year.</p><p>Where, though, will all these extra people fit? One thing faux-progressive anti-immigration groups like Can Do Better and planning professionals actually agree on is that expanding endlessly into greenfield areas on the fringes of the city is not ideal. The people living here lack walkable areas, access to public transport, and are more likely to suffer from health issues associated with dependence on the car and lack of exercise. These areas are also some of the only affordable places left in the city. This growth also degrades the natural environment and Melbourne’s remaining agricultural land.</p><p>The thing that faux-progressive anti-immigration groups and many planning professionals disagree on is whether or not established suburbs — which have access to public transport, jobs, schools, shops, and walkable areas — are “full”. They are not. Below is an map which shows Metropolitan Melbourne and the land which is covered by the Heritage Overlay in the planning system. This overlay is meant to protect Victorian built heritage, and makes it extremely difficult to develop any sort of higher densities.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/716/1*rLFr8wNV2pNtj6Q7SmbfWQ.png" /><figcaption>The Heritage Overlay</figcaption></figure><p>As you can see, the Heritage Overlay basically covers every wealthy area near the city with good access to transport and other services. The planning system is far more complex than just this overlay, but I think this gives a good indication of what Melbourne’s policy goals are. Is protecting this much of Melbourne’s heritage a good idea, especially when it means not allowing new residents to live in these areas? Does the entirety of Carlton North really need to be preserved as is? With systems like this in place, it’s no wonder Melbourne keeps growing horizontally. At the rate things are going, poor people will keep on getting pushed to undesirable areas on the city fringes, while wealthy white faux-gressives who can afford to live in these heritage protected areas will keep patting themselves on the back for keeping their city “liveable”, at least for people like them.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c913ff41fd4f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Coffee in Three Parts]]></title>
            <link>https://medium.com/@djosephhenri/coffee-in-three-parts-b17b5692a937?source=rss-e850b85608de------2</link>
            <guid isPermaLink="false">https://medium.com/p/b17b5692a937</guid>
            <category><![CDATA[japan]]></category>
            <category><![CDATA[espresso]]></category>
            <category><![CDATA[pourover]]></category>
            <category><![CDATA[australia]]></category>
            <category><![CDATA[coffee]]></category>
            <dc:creator><![CDATA[Dan Henri]]></dc:creator>
            <pubDate>Fri, 07 Apr 2017 04:24:24 GMT</pubDate>
            <atom:updated>2017-04-07T04:24:24.268Z</atom:updated>
            <content:encoded><![CDATA[<p>Like many who have lived in multiple countries, I find myself expending a significant portion of my mental capacity on the differences in the places I’ve lived. This can sometimes be an interesting and worthwhile activity, especially in the company of an open minded conversation partner who is able to help clarify and analyze the finer points of my (incredible) realizations. Equally, this exercise can be useless and an overall net-negative in terms of human advancement when in the company of not-so open minded people. In this case people will often employ the tried and true mental techniques of stereotyping, mockery, and nationalism in order to rationalize the cultural difference in question. In this post I’m going to talk about a cultural difference that is so sensitive that the mere mention of it in the wrong contexts can provoke nearly all of the above reaction in the residents of my current country of residence, Australia. That topic, which I may have given away in the title, is coffee.</p><p>On some level I can understand this reaction, many Australians are convinced they have the best coffee in the world, and simply don’t have exposure to coffee outside of the espresso paradigm (although this is changing). I have heard terrifying first-hand accounts of Australians in foreign lands (usually North America), travelling mile after mile, city after city, in search of a <em>real </em>coffee, with none to be found. This usually ends up with me insulting them in a mildly patronizing manner out of an instinctual defensiveness for anything my home country creates. This is followed by acting the same way and the battle for the pride of our nations has begun before you know it.</p><p>Does it have to be like this? Why does coffee provoke such strong emotions? I’m still not sure, but it is something I’ve become very interested in lately. I still remember my first time ordering coffee coffee from an Australian style coffee menu; it was actually at the New Zealand airport on my way to Australia for the first time. I was tired and wanted a pick-me-up. I stumbled across a strange fast-food chain I had never seen before called “Hungry Jacks” (I later learned this is what Burger King is known as in Australia and New Zealand). I got in line, ready to order some breakfast and coffee, only there was no “coffee” on the menu. There was only flat-whites, lattes, cappuccinos, and some other items that I might have heard of before but certainly didn’t know what they were. I ordered a flat-white. It was, to this day, perhaps the worst coffee I have ever had. “What the hell is wrong with these people?” I thought to myself, confused and a little scared of these new coffee world in which apparently what I knew of as “coffee” didn’t exist.</p><p>I grew up in the far flung suburbs of Detroit, Michigan, USA. My hometown was originally a farming community and is now a product of America’s love affair with urban-sprawl. Growing up here, the adults around me were mostly the children of the children of immigrants, although sometimes the way they talked you would think they had lived the immigrant experience. Referring to friends by by where they’re grandparents had come from was common. My mom had her Romanian friend Sally, her Polish friend Steve, and her little Deigo friend mark (It’s ok she’s allowed to say that her Grandparents were from Italy). People here took pride in their immigrant roots. They were down to earth, they were tough, just not tough to live too close to Detroit. But they fancied themselves cut from the same cloth as their immigrant forebears who had arrived in the city when it was still known as the Paris of the west.</p><p>The people here drank coffee. It was black, sometimes with milk. It was made in a coffee machine The coffee machine’s purpose was to make coffee. You would insert coffee grounds and water, and out would come coffee. That was coffee to me. It knew no other coffee. I grew up seeing adults drink this coffee at all occasions. In the morning, at social gatherings, and at diners where you could literally as much as you wanted. My family would serve coffee at 9pm at night on Christmas Day, this was a socially accepted way to let people know it was time to get out of your house. Coffee was a very casual, no-frills experience and I think it fit in with the salt-of-the earth ideal that people in this area had of themselves.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*nMtLcdmOLkSBipo3.jpg" /></figure><p>Coffee as I knew it</p><p>When I went to college in Ypsilanti, Michigan, my definition of coffee expanded but not much. Ypsi (as the locals say) is a post-industrial city with a post-industrial hipness gurgling underneath. It too served coffee. But at the local somewhat hip coffee shop, the Ugly Mug, they served a bit more. By a bit more I mean sometimes you could pick where your coffee came from. I would pick the one that sounded best, usually Guatemala. You could also order frothy, espresso based drinks. All I knew is that these required more thinking to order and for some reason took a long time. I usually avoided them.</p><p>Just as I was settling into the Ypsilanti coffee scene, I was thrust into one far away, but strangely familiar. I spent a year on exchange in Osaka, Japan. Overall, the coffee culture is quite similar to the US. There are restaurants, much like diners, where you can get mugs of black coffee with free refills (thank you Mr. Donuts) and sit and talk to an friend for as long as you like. There were some differences; for example much of the coffee comes from superautomatic machines, which grind the beans and brew the coffee at the push of a button, old fashioned cafes (Kissaten) may not offer free refills, and the small cups of black coffee can be expensive, but at least Japan and I were working in the same paradigm. Coffee was still coffee; black, roasty, not very viscous.</p><p>It was on this first foray into Japan that I experienced something which may have been responsible for my great interest in coffee to this day. I had ordered a coffee at one a kissaten. We were in here because they allowed you to smoke and we both thought we were pretty adult, smoking and ordering coffee. However, these proud adult feelings soon gave way to awe when I saw the method the old man who ran the cafe was using to brew our coffee. It was what he called siphon coffee (also known as vacuum pot coffee). It reminded me of a chemistry set, bunsen burner and all. It consisted of a glass vessel of water, heated by a burner. The water would boil and then get sucked into a chamber situated above the water which contained coffee. The coffee grounds would be submerged in water, the lower chamber would cool, causing a vacuum effect which sucked the water back down into the original vessel (a filter placed between the two chambers prevents coffee ground from being sucked in. The method was incredible, but the result was what I expected coffee to be. I was very intrigued.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/736/0*MjCEjTDyTVdG4tOS.jpg" /></figure><p>A siphon coffee maker</p><p>It was in Japan that I met my partner and followed her back to Australia. We can pick up the story where I left off above with the worst coffee I have ever had at that airport in New Zealand. It was a fish out of water experience. At first I just stuck to long blacks (a shot of espresso followed by some hot water) as they were closest to what I knew as coffee. It didn’t take me long to grow quite fond of the coffee in Australia; I cut my Australian coffee teeth on the classic Italian cafes throughout the city of Melbourne. There coffee here was robust, and had a satisfying bitterness and roastiness to it when it was made well. I eventually even came around to espresso with added milk.</p><p>It was during my time in Australia when I had my first real “third-wave” coffee experience. Third-wave coffee is a term that describes the coffee resurgence that has been occurring in countries all over. If you don’t know what it is, you would probably be able to picture one if I said “hipster coffee shop”. I don’t think the word “hipster” is all that descriptive these days but in this case it works well. Third-wave coffee tends to put a lot of focus on the “origin” of the coffee bean. They roast it lighter to bring out flavors most people don’t associate with coffee; basically flowery and fruity flavors, at least in my experience. My friend in Sydney took me to a cafe that indulged in this style of coffee. I was excited because they prepared what I’ll call pour-over coffee, which makes a product roughly the same as the coffee I grew up on. But when I drank my seven dollar filter coffee, it didn’t taste like the coffee I knew and loved, it tasted like watery flower water with some very watery tasting coffee in there for good measure. I was disappointed.</p><p>After this coffee experience I went back to Japan for a year to teach English. Here I visited many a pour-over coffee place, maybe not quite as hip as the one in Sydney, so maybe not quite third-wave. They were often run by people going on middle-aged, and had homey wooden interiors. I really loved these places and their coffee, I ended up buying my own pour-over coffee setup to make my own, which I still do.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*KhUnGidyetUuRbpD.jpg" /></figure><p>Pour-over coffee</p><p>After this year of coffee stimulation I came back to Melbourne, excited what the coffee scene had to offer, it was all just so hip. I soon found that the same issues I had at that cafe in Sydney — the watery flower water syndrome — were widespread. It seems that nearly every third-wave cafe in Melbourne subscribes to the watery flower water with some watery coffee in there too dogma. This is not only something that occurs in the pour-overs here, but also in the espresso. I’m sure it’s extremely delicious to some people, but to me it’s all just watery coffee with no body and a little bit of flowery or fruity flavor.</p><p>If I contrast this with some third-wave coffee places I’ve had on visits back to the US, I find that the US coffee shops, even the maniacally hip ones, are quite different. There some amount of roastiness, there’s body, there’s the things I expect from coffee, but also some interesting blueberry-ish flavors or something like that.</p><p>I think this is just a result of where I grew up. I expect certain things from my coffee that Australians seem to consider defects in coffee. This leads to coffees with very little flavor, but what is there is sort of interesting. I’d rather just get punched in the face by coffee flavor personally, anything extra is a welcome addition.</p><p>If you’ve for some reason come across this blog and actually read this post to the end you are in luck. Below are a few of my very favorite coffee places I’ve been to from my experiences in Japan, Australia, and the US:</p><p><a href="http://www.cultivateypsi.com/">Cultivate Coffee &amp; Taphouse</a>: Ypsilanti, Michigan, USA — A gem of a place in a gem of a city. They’ve got great, great beers and great, great coffee. This place is like my gold standard for how I like my coffee. They have the high standards and rigor of a third-wave coffee place, but it’s got all those coffee flavors I’m used to. Also they fund cool community projects.</p><p><a href="http://anthologycoffee.com/">Anthology Coffee</a>: Detroit, Michigan, USA — Truly a gift to all coffee enthusiasts in south-east Michigan. The coffee here just feels strong and heavy. It’s like a punch in the gut each time you take a sip, but in a good way. In my mind this place combines the classic coffee of my youth with the flavors sought by the third-wave coffee producers of today.</p><p><a href="https://blackmarketroasters.com.au/">Black Market Coffee Roasters</a>: Sydney, Australia — I went to their store in Newtown but I believe they have others. This is really the only place that serves Australian third-wave espresso that I loved. I ordered a piccolo latte and it had a good amount of body and a lot of grass flavor, which I had never had in coffee before. I can only hope that other third-wave coffee places in Australia go in this direction.</p><p><a href="http://hanagataminet.com/">Hanagatami(花筐)</a>: Toyota, Japan — A great coffee place in a city not known for its tourism. I only know of this place because I lived in Toyota. It’s a great place to live, but unless you want to see the Toyota (car company) museum or are exploring some of the lovely nature in the area, there’s not a ton to do as a tourist. If you are into coffee and in Nagoya — the big city next door — you might want to check this place out. It is a good mix of the classic Japanese kissaten with a little bit more of a refined feel. They do pour-over coffee and it is truly wonderful. The guy who operates the coffee part is pretty friendly and his mom runs the connected flower shop. Adorable. Cool fact: I was told by the guy at the counter that they get their water for their coffee from Korankei, a beautiful gorge about a 45 minute drive away.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b17b5692a937" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>