Git Product home page Git Product logo

blueskynet's Introduction

blueskynet

Lifecycle: experimental CRAN status

The purpose of blueskynet is to provide tools to generate and analyze networks from Bluesky Social

Installation

You can install the development version of blueskynet like so:

remotes::install_github("https://github.com/lassehjorthmadsen/blueskynet.git")

Getting started

First, create an app password here: https://bsky.app/settings/app-passwords.

Then, set environment variable BLUESKY_APP_PASS to your app password, and another variable, BLUESKY_APP_USER, to your identifier (e.g. “lassehjorthmadsen.bsky.social”) using file.edit("~/.Renviron")

Now, you can access the core function of blueskynet:

library(blueskynet)
library(dplyr)

# Authenticate yourself
password <- Sys.getenv("BLUESKY_APP_PASS")
identifier <- Sys.getenv("BLUESKY_APP_USER")
auth_object <- get_token(identifier, password)
token <- auth_object$accessJwt
refresh_tok <- auth_object$refreshJwt

# Establish a small net as a starting point
key_actor <- "natalieamiri.bsky.social"
keywords <- c("reporter", "journalist", "writer")
small_net <- init_net(key_actor, keywords, token)

First few rows of a starting point initial network:

small_net |> head(3)
#> # A tibble: 3 × 2
#>   actor_handle             follows_handle            
#>   <chr>                    <chr>                     
#> 1 natalieamiri.bsky.social dunjahayali.de            
#> 2 natalieamiri.bsky.social spiegelmagazin.bsky.social
#> 3 natalieamiri.bsky.social gildasahebi.bsky.social

Then you can expand the net, using expand_net() which we won’t run here, since it can take a lot of time to build a big network.

Example application

Have a look at a network of influential scientists on Bluesky Social, generated with blueskynet here.

blueskynet's People

Contributors

lassehjorthmadsen avatar

Watchers

 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.