Logo

ABOUT THE PROJECT

There are roughly 5000 stars visible at night - where are they?
STELLARGAZE helps find areas with low light pollution and ranks them in real-time according to both the moon phase and the nightly weather forecasts of humidity and cloud coverage. It is made for both space enthusiasts and casual observers of the sky. This was my first ever experience with React and my first real project after completing my Bachelors in Computer Science. I decided to become a professional web developer after; I had so much fun working on this with close friends at cafes all throughout Hamilton, Ontario. There are future plans to make this an experiential meditative stargazing experience using React Native and my better skills after working 3 years in the industry.
ROLE
Full Stack Developer
Design
Research
CLIENT
Personal Project
DATE
June - October 2019
Teammates
Vlad Falach
Evan Reaume
With an average score of 46% for these public areas, the app does not recommend stargazing in the current conditions, as there is high humidity and high cloud coverage.

HOW IT WORKS

Helps users in North America, Australia, and New Zealand find nearby parks with low light pollution, cloud coverage, humidity, and moon illumination. These parks are ranked according to our proprietary algorithm - approved by an astronomer from McMaster University - which assigns a score indicating naked-eye star visibility. A score of 80% or greater represents good visibility.

This saves time and energy by not having to read light pollution maps. Currently, the search query "where to stargaze" returns blogs and niche websites with either minimal or complex information.

The dataset consists of:

Satellite Data - a satellite image provided by the Earth Observations Group (EOG) at the National Centers for Environmental Information. This Day/Night Band image captures the average radiance values of North America, Australia, and New Zealand. The pixel values we extract correspond to a number on the Bortle scale, which gives an approximate measure of the night sky's brightness at a particular location.
GIS/Park Data - Parks within 140km of the user in lower light-pollution zones are ranked based on not only the light pollution, but cloud coverage (the % of the sky covered by clouds), humidity %, and moon phase.
Weather Forecast Data - Weather forecast data is obtained from OpenWeather. Due to the data limitations and the wide area required for forecasting, doing forecast requests for each park individually was infeasible, as well as not financially viable. As a result, a k-means clustering algorithm was used to cluster nearby parks together, since all parks in an area could share a forecast. After some testing, there was not a significant difference between using nearest neighbor and the more elaborate methods, so nearest neighbor was used. As a result, the centroid of each cluster of parks is used as the forecast request point, and all parks in a cluster share the same forecast.

More detailed information can be found on the FAQs

The result of mixing the satellite data with the GIS park data. Stored parks are coloured according to light pollution - the lighter the colour, the more light pollution.

WHAT I LEARNED

  • React has a fairly steep learning curve. Bringing engineering principles (state...) to the front-end made me thankful I got a degree prior.
  • I was shocked that no one has attempted to create a visibility metric with respect to naked-eye stargazing. Functions were used based on 4 factors: light pollution, moon illumination, humidity %, and cloud coverage. For example, if the moon illumination at a given time is over 50%, it will assign a score of 0 to the moon. This means that since the moon illumination is high, obfuscating the stars, it will result in a lower overall score for that park
  • You can do anything to avoid unnecessary expenses, however it might result in less maintainable code. For example, to avoid calling a pay-per-use API to assess the real-time park weather in a given radius, we used a complicated k-means script to get an approximate score. This resulted in free api requests, but with less accurate data.
  • I grew a lot as a developer since this project. While I am very proud that this was my first ever hobby project, I am not particularly proud of the code and architecture of the app itself. When it comes time to refactor for a consumer app, I will make sure the backend is a lot more modular, make use of Typescript, and avoid the amount of client-side logic used currently.