# NCR Course Module 1
## Class 2 Lesson Plan
## Data Retrieval and Analysis
[(Recording)](https://t.me/ResearchWG/129/4293)
>Register for the class [here](https://near.social/research-collective.near/widget/NCR.v1)
**Facilitator**: [Chloe](https://near.social/mob.near/widget/MyPage?accountId=chloe.near)
**Co-Facilitators**: [Nedlar](https://near.social/mob.near/widget/ProfilePage?accountId=15870c8972a9fe6cdb7dfc2df835740108e8674cc170a091cd0ece0b9e4f6cfa) & [BGem](https://near.social/mob.near/widget/ProfilePage?accountId=bheegem.nea)
**Guest Lecturer**: [Didier](https://near.social/mob.near/widget/ProfilePage?accountId=pironi.near) from Pikespeak.ai
**Date**: March 6th, 2024 (week 2)
**Time**: 10 AM AST | 2PM UTC
**Duration**: 1 hour
**Platform**: [NCR Thread on Telegram](https://t.me/ResearchWG/181)
**Target Audience**:
- Enthusiasts keen on enhancing blockchain data skills.
- Researchers in blockchain applications.
- Data analysts seeking blockchain insights.
- Computer science students and academics.
- NEAR community members seeking technical knowledge.
**Learning Objective**: To explore methods for blockchain data retrieval, specifically utilizing tools like nearblocks.io, pikespeak.ai, and [Near CLI](https://docs.near.org/tools/near-cli) calls to public RPC.
### Pre-Reading Material
- **PikesPeak Overview**: [What is Pikespeak?](https://learnnear.club/what-is-pikespeak/)
- **What are block explorers?**: [Crypto.com Article](https://crypto.com/university/what-are-block-explorers) - [LNC Article](https://learnnear.club/near-explorers/)
### Agenda
| Time | Topic | Activity | Resource |
|-----------|------------------------------|-------------------------------------------------------|------------------------------------------------------|
| 0-5 mins | Introduction | Briefing on course outline and objectives. | [ResearchWG on Telegram](https://t.me/ResearchWG/181)|
| 5-15 mins | Tools for Data Retrieval | Presentation on nearblocks.io. | [Nearblocks Github](https://github.com/Nearblocks/nearblocks)|
| 15-20 mins | Installing NEAR CLI | Quick tutorial on how to install NEAR CLI. | [NEAR CLI Installation Guide](https://docs.near.org/tools/near-cli/#installation) |
| 20-25 mins | Basic NEAR CLI Commands | Hands-on activity to run basic CLI commands for data retrieval. | [NEAR CLI Documentation](https://docs.near.org/tools/near-cli) |
| 25-45 mins| Guest Lecture by [Didier](https://near.social/mob.near/widget/ProfilePage?accountId=pironi.near) Pikespeak co-founder | Insightful session on how Pikespeak contributes to data retrieval. | Guest Presentation / Workshop |
| 45-55 mins| Q&A | Open floor for questions. | [Charter NFT](https://www.mintbase.xyz/meta/mjr.mintbase1.near%3A9c1027696a547e828acfe3e36e6e3c4b) |
| 50-55 mins| Summary and Next Steps | Summary of the session and introduction to next lesson.| [Next Class - 3: Data Transformation and Visualization](https://hackmd.io/@doulos819/ncr-03) |
### Activities Details
1. **Tools for Data Retrieval**
- Introduction to nearblocks.io, focusing on its capabilities and applications in the context of NEAR Protocol.
2. **CLI Calls to Public RPC**
- Hands-on session to guide participants through the process of making CLI calls to public RPC, illustrating how to retrieve and analyze data from the NEAR blockchain.
3. **Guest Lecture by [Didier](https://near.social/mob.near/widget/ProfilePage?accountId=pironi.near) (Pikespeak co-founder)**
- An in-depth discussion on how Pikespeak contributes to data retrieval on NEAR Protocol, showcasing specific use-cases and potential research applications.
4. **Installing NEAR CLI**
- A brief walkthrough on how to install NEAR CLI, covering prerequisites and the installation process.
```bash
# Installing NEAR CLI using npm (Node.js package manager)
npm install -g near-cli
```
```bash
# Checking the status of the NEAR blockchain
near state account_id
```
```bash
# Displays all access keys associated with a given account.
near keys account_id
```
```bash
#Makes a contract call that can only invoke a view method.
near view research-collective.sputnik-dao.near get_proposal '{"id": 172}'
```
```bash
# Queries the status of a transaction using its hash.
near tx-status 6fFVEGDL1b8rkS8iJZepQmn6CMyhopnEe2Mb5TbngQoV --accountId chloe.near
```
```bash
# Info for Validators
near validators current
```
```bash
near validators next
```
```bash
near proposals
```