Giter Site home page Giter Site logo

pokemon-type-advantage-graph-visualization's Introduction

Pokémon Type Advantage Graph Visualization

(ccl4-harryc3-devbp2-suyashn2)

This project visualizes high-level strength comparisons between Pokémon based on their typing using force-based graph drawing.

Executables

Creates a visualization for the strength graph of Pokémon ./draw-graph [input_file_path] [number of pokemon] [is_colored] [is_scaling] [output_file_path]

  • NOTE: All fields are optional, just ensure that is_colored and is_scaling are passed together
  • input_file_path - The path to the csv where the Pokemon are located. Defaults to data/pokemon.csv
  • number_of_pokemon - The number of Pokémon that should be compared and visualized, max is 801. Defaults to 151
  • is_colored - Whether to find the chromatic number of the graph and to color the vertices. Defaults to true
  • is_scaling - Whether to scale the vertices based on its degree. Defaults to true
  • output_file_path - The output file for the visualization fo the graph. Defaults to test_graph.png

Directory Structure

  • cs225 - code provided for CS225 MPs like PNG and HSLAPixel
  • data - location with the csv containing all of the Pokémon data
  • graphAlgorithms - algorithms that are run on the graph (BFS, Visualizer, Coloring)
  • graphStructure - classes that are the strucuture of the graph (Graph, Vertex, Edge)
  • graphUtil - utility class to help create the graph (DataParser, GraphBuilder, TypeMapper)
  • tests - includes all the test files for each class

Getting Started

Compiled with

  • clang 6.0.1

Setting Up

  1. Clone this repo navigate to its directory
    git clone https://github-dev.cs.illinois.edu/cs225-fa21/ccl4-harryc3-devbp2-suyashn2.git pokemon-graph-viz
    cd pokemon-graph-viz
    
    The Pokemon data is already included in csv format inside the repo.
  2. Now make the executable by running make
  3. Run the executable ./draw-graph [input_file_path] [number of pokemon] [is_colored] [is_scaling] [output_file_path]

Example

  1. Construct a graph with 20 nodes, with coloring, but without scaling
    ./draw-graph 20 True False
    
  2. This will construct a graph with 151 nodes, with coloring and scaling
    ./draw-graph data/pokemon.csv 151 True True test_graph2.png
    
    The output for this executable will look like this: Graph Visualization 151 nodes

Testing

The project comes with a test suite that can be build and run it with the following commands:

make test
./test [tag]

The tests can be found in the tests folder. Functionalities can be specifically tested using the following tags:

  • [parser]: the csv is read correctly and saved in an object
  • [builder]: the graph can be built with the correct number of vertices and edges and the correct values
  • [mapper]: the Pokémon types have the correct indicies
  • [graph]: the graph's access methods are correct
  • [bfs]: BFS runs properly on the graph and visited the correct edges and vertices in the correct order
  • [coloring]: the chromatic number of the graph is correctly generated and colors are properly assigned to different nodes
  • no-tags: all of the tests above are run

pokemon-type-advantage-graph-visualization's People

Contributors

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