Giter VIP home page Giter VIP logo

cfviz's Introduction

Codeforces Visualizer

This is code repository for a simple analytics visualization site for Codeforces online judge users using Codeforces API. The site is currently hosted at here.

Current features

Single User Analytics

  • Verdicts chart
  • Languages chart
  • Tags chart
  • Levels chart
  • Total tried problems count
  • Total solved problems count
  • Average and max attempts
  • Count of problems solved with one submission
  • Max AC for a single problem (It indicates in how many ways someone solved a problem)
  • List of unsolved problems

Comparison between two users

  • Current, max and min rating
  • Number of contests
  • Best and worst position in contest
  • Max positive and negative rating change
  • Compared rating time-line
  • Total tried problem count compared
  • Total solved problem count compared
  • Average and max attempts compared
  • Count of problems solved with one submission compared
  • Max AC for a single problem compared
  • Tags compared
  • Levels compared

Issues

  • When somebody searches for a handle that doesn't exists, we get Cross-Origin Request blocked and the status code becomes 0 in jQuery. So we can't determine if the user doesn't really exists or some other network problem occurs.
  • Firefox hangs for a while when drawing the tags comparison chart. Probably because it's big. I have plan to divide that chart in two parts.
  • When counting number of solved problems, some problems that appear both on div 1 and div 2 get counted twice.

cfviz's People

Contributors

archit-p avatar davidberard98 avatar l1nkus avatar maksim1744 avatar mashpynascenia avatar maskmanlucifer avatar me-shaon avatar ranamahmud avatar sbakic avatar sjsakib avatar user202729 avatar xtactis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

cfviz's Issues

[FEATURE] Embed in Markdown

Similar to github-readme-stats, it's friendly in writing a markdown file.

[![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=anuraghazra)](https://github.com/anuraghazra/github-readme-stats)

Anurag's GitHub stats

[FEATURE] API

what about adding two fields under the handle. one for the API key, and the other is for the API secret. check codeforces API authorization on how to get private data using the API info. so the user can keep track of his private submissions. ๐Ÿ˜ƒ

Considers base rating as 1200 for first contest

I recently did a profile test and found out that now it is considering the base rating (that is, the rating before any contest) as 1200 instead of 1500 (which is the base rating for a user that Codeforces considers).

Due to this, the Max up is showing up as 288 (actually I had a -12 for my first contest, as my first rating was 1488), and that surely isn't my Max up as of now. I clearly remember that earlier it used to work correctly.

Facebook Recommend Button Not Functioning

The text "Be the first...." is also cropped off.

image

After clicking:
image

You can get rid of the button, replace it with some other sharing feature because facebook recommend is pretty outdated honestly, or fix the current functioning. I would like to work on this and fix it whatever you decide is the way to correct this!

Places array computation algorithm is wrong

The current algorithm for computing the places array is wrong. For example there are 3 users with rank [1,2,3] and the virtual user is strictly worse than the user with rank 1 and strictly better than the user with rank 2, then the resulting places array is [1,2,2,3] instead of [1,2,3,4] (which becomes [1,3,3,4] instead of [1,2,3,4] after recomputing rank)

What's the best way to solve the problem?

  1. Explicitly state that the places array doesn't need to be correct and only equality of adjacent elements matters. (for example [1, 1.5, 2, 3] is equivalent to [1, 2, 3, 4])

Diff:

diff --git a/js/calculate.js b/js/calculate.js
index 1a4f4a6..6dfbdec 100644
--- a/js/calculate.js
+++ b/js/calculate.js
@@ -89,6 +89,19 @@ function process(contestants) {
 }
 
 
+/**
+ * Calculate rating changes.
+ *
+ * Arguments:
+ *
+ * previousRatings: An array of previous rating of contestants.
+ * standingsRows: An array of contestant ranks. This array must be
+ * non-decreasing, and the ranking of two adjacent contestants must be the
+ * same if and only if they have the same points/penalty; however the exact
+ * value does not matter - for example [1, 2, 3, 3] and [3, 6, 7.5, 7.5] are
+ * considered equivalent.
+ * userId: An array of contestants handles (strings).
+ */
 function CalculateRatingChanges(previousRatings, standingsRows, userId) {
   var arr = [];
   for (var i = 0; i < standingsRows.length; i++) {
diff --git a/js/vir.js b/js/vir.js
index 615b0ba..833ede9 100644
--- a/js/vir.js
+++ b/js/vir.js
@@ -94,7 +94,7 @@ function refresh() {
     if ((points > rows[i].points || (points == rows[i].points && penalty <= rows[i].penalty))
         && rank == -1) {
       handles.push('virtual user');
-      places.push(rows[i].rank);
+      places.push(points == rows[i].points && penalty == rows[i].penalty ? rows[i].rank : rows[i].rank - 0.5);
       rank = rows[i].rank;
     }
     if (userHandle == rows[i].party.members[0].handle) {
  1. Compute the ranking correctly. In this case it's easier to move the recalculate rank function to that part as the logic would mostly overlap.

Also: If the virtual user is worse than all of the participants, then the result will be the result of the last computation.

Tried and solved problem count is incorrect

In my CF profile I see that I have solved 206 problems, but in CFviz there are only 186. I have also tried solving more problems than I have in CFviz. I'm not sure it is a problem on CFviz side, but I better report than not.

feature request: solved by rating

Now that problems have rating tags, is it possible for you to add a bar chart showing how many problems of each rating level have been solved?

Dark mode

We all programmers love dark mode. So why not have a dark mode for an open-source project. I have to rely on third-party apps to convert CF into dark mode. But we can have that feature in-built in this project.

image

image

Don't count 1st contest as max up

First contest can be considered as starting elo, it doesn't reflect best performance in any way. So i feel it's pointless to include in the max up, especially when we should actually be talking about deltas. For example, if someone started at 1400, (with old rating starts), this will be considered their best performance.

Mixing up Optimization Problems

Sometimes (rarely) there are optimization contests on Codeforces, the results for these tasks are always partial scores. These submissions affect many of the categories because they are not considered as Accepted solutions. So, there is a need to filter such submission so that one can get a better view of the CP Problems they have solved on Codeforces, and not mix the rare optimization problems.

Multiple counting issue

hey! Sakib
i want to work on multiple counting issue of problems (total solved).
I can reduce redundant counting to almost negligible level.
This will come with little bit time cost but will work quite well.
Should i work on that or someone else is already working on that ??.

Limit the range of rating in user input

When virtual rating change was fed with -1e22 as the rating, an integer overflow occurred.

Rating given by the user should be restricted or "clamped" to a reasonable range.

Div1 A are counted as A rather than Div2 C

During the past week, I noted that after solving following problems

601A Div1

687A Div1

282C Div2

687B Div1

442B Div1

340D Div2

671A Div1,

number of A increased by 3, and there was no increase in number of C solved.

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.