Giter Club home page Giter Club logo

nerc-cip-2-json's Introduction

NERC-CIP Standards as JSON

Current Progress:

[x] CIP-002-5.1

[x] CIP-003-8

[x] CIP-004-6

[x] CIP-005-6

[x] CIP-006-6

[x] CIP-007-6

[x] CIP-008-5

[] CIP-008-6

[x] CIP-009-6

[x] CIP-010-3

[x] CIP-011-2

[x] CIP-013-1

Example of Structure

    {
        "Standard": "CIP-002-5.1",
        "Requirement": "R1",
        "Language": "Each Responsible Entity shall implement a process...",
        "Applicability": "All BCS"
    },
    {
        "Standard": "CIP-002-5.1",
        "Requirement": "R1.1",
        "Language": "Identify each of the high impact...",
        "Applicability": "High BCS only"
    }

Easy to Load Into MongoDB

Using PyMongo & Requests

r = requests.get("https://raw.githubusercontent.com/brettjouwstra/NERC-CIP-2-JSON/master/All_Standards.json")

for item in r.json():
    data = {'Standard': item['Standard'], 'Requirement': item['Requirement'], 
            'Language': item["Language"], 'Applicability': item['Applicability'] 
    
    client.insert_one(data)

Set a text index on the Database read here, allowing you to answer questions like, "Which standards have 'CIP Senior Manager' in them?"

# The Double Quotes wrapped by single quotes are to get exact phrase searching

for item in collection.find( { "$text": { "$search": '"CIP Senior Manager"' } } ): 
    print("Standard/Req:  {} - {} \n---Language: {}\n\n".format(item['Standard'], item['Requirement'], item['Language']  ))

The output then provides the standards that contain that exact phrase. I've removed all the text after "CIP Senior Manager" just for the example.

Standard/Req:  CIP-003-8 - R4
---Language: The Responsible Entity shall implement a documented process to delegate authority, unless no delegations are used. Where allowed by the CIP Standards, the CIP Senior Manager ...


Standard/Req:  CIP-003-8 - R3
---Language: Each Responsible Entity shall identify a CIP Senior Manager...


Standard/Req:  CIP-003-8 - R1
---Language: Each Responsible Entity shall review and obtain CIP Senior Manager...


Standard/Req:  CIP-013-1 - R3
---Language: Each Responsible Entity shall review and obtain CIP Senior Manager.... 


Standard/Req:  CIP-007-6 - R2.4
---Language: For each mitigation plan created or revised in Part 2.3, implement the plan within the timeframe specified in the plan, unless a revision to the plan or an extension to the timeframe specified in Part 2.3 is approved by the CIP Senior Manager...


Standard/Req:  CIP-002-5.1 - R2.2
---Language: Have its CIP Senior Manager...

nerc-cip-2-json's People

Contributors

brett-jpy avatar

Stargazers

David Maynor avatar

Watchers

James Cloos 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.