Code Monkey home page Code Monkey logo

tworavens-backend's Introduction

Introduction

License

TwoRavens is a system of interlocking statistical tools for data exploration, analysis, and meta-analysis. The first to be released is an interface for quantitative analysis, that allows users at all levels of statistical expertise to explore their data, describe their substantive understanding of the data, and appropriately construct statistical models. This integrates with Dataverse (Project|GitHub) and Zelig (Project|GitHub), through a portable, lightweight, browser-based and gesture-driven interface, allowing users to run statistical models available in Zelig on data archived in Dataverse.

Project page and publications available at: http://2ra.vn

To demo TwoRavens using replication data from Fearon and Laitin's 2003 article, Ethnicity, Insurgency, and Civil War: https://beta.dataverse.org/dataexplore/gui.html?dfId=37&

What we did

The data that TwoRavens used all comes from Dataverse. So we are trying to develop an independent backend, which can handle, analyze the origin data, and send the data to TwoRavens.

How to build

Environment Requirements

  • Java SE Development Kit 8
  • R 3.2.2 or higher
  • R packages

Get the Project

  • get the project from github

git clone https://github.com/FoxerLee/TwoRavens-Backend.git

Import the Project to IDE

Open the pom.xml file with IntelliJ IDEA. It will automatically import the required dependencies.

Build the Project

$ cd TwoRavens-Backend
$ mvn clean package

You can also use IDEA to create jar file or war file.

How to run

$ java -jar  filename.jar

If you build war file, you can simply put the war file into tomcat.

How to use

We implemented and packaged 5 http interfaces, which were used both for users and TwoRavens. Here you can see a simple description about these interfaces. More detail information can be found in High-level Design document.

create/xml?name={test}

This interface can create .xml file according to the .tab file.

create/prep?name={test}

This interface can create .prep file according to the .tab file.

download/xml?name={test}

This interface candownload .xml file.

download/prep?name={test}

This interface candownload .prep file.

download/tab?name={test}

This interface candownload .tab file.

Code Structure

main
├── java (Spring boot code about create or download files)
│   └── com
│       └── monetware 
│           └── demo
│               ├── DemoApplication.java
│               ├── controller (Create and Download implementation)
│               │   ├── CreationController.java
│               │   ├── DownLoadController.java
│               │   └── UploadController.java
│               ├── prep (Create .prep file)
│               │   ├── RemoteDataFrameService.java
│               │   ├── preprocess.R
│               │   └── scripts
│               │       └── dataverse_r_functions.R
│               ├── variable (Some useful Variable)
│               │   └── root.java
│               └── xml (Create .xml file)
│                   ├── CreateXML.java
│                   ├── SummaryStatCalculator.java
│                   └── WriteXML.java
└── resources (Store files)
    ├── application.properties
    ├── index.html
    ├── preprocess.R
    └── static (Store created files)
        └── files
            ├── prep
            │   └── test.prep
            ├── tab
            │   └── test.tab
            └── xml
                └── test-ddi.xml

resources: Store created files like xml, prep and tab file.

  • static: Store created files

java: Spring boot code about create or download files

  • controller: Create and Download implementation
  • prep: Create .prep file
  • xml: Create .xml file
  • variable: Some useful Variable

tworavens-backend's People

Contributors

foxerlee avatar

Watchers

James Cloos avatar  avatar

Forkers

xuawai

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.