Git Product home page Git Product logo

datagenerator's Introduction

Data generator

This service generates randomized data set about locations and converts it from JSON to CSV. It consists of two microservices made with Spring Boot that uses Java 13.

Getting Started

To use this microservice clone or download this repo. After you unpack it, open the cmd or any console emulator you are using and go to the first microservice location - for example

cd C:\Users\m0arc\IdeaProjects\datagenerator\randomValuesGenerator

After doing this run

mvnw.cmd clean install

and then

mvnw spring-boot:run

Congrats! You got the first microservice running! Now let's open another console window and do the same thing but with the second microservice.

cd C:\Users\m0arc\IdeaProjects\datagenerator\CSVConverter

mvnw.cmd clean install

mvnw spring-boot:run

Now you got both microservices running you can proceed to their own sections!

Microservice #1

The first one is called random value generator and it's running on port 8080. There is a database connected with prepared location data. This microservice randomly chooses a list of data to display and return it in JSON format on its only endpoint. To access it, go to

and instead of {size} put a number of amount of data set you to wish to generate.

Microservice #2

You won't be able to access its endpoints without the first microservice running!

The second microservice is called CSVConverter and it's running on port 8081. The way it works is quite simple. It sends a request to the first microservice (currently it asks for 10 sets of data but it can be changed inside code) and convert it to CSV file. When going to an endpoint, you can download such a file and display it in notepad/excel or whatever text editor you wish to you. It has two endpoints:

It returns CSV file with data in a format of ‘type, _id, name, type, latitude, longitude’. The first line display columns and every other line represent one object.

This endpoint works exactly like the previous one although it put you in charge of selecting attributes! There are 15 attributes to choose from:

  • _type
  • id
  • key
  • name
  • fullname
  • iata_airport_code
  • type
  • country
  • latitude
  • longitude
  • location_id
  • ineurope
  • countrycode
  • corecountry
  • distance

Order or letter case doesn't matter but remember to separate them by using comma!

Thanks for your time, if you have any questions please contact me via Github email or discord (M0arcin#7356)

datagenerator's People

Contributors

m0arcin avatar

Stargazers

Roman 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.