Graph your fav pic using R

Graph your fav pic using R

Just a couple of lines of code to graph your favourite pic using R

Prerequisites :

  1. Convert your fav pic to SVG format (https://pngtosvg.com/)
  2. Convert SVG format file to data coordinates file (https://spotify.github.io/coordinator/)
########## Loading Packages in R ##########
library(data.table)
library(ggplot2)

########## Import Coordinates Data file ##########
# reading coordinator.csv file generated in step 2 above

df <- fread(‘coordinator.csv’)

########## Plotting the Data ##########

p <- ggplot(df, aes(x=x, y=y)) +
geom_point(color = “#BF0000”) +
theme_void()

p <-p + scale_y_reverse()

p

And I have graphed my fav. pic as

I really find this awesome doing it in R .


要查看或添加评论,请登录

Shekhar Pandey的更多文章

  • CloudSql

    CloudSql

    Google Cloud SQL Let's start with basic question as why would anyone should use a google cloud service for SQL when you…

  • GCP: Identity and Access Management

    GCP: Identity and Access Management

    Identity and Access Management (IAM) lets administrators authorize who can take action on specific resources. An IAM…

  • Concept of Regional, Zonal resources in GCP

    Concept of Regional, Zonal resources in GCP

    Regions: Regions are independent geographic areas that consist of zones. Zones: A zone is a deployment area for Google…

  • Cloud Computing - key characterstics

    Cloud Computing - key characterstics

    5 fundamental attributes of Cloud Computing: On-demand: Customers get computing resources on-demand and self-service…

  • GCP Storage

    GCP Storage

    Google Cloud Platform (GCP) offers various storage options. The main storage options are : Google Cloud Storage, Google…

  • Learn Numpy, Pandas

    Learn Numpy, Pandas

    Numpy: https://github.com/shekhar270779/Learn_Numpy Pandas Series and DataFrame: https://github.

    1 条评论
  • Principal Component Analysis - PCA

    Principal Component Analysis - PCA

    Dimensionality reduction for visualization: Often we deal with a high dimensionality dataset, and there arises a need…

  • Slice and Dice

    Slice and Dice

    In data analysis, the term generally implies a systematic method of reducing a complete set of data into smaller parts…

  • Python Evironment

    Python Evironment

    A python environment allows to install libraries and dependencies of different versions in different environments. It…

  • pip vs venv vs conda

    pip vs venv vs conda

    Often there is a confusion as which command to use for new package installation , environment set up in (core) python ,…

社区洞察

其他会员也浏览了