Giter Site home page Giter Site logo

jugshaurya / productive-weekday Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 1.0 5.82 MB

A Visual Representation of github contribution to find out the most productive work weekday for a given user

Home Page: https://productive-weekday.netlify.com/

HTML 4.03% CSS 17.84% JavaScript 78.13%
reactjs now-sh d3v5 nodejs expressjs netlify netlify-deployment

productive-weekday's Introduction

Productive-Weekday (Visit Now)

Productive-Weekday Server (Visit Now)

Idea :octocat:

To make those racing cars bar-chart of youtube that people make to earn money in excel or tabuleau,
but we are goiing to make it using code!!

made with react made with d3v5 made with cheerio made with express last-commit code-size

Peek a boo!:

Implemented Features :

Goal In Mind

1. Find the most productive week day of your github from the day a person joined the github.
2. My Dataset
  a. will be using cheerio to fetch the data of day wise contribution-count from the github page.
  b. Not using github api to fetch users data
3. Tech Stack
  a. React
  b. D3.js (v5)
  c. Dataset week wise

Run client

  cd client && yarn start

Run server

  cd visuald3server && npm run dev

Wanna Clone?

git clone {this repo}
cd client && yarn  && yarn start (one tab)
cd visuald3server && npm i && npm run dev(other tab)

STEPS:

  • Get the user data to get the joining date

    1. Get User info + scrapUrls
  1. Dates are something weird while fetching svg of user contribution for github main page
  • Generate the urls in an array to do scrapping later on over each url

    https://github.com/users/jugshaurya/contributions?from=`yyyy`-12-01&to=``yyyy``-12-31
    - this will give result from `yyyy-1`-12-31 to `yyyy`-12-31
    
    https://github.com/users/jugshaurya/contributions?from=`yyyy+i`-12-01&to=`yyyy+i`-12-31
    ... for i = 0 to i<=d
    
  1. generate the dataset from scrapUrls after step 2
  • Retrieve the rect tag elements and get date-count and data-date values
  • Create a dataset around it and return to front end
  • Done!
  1. Plot the Result as race bar graph to see the most productive Week Day
  • Generate fake data (done using src/utils/gerateRandomData.js) and then :
  • Plot Bar graph for one week first
  • plot the bar graph for every week every s number of seconds; s=1000
  • new weekly data will be containing the sum of counts of days from week-1 to week-z; where z is current week pltot number
  • Arrange the bars in descending order to arrange the max value bar at the top and min at the bottom
  • Smooth the y-position-change, count update, barwidth update.
  • Show labels day and count
  • Change Bar colors and modify the UI
  • show the week near the right bottom corner with date
  • show ticks on x and y axis/ Show Grid
  • Render Random Data for visuals
  • Show user info somewhere
  • Display the error toast(#issue2)

Deployment

  • add a vercel.json file
  • server
  • Add a bulid command and directory to deploy to netlify.

What is D3 ?

  • D3 stands for Data-Driven Documents and is widely used to create interactive data visualizations on the web.
  • The way most people use D3 with React is to use React to build the structure of the application, and to render traditional HTML elements, and then when it comes to the data visualization section, they pass a DOM container (typically an svg) over to D3 and use D3 to create and destroy and update elements. -D3 helps you bring data to life using SVG, Canvas and HTML. D3 combines powerful visualization and interaction techniques with a data-driven approach to DOM manipulation, giving you the full capabilities of modern browsers and the freedom to design the right visual interface for your data.

Inbetweening or tweening

  • is a key process in all types of animation, including computer animation. It is the process of generating intermediate frames between two images, called key frames, to give the appearance that the first image evolves smoothly into the second image.

Thank you

Server

https://productive-weekday-server.now.sh

 - ReDeploy
    - make changes and check them if working via postman may be.
    - go to visulad3server folder &
    - vercel (@cli).
    - vercel alias press[ctrl+v] https://productive-weekday-server.vercel.app
    - vercel --prod // deploy to production

Client

https://productive-weekday.netlify.com/

 - ReDeploy
    - make changes and push to github.
    - Go to netlify
    - and deploy there.

Shaurya Specific

  • get my stats of shaurya for gatsby portfolio app to hide access token.

productive-weekday's People

Contributors

dependabot[bot] avatar jugshaurya avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

priyansh18

productive-weekday's Issues

Permission required :) inside cors

Hi, Shaurya. I would like to request cors access to my personal website.

Please add priyanshsinghal.com in your whitelist.

Thanks in Advance.

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.