Skip to content

xngst/press-graphs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About the pressgraps project

Press analytics Flask based API and Flask-Dash based GUI #todo

Data and ETL process

Pressgraphs relyes on a remote mysql database which is updated every day by a bot. This repository consists only of the API and GUI part of the application. The Database and the ETP process are to be described in another repository (#todo)

Architecture

Pressgraphs implements an Model View Control (MVC) Architecture with its main components;

  • Remote Database (not included and not described in this repository)
  • WebAPI
  • WebGUI
    Both the API and GUI use Flask, however the GUI uses Dash GUI extension on top of the Flask environment.

WebAPI

The API is a RESTful Flask based application. Currently it is hosted on PythonAnywhere

Description of Endpoints:

REGISTER

You can register your own API key here:

http://pressgraphs.pythonanywhere.com/create/{user}
example: http://pressgraphs.pythonanywhere.com/create/test_user

RETURN LIST

Pattern:
http://pressgraphs.pythonanywhere.com/date/list/{api_key}/{search_word}/{switch_value}/{start_date}/{end_date}/{site}

parameter variations:

RETURN COUNT

http://pressgraphs.pythonanywhere.com/date/count/{api_key}/{search_word}/{switch_value}/{start_date}/{end_date}/{site}

parameter variations:

INFO

WebGUI

The web application is hosted on heroku.com:
http://pressgraphs.herokuapp.com/
(Please be patient, the app might be running on a free tier heroku dyno so it eventually requires a few sec until it boots up..)

For source code click here
The app needed a few CSS tweaks, the custom.css file is included in the assets directory.

The GUI itself is based on Dash
Dash is a productive Python framework for building web analytic applications. Written on top of Flask, Plotly.js, and React.js, Dash is ideal for building data visualization apps with highly custom user interfaces in pure Python. It's particularly suited for anyone who works with data in Python. Through a couple of simple patterns, Dash abstracts away all of the technologies and protocols that are required to build an interactive web-based application. Dash is simple enough that you can bind a user interface around your Python code in an afternoon. Dash apps are rendered in the web browser. You can deploy your apps to servers and then share them through URLs. Since Dash apps are viewed in the web browser, Dash is inherently cross-platform and mobile ready.


About

Press analytics API and GUI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published