Skip to content

mmartins000/decred-gov-data-analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Decred Governance Data Analysis

This project holds two scripts to extract and analyse data from Decred blockchain, along with Decred and Bitcoin USD prices.

Folders

Pre-requisites

  • To run dcr.sql:

    • A running version of dcrdata, Decred block explorer. Instructions to install dcrdata are available at dcrdata: running your own block explorer.
    • dcrdata depends on establishing a connection to a dcrd, Decred blockchain server. Instructions to install dcrd are available a Installing dcrd.
    • dcrd and dcrdata (and the underlying PostgreSQL) can be installed and executed from the same computer.
    • Start on step 1 of the next section
  • To run only dcr.r:

    • Clone this repository on your local computer
    • Unpack csv/psql_ticket-time-to-draw.csv.zip (Github won't allow the upload of files with more than 100 MB)
    • Skip to step 3 of the next section

Execution

  1. Read the previous section before continuing.

  2. To extract the data from the database: dcr.sql

  • Login to the dcrdata server (via SSH), and run dcr.sql as postgres user. The last lines of article Querying dcrdata show instructions on how to do it.
  1. To download the files to a local computer
  • Download the generated csv files (default location points to /tmp folder) to a local computer using scp or a FTP tool, for example.
  1. To execute the analysis on extracted data: dcr.r.
  • On the local computer, open R Console or R Studio.
  • Load or paste the contents of dcr.r.
  • Execute main() function from the command prompt on R Console.
  • The figures folder holds the files generated with the execution of dcr.r.

Additional information

About

This project holds two scripts to extract and analyse data from Decred blockchain, along with Decred and Bitcoin USD prices.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages