First API tests
I first started testing in Unity, but could not access the API. After some digging, I found out that public APIs, such as the UNHCR's may restrict direct client-side access due to CORS (Cross-Origin Resource Sharing) policies. At this point, I decided to start building the project using Node as a proxy server and then access the local server on Unity.
My idea is to visualize the total number of applications as particles in a particle system, and go from there to display the different interactions in this simulation.
I referred to the UNHCR API documentation throughout this process, as well as this project documentation that used the same API (but in Python).
I built a simple node server, so I could work with node-fetch, cors, and express.
Accessing the API:

From there, I wanted to access and all the data and calculate the total number of applications available.
After sorting:
However, here you could not see the years or the countries. Included version below:
Afterwards, I wanted to see the data for decisions. I had some issues trying to get the number of total decisions. It would return as a null, even though the countries would update accordingly. After logging a sample response I was getting, I realized that it was not returning a single value field in the asylum-decisions endpoints. Instead, it was returning multiple fields, like
So I prompted dec_total accordingly and updated the per-country parsing block to break down individual decision types explicitly.
Leave a comment
Log in with itch.io to leave a comment.