https://github.com/lovasoa/dataiku-exercise
US census visualization web application. Given as an exercise by dataiku after a job interview. I didn't get the job.
https://github.com/lovasoa/dataiku-exercise
elm exercise job-interviews nodejs statistics webapp
Last synced: about 2 months ago
JSON representation
US census visualization web application. Given as an exercise by dataiku after a job interview. I didn't get the job.
- Host: GitHub
- URL: https://github.com/lovasoa/dataiku-exercise
- Owner: lovasoa
- Created: 2017-03-07T23:05:09.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-03-08T00:10:55.000Z (over 9 years ago)
- Last Synced: 2025-08-01T16:19:40.555Z (10 months ago)
- Topics: elm, exercise, job-interviews, nodejs, statistics, webapp
- Language: Elm
- Size: 10.8 MB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# US-census visualisation
This is a small single-page web app to visualize US census data
## Project status
The project is currently in a working state,
waiting to be reviewed.
## Demo
A demonstration server is running on
http://visualize-census.eu-2.evennode.com/.
## Technological stack
#### Frontend

The frontend is very simple: it is composed of
a single page, that allows the user to choose which
dimension of the data to analyze, then queries the server,
and displays the results in a table.
It is written in [Elm](http://elm-lang.org/).
#### Backend
##### Application
It is a simple layer that serves the static assets,
and answers to API queries by fetching data in the
database.
It uses [NodeJS](https://nodejs.org/en/)
with [express](https://expressjs.com/).
##### Database
The original database file schema was quite
inefficient for the kind of queries we have to do.
A python script is provided (`src/backend/import-db.py`)
that takes a database in the old format, and
generates a new optimized database in
`src/backend/census.db`
For the sake of simplicity,
the new database uses [SQLite](http://sqlite.org/) too.
Performance in a single user context is currently very good.
However, migrating to another RDMS
might be wanted as the data volume grows.
## How to use
#### Dependencies
Ensure you have node (>=6) and python (>=3.5) installed.
In a debian-based distribution, you can install them with
```
sudo apt install nodejs python3
```
#### Launch the server
A launch script is provided, that creates the optimized database,
compiles Elm files to javascript, and launches the server.
Launch it with:
```
npm start
```