nightr/server/README.md

32 lines
3.5 KiB
Markdown
Raw Normal View History

2019-04-05 22:00:23 +02:00
```bash
cd server/
source activate.sh
2019-04-06 01:16:02 +02:00
run
2019-04-05 22:00:23 +02:00
```
2019-04-07 04:48:59 +02:00
## Inspiration
We were tasked with the troubling assignment of coming up with a project to built throughout this weekend. We had a base at the bar, sitting inside all confused and slightly drunk, as we did in fact not know if it was dark outside. This bewilderment inspired us to try and figure out how we could efficiently determine if it was nighttime, to try and fight our confusion.
## What it does
The application taps into all the open data that Denmark has to offer. We use the number of cars on the roads, the free parking spaces, the level of the water in the bay, the number of cars having driven across the great belt bridge and whether your favorite pizza place is currently open. We also realise that everything has to utilise Machine Learning, so naturally the application has a support vector machine using all of two data points in an attempt to determine if it's nighttime based on free parking spaces. This is not all though, we also look at where the ISS space station is and much more, we do, however, make sure to not trust the clock.. Or Bing. Furthermore, the application allows for you to live in Australia, thus inverting everything, or perhaps you're a flat-earther and do not recognize space as a thing, thus special effort has to be taken.
## How we built it
Through the power of drunken ideas and mediocre at best skills at Python.
We have a backend server which is written in Python. This server is easily extendable with strategies for determining whether or not it is nighttime. Whenever a request is received, the context of the person asking the question is sent to each strategy, who then has to determine if they think it is nighttime. Each answer is pooled together and we determine a weighted average from this. How each strategy determines this, is heavily dependent on its focus area. Some strategies use advanced machine learning, some use open data which has to be scraped or some just figure out if Alexanders upstairs neighbour is playing League of Legends.
On the frontend side of things, we have built a cross-platform application in nativescript. This application is built using their frameworks in Javascript and is tested on an android phone.
## Challenges we ran into
We had to figure out how nativescript worked. We also had to find all the required data and do a bunch of odd calculations, such that the strategies could fulfill their purpose. The most difficult part was definitely building the app to work on an android phone, as none of us had really used this framework before. We had a slight grasp on machine learning prior to this, so the primary struggle of this, was building the dataset.
## Accomplishments that we're proud of
We have scraped thousands of lines of open data, scoured through it to find what could be correlated to whether or not it is nighttime. We have built an android phone from the bottom up, capable of displaying our results and talking to our backend server. We have had to look at and decipher what internal calls different websites perform, as they did not actually give an open API. All of this results in an app which can give an accurate guess on whether or not it is nighttime.
## What we learned
How to use nativescript.
How to scrape data using various python frameworks.
A strange amount of information in regards to the flat earth society.
How many factors ACTUALLY have a direct correlation with whether or not it is nighttime.
## What's next for Nightr
We're actively looking for investors for our series A funding. BlackRock, get in touch!