Coder Social home page Coder Social logo

nss-alive's Introduction

nss alive

This is an ambitious project to project a wrapper layer on top of the Armenian NSS data sources. We use Python to download all the data that the NSS provides, clean it up and store it in our sqlite database, then with that data we expose it to a beautiful front end with React, d3.

Building

Setting up the project for first time

Python

You'll need to have Python installed, we are using Python3. Assuming you are on Debian based distribution, aka Debian or Ubuntu, then you do:

$ sudo aptitude install python3-pip -y

Then I recommend you update pip3 itself with pip3 install --upgrade pip

To install the Python requirements, you'll need to run $ npm run pyrequire. If you look in the requirements.txt file you'll see two pacakges, one is requests, we will use that for HTTP requests and the other is xlrd, this is a package to read and handle Excel files.

node

Now you need to have the node part of the project working, for that just do

$ npm install

Developing

Linux

You'll need to have some system requirements, primarily for our sqlite3 database. For this project you can version control a junk database under junk, to make it easier for testing and debugging the code when not in a production environment.

Get sqlite with aptitude, as always: aptitude install sqlite.

If you're working on the JavaScript part of the project, then you need to open a shell and just run npm run watch, and that will:

  1. Restart the server when there's a change in backend code.
  2. Recompile the front end code whenever there is a JSX change.
  3. Bundle the code up for the front end

Responsibilties and Task

The project is divided into tasks that reflect the pipeline of the whole application.

Roughly:

Python

  1. Download the data from ArmStat/NSS.
  2. Clean up the data for a format suitable for an insert query to our sqlite database.
  3. Do this periodically, can do it as a cron job or systemd job, I prefer systemd.

JavaScript

  1. node now needs to provide a layer on top of this database. Use express to create a nice REST API. Keep in mind that this REST API must be well made insofar as that we want to have unique graphs created by the user be recreatable by URL. Use React router on the serverside for this, examples in silicondzor.
  2. Front end React provides a skeletion as an application box, handling events, UX, etc.
  3. d3 add the great UI effect of graphs that tell a story and narrative.

nss-alive's People

Contributors

robgev avatar fxfactorial avatar narghev avatar kalipsobznuni avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.