kandi background
Explore Kits

scoreboard | CRG Derby Scoreboard

 by   rollerderby Java Version: v5.0-beta License: Non-SPDX

 by   rollerderby Java Version: v5.0-beta License: Non-SPDX

Download this library from

kandi X-RAY | scoreboard Summary

scoreboard is a Java library typically used in Internet of Things (IoT), Raspberry Pi applications. scoreboard has no bugs, it has no vulnerabilities and it has low support. However scoreboard build file is not available and it has a Non-SPDX License. You can download it from GitHub.
These are instructions for getting the software installed and running on a standalone computer to provide a functioning scoreboard. If you have already done this, see Quick Start Guide to Operating the Scoreboard below.
Support
Support
Quality
Quality
Security
Security
License
License
Reuse
Reuse

kandi-support Support

  • scoreboard has a low active ecosystem.
  • It has 83 star(s) with 33 fork(s). There are 31 watchers for this library.
  • There were 1 major release(s) in the last 12 months.
  • There are 6 open issues and 128 have been closed. On average issues are closed in 476 days. There are no pull requests.
  • It has a neutral sentiment in the developer community.
  • The latest version of scoreboard is v5.0-beta
scoreboard Support
Best in #Java
Average in #Java
scoreboard Support
Best in #Java
Average in #Java

quality kandi Quality

  • scoreboard has 0 bugs and 0 code smells.
scoreboard Quality
Best in #Java
Average in #Java
scoreboard Quality
Best in #Java
Average in #Java

securitySecurity

  • scoreboard has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
  • scoreboard code analysis shows 0 unresolved vulnerabilities.
  • There are 0 security hotspots that need review.
scoreboard Security
Best in #Java
Average in #Java
scoreboard Security
Best in #Java
Average in #Java

license License

  • scoreboard has a Non-SPDX License.
  • Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.
scoreboard License
Best in #Java
Average in #Java
scoreboard License
Best in #Java
Average in #Java

buildReuse

  • scoreboard releases are available to install and integrate.
  • scoreboard has no build file. You will be need to create the build yourself to build the component from source.
  • Installation instructions are available. Examples and code snippets are not available.
scoreboard Reuse
Best in #Java
Average in #Java
scoreboard Reuse
Best in #Java
Average in #Java
Top functions reviewed by kandi - BETA

kandi has reviewed scoreboard and discovered the below as its top functions. This is intended to give you an instant insight into scoreboard implemented functionality, and help decide if they suit your requirements.

  • Updates the string symbols used by this rule .
    • Write data to a JSON file .
      • Determines whether a condition value is on a condition .
        • Initialize setup .
          • Initialize the selector .
            • Initialize the base files
              • Gets the field matching the given role .
                • Upload file .
                  • Handles GET requests .
                    • Add one - jar bootstrap file .

                      Get all kandi verified functions for this library.

                      Get all kandi verified functions for this library.

                      scoreboard Key Features

                      CRG Derby Scoreboard

                      Convert nested dictionary, list, and dictionary into a pandas data frame in python

                      copy iconCopydownload iconDownload
                      import requests
                      import pandas as pd
                      
                      url = 'http://site.api.espn.com/apis/site/v2/sports/football/nfl/teams'
                      
                      jsonData = requests.get(url).json()
                      teams_json = jsonData['sports'][0]['leagues'][0]['teams']
                      
                      df = pd.json_normalize(teams_json)
                      
                      print(df.head().to_string())
                        team.id        team.uid           team.slug team.location  team.name team.nickname team.abbreviation    team.displayName team.shortDisplayName team.color team.alternateColor  team.isActive  team.isAllStar                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               team.logos                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          team.record.items                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            team.links
                      0      22  s:20~l:28~t:22   arizona-cardinals       Arizona  Cardinals     Cardinals               ARI   Arizona Cardinals             Cardinals     A40227              000000           True           False  [{'href': 'https://a.espncdn.com/i/teamlogos/nfl/500/ari.png', 'width': 500, 'height': 500, 'alt': '', 'rel': ['full', 'default'], 'lastUpdated': '2018-06-05T12:11Z'}, {'href': 'https://a.espncdn.com/i/teamlogos/nfl/500-dark/ari.png', 'width': 500, 'height': 500, 'alt': '', 'rel': ['full', 'dark'], 'lastUpdated': '2018-06-05T12:11Z'}, {'href': 'https://a.espncdn.com/i/teamlogos/nfl/500/scoreboard/ari.png', 'width': 500, 'height': 500, 'alt': '', 'rel': ['full', 'scoreboard'], 'lastUpdated': '2018-06-05T12:11Z'}, {'href': 'https://a.espncdn.com/i/teamlogos/nfl/500-dark/scoreboard/ari.png', 'width': 500, 'height': 500, 'alt': '', 'rel': ['full', 'scoreboard', 'dark'], 'lastUpdated': '2018-06-05T12:11Z'}]       [{'summary': '11-6', 'stats': [{'name': 'playoffSeed', 'value': 5.0}, {'name': 'wins', 'value': 11.0}, {'name': 'losses', 'value': 6.0}, {'name': 'winPercent', 'value': 0.6470588445663452}, {'name': 'gamesBehind', 'value': 0.0}, {'name': 'ties', 'value': 0.0}, {'name': 'OTWins', 'value': 0.0}, {'name': 'OTLosses', 'value': 0.0}, {'name': 'gamesPlayed', 'value': 17.0}, {'name': 'pointsFor', 'value': 449.0}, {'name': 'pointsAgainst', 'value': 366.0}, {'name': 'avgPointsFor', 'value': 26.41176414489746}, {'name': 'avgPointsAgainst', 'value': 21.52941131591797}, {'name': 'points', 'value': 2.5}, {'name': 'differential', 'value': 83.0}, {'name': 'streak', 'value': -1.0}, {'name': 'clincher', 'value': 0.0}, {'name': 'divisionWinPercent', 'value': 0.6666666865348816}, {'name': 'leagueWinPercent', 'value': 0.5833333134651184}, {'name': 'divisionRecord', 'value': 0.0}, {'name': 'divisionWins', 'value': 4.0}, {'name': 'divisionTies', 'value': 0.0}, {'name': 'divisionLosses', 'value': 2.0}]}]      [{'language': 'en-US', 'rel': ['clubhouse', 'desktop', 'team'], 'href': 'https://www.espn.com/nfl/team/_/name/ari/arizona-cardinals', 'text': 'Clubhouse', 'shortText': 'Clubhouse', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['roster', 'desktop', 'team'], 'href': 'http://www.espn.com/nfl/team/roster/_/name/ari/arizona-cardinals', 'text': 'Roster', 'shortText': 'Roster', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['stats', 'desktop', 'team'], 'href': 'http://www.espn.com/nfl/team/stats/_/name/ari/arizona-cardinals', 'text': 'Statistics', 'shortText': 'Statistics', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['schedule', 'desktop', 'team'], 'href': 'https://www.espn.com/nfl/team/schedule/_/name/ari', 'text': 'Schedule', 'shortText': 'Schedule', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['photos', 'desktop', 'team'], 'href': 'https://www.espn.com/nfl/team/photos/_/name/ari', 'text': 'photos', 'shortText': 'photos', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['scores', 'sportscenter', 'app', 'team'], 'href': 'sportscenter://x-callback-url/showClubhouse?uid=s:20~l:28~t:22&section=scores', 'text': 'Scores', 'shortText': 'Scores', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['draftpicks', 'desktop', 'team'], 'href': 'http://www.espn.com/nfl/draft/teams/_/name/ari/arizona-cardinals', 'text': 'Draft Picks', 'shortText': 'Draft Picks', 'isExternal': False, 'isPremium': True}, {'language': 'en-US', 'rel': ['transactions', 'desktop', 'team'], 'href': 'https://www.espn.com/nfl/team/transactions/_/name/ari', 'text': 'Transactions', 'shortText': 'Transactions', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['injuries', 'desktop', 'team'], 'href': 'https://www.espn.com/nfl/team/injuries/_/name/ari', 'text': 'Injuries', 'shortText': 'Injuries', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['depthchart', 'desktop', 'team'], 'href': 'https://www.espn.com/nfl/team/depth/_/name/ari', 'text': 'Depth Chart', 'shortText': 'Depth Chart', 'isExternal': False, 'isPremium': False}, {'language': 'en', 'rel': ['tickets', 'desktop', 'team'], 'href': 'https://www.vividseats.com/nfl-football/arizona-cardinals-tickets.html?wsUser=717', 'text': 'Tickets', 'isExternal': True, 'isPremium': False}]
                      1       1   s:20~l:28~t:1     atlanta-falcons       Atlanta    Falcons       Falcons               ATL     Atlanta Falcons               Falcons     000000              000000           True           False  [{'href': 'https://a.espncdn.com/i/teamlogos/nfl/500/atl.png', 'width': 500, 'height': 500, 'alt': '', 'rel': ['full', 'default'], 'lastUpdated': '2018-06-05T12:11Z'}, {'href': 'https://a.espncdn.com/i/teamlogos/nfl/500-dark/atl.png', 'width': 500, 'height': 500, 'alt': '', 'rel': ['full', 'dark'], 'lastUpdated': '2018-06-05T12:11Z'}, {'href': 'https://a.espncdn.com/i/teamlogos/nfl/500/scoreboard/atl.png', 'width': 500, 'height': 500, 'alt': '', 'rel': ['full', 'scoreboard'], 'lastUpdated': '2018-06-05T12:11Z'}, {'href': 'https://a.espncdn.com/i/teamlogos/nfl/500-dark/scoreboard/atl.png', 'width': 500, 'height': 500, 'alt': '', 'rel': ['full', 'scoreboard', 'dark'], 'lastUpdated': '2018-06-05T12:11Z'}]                [{'summary': '7-10', 'stats': [{'name': 'playoffSeed', 'value': 12.0}, {'name': 'wins', 'value': 7.0}, {'name': 'losses', 'value': 10.0}, {'name': 'winPercent', 'value': 0.4117647111415863}, {'name': 'gamesBehind', 'value': 0.0}, {'name': 'ties', 'value': 0.0}, {'name': 'OTWins', 'value': 0.0}, {'name': 'OTLosses', 'value': 0.0}, {'name': 'gamesPlayed', 'value': 17.0}, {'name': 'pointsFor', 'value': 313.0}, {'name': 'pointsAgainst', 'value': 459.0}, {'name': 'avgPointsFor', 'value': 18.41176414489746}, {'name': 'avgPointsAgainst', 'value': 27.0}, {'name': 'points', 'value': -1.5}, {'name': 'differential', 'value': -146.0}, {'name': 'streak', 'value': -2.0}, {'name': 'clincher', 'value': 0.0}, {'name': 'divisionWinPercent', 'value': 0.3333333432674408}, {'name': 'leagueWinPercent', 'value': 0.3333333432674408}, {'name': 'divisionRecord', 'value': 0.0}, {'name': 'divisionWins', 'value': 2.0}, {'name': 'divisionTies', 'value': 0.0}, {'name': 'divisionLosses', 'value': 4.0}]}]                 [{'language': 'en-US', 'rel': ['clubhouse', 'desktop', 'team'], 'href': 'https://www.espn.com/nfl/team/_/name/atl/atlanta-falcons', 'text': 'Clubhouse', 'shortText': 'Clubhouse', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['roster', 'desktop', 'team'], 'href': 'http://www.espn.com/nfl/team/roster/_/name/atl/atlanta-falcons', 'text': 'Roster', 'shortText': 'Roster', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['stats', 'desktop', 'team'], 'href': 'http://www.espn.com/nfl/team/stats/_/name/atl/atlanta-falcons', 'text': 'Statistics', 'shortText': 'Statistics', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['schedule', 'desktop', 'team'], 'href': 'https://www.espn.com/nfl/team/schedule/_/name/atl', 'text': 'Schedule', 'shortText': 'Schedule', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['photos', 'desktop', 'team'], 'href': 'https://www.espn.com/nfl/team/photos/_/name/atl', 'text': 'photos', 'shortText': 'photos', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['scores', 'sportscenter', 'app', 'team'], 'href': 'sportscenter://x-callback-url/showClubhouse?uid=s:20~l:28~t:1&section=scores', 'text': 'Scores', 'shortText': 'Scores', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['draftpicks', 'desktop', 'team'], 'href': 'http://www.espn.com/nfl/draft/teams/_/name/atl/atlanta-falcons', 'text': 'Draft Picks', 'shortText': 'Draft Picks', 'isExternal': False, 'isPremium': True}, {'language': 'en-US', 'rel': ['transactions', 'desktop', 'team'], 'href': 'https://www.espn.com/nfl/team/transactions/_/name/atl', 'text': 'Transactions', 'shortText': 'Transactions', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['injuries', 'desktop', 'team'], 'href': 'https://www.espn.com/nfl/team/injuries/_/name/atl', 'text': 'Injuries', 'shortText': 'Injuries', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['depthchart', 'desktop', 'team'], 'href': 'https://www.espn.com/nfl/team/depth/_/name/atl', 'text': 'Depth Chart', 'shortText': 'Depth Chart', 'isExternal': False, 'isPremium': False}, {'language': 'en', 'rel': ['tickets', 'desktop', 'team'], 'href': 'https://www.vividseats.com/nfl-football/atlanta-falcons-tickets.html?wsUser=717', 'text': 'Tickets', 'isExternal': True, 'isPremium': False}]
                      2       2   s:20~l:28~t:2       buffalo-bills       Buffalo      Bills         Bills               BUF       Buffalo Bills                 Bills     04407F              c60c30           True           False  [{'href': 'https://a.espncdn.com/i/teamlogos/nfl/500/buf.png', 'width': 500, 'height': 500, 'alt': '', 'rel': ['full', 'default'], 'lastUpdated': '2018-06-05T12:11Z'}, {'href': 'https://a.espncdn.com/i/teamlogos/nfl/500-dark/buf.png', 'width': 500, 'height': 500, 'alt': '', 'rel': ['full', 'dark'], 'lastUpdated': '2018-06-05T12:11Z'}, {'href': 'https://a.espncdn.com/i/teamlogos/nfl/500/scoreboard/buf.png', 'width': 500, 'height': 500, 'alt': '', 'rel': ['full', 'scoreboard'], 'lastUpdated': '2018-06-05T12:11Z'}, {'href': 'https://a.espncdn.com/i/teamlogos/nfl/500-dark/scoreboard/buf.png', 'width': 500, 'height': 500, 'alt': '', 'rel': ['full', 'scoreboard', 'dark'], 'lastUpdated': '2018-06-05T12:11Z'}]                    [{'summary': '11-6', 'stats': [{'name': 'playoffSeed', 'value': 3.0}, {'name': 'wins', 'value': 11.0}, {'name': 'losses', 'value': 6.0}, {'name': 'winPercent', 'value': 0.6470588445663452}, {'name': 'gamesBehind', 'value': 0.0}, {'name': 'ties', 'value': 0.0}, {'name': 'OTWins', 'value': 0.0}, {'name': 'OTLosses', 'value': 1.0}, {'name': 'gamesPlayed', 'value': 17.0}, {'name': 'pointsFor', 'value': 483.0}, {'name': 'pointsAgainst', 'value': 289.0}, {'name': 'avgPointsFor', 'value': 28.41176414489746}, {'name': 'avgPointsAgainst', 'value': 17.0}, {'name': 'points', 'value': 2.5}, {'name': 'differential', 'value': 194.0}, {'name': 'streak', 'value': 4.0}, {'name': 'clincher', 'value': 0.0}, {'name': 'divisionWinPercent', 'value': 0.8333333134651184}, {'name': 'leagueWinPercent', 'value': 0.5833333134651184}, {'name': 'divisionRecord', 'value': 0.0}, {'name': 'divisionWins', 'value': 5.0}, {'name': 'divisionTies', 'value': 0.0}, {'name': 'divisionLosses', 'value': 1.0}]}]                           [{'language': 'en-US', 'rel': ['clubhouse', 'desktop', 'team'], 'href': 'https://www.espn.com/nfl/team/_/name/buf/buffalo-bills', 'text': 'Clubhouse', 'shortText': 'Clubhouse', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['roster', 'desktop', 'team'], 'href': 'http://www.espn.com/nfl/team/roster/_/name/buf/buffalo-bills', 'text': 'Roster', 'shortText': 'Roster', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['stats', 'desktop', 'team'], 'href': 'http://www.espn.com/nfl/team/stats/_/name/buf/buffalo-bills', 'text': 'Statistics', 'shortText': 'Statistics', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['schedule', 'desktop', 'team'], 'href': 'https://www.espn.com/nfl/team/schedule/_/name/buf', 'text': 'Schedule', 'shortText': 'Schedule', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['photos', 'desktop', 'team'], 'href': 'https://www.espn.com/nfl/team/photos/_/name/buf', 'text': 'photos', 'shortText': 'photos', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['scores', 'sportscenter', 'app', 'team'], 'href': 'sportscenter://x-callback-url/showClubhouse?uid=s:20~l:28~t:2&section=scores', 'text': 'Scores', 'shortText': 'Scores', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['draftpicks', 'desktop', 'team'], 'href': 'http://www.espn.com/nfl/draft/teams/_/name/buf/buffalo-bills', 'text': 'Draft Picks', 'shortText': 'Draft Picks', 'isExternal': False, 'isPremium': True}, {'language': 'en-US', 'rel': ['transactions', 'desktop', 'team'], 'href': 'https://www.espn.com/nfl/team/transactions/_/name/buf', 'text': 'Transactions', 'shortText': 'Transactions', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['injuries', 'desktop', 'team'], 'href': 'https://www.espn.com/nfl/team/injuries/_/name/buf', 'text': 'Injuries', 'shortText': 'Injuries', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['depthchart', 'desktop', 'team'], 'href': 'https://www.espn.com/nfl/team/depth/_/name/buf', 'text': 'Depth Chart', 'shortText': 'Depth Chart', 'isExternal': False, 'isPremium': False}, {'language': 'en', 'rel': ['tickets', 'desktop', 'team'], 'href': 'https://www.vividseats.com/nfl-football/buffalo-bills-tickets.html?wsUser=717', 'text': 'Tickets', 'isExternal': True, 'isPremium': False}]
                      3       3   s:20~l:28~t:3       chicago-bears       Chicago      Bears         Bears               CHI       Chicago Bears                 Bears     152644              0b162a           True           False  [{'href': 'https://a.espncdn.com/i/teamlogos/nfl/500/chi.png', 'width': 500, 'height': 500, 'alt': '', 'rel': ['full', 'default'], 'lastUpdated': '2018-06-05T12:11Z'}, {'href': 'https://a.espncdn.com/i/teamlogos/nfl/500-dark/chi.png', 'width': 500, 'height': 500, 'alt': '', 'rel': ['full', 'dark'], 'lastUpdated': '2018-06-05T12:11Z'}, {'href': 'https://a.espncdn.com/i/teamlogos/nfl/500/scoreboard/chi.png', 'width': 500, 'height': 500, 'alt': '', 'rel': ['full', 'scoreboard'], 'lastUpdated': '2018-06-05T12:11Z'}, {'href': 'https://a.espncdn.com/i/teamlogos/nfl/500-dark/scoreboard/chi.png', 'width': 500, 'height': 500, 'alt': '', 'rel': ['full', 'scoreboard', 'dark'], 'lastUpdated': '2018-06-05T12:11Z'}]  [{'summary': '6-11', 'stats': [{'name': 'playoffSeed', 'value': 13.0}, {'name': 'wins', 'value': 6.0}, {'name': 'losses', 'value': 11.0}, {'name': 'winPercent', 'value': 0.3529411852359772}, {'name': 'gamesBehind', 'value': 0.0}, {'name': 'ties', 'value': 0.0}, {'name': 'OTWins', 'value': 0.0}, {'name': 'OTLosses', 'value': 0.0}, {'name': 'gamesPlayed', 'value': 17.0}, {'name': 'pointsFor', 'value': 311.0}, {'name': 'pointsAgainst', 'value': 407.0}, {'name': 'avgPointsFor', 'value': 18.294116973876953}, {'name': 'avgPointsAgainst', 'value': 23.941177368164062}, {'name': 'points', 'value': -2.5}, {'name': 'differential', 'value': -96.0}, {'name': 'streak', 'value': -1.0}, {'name': 'clincher', 'value': 0.0}, {'name': 'divisionWinPercent', 'value': 0.3333333432674408}, {'name': 'leagueWinPercent', 'value': 0.3333333432674408}, {'name': 'divisionRecord', 'value': 0.0}, {'name': 'divisionWins', 'value': 2.0}, {'name': 'divisionTies', 'value': 0.0}, {'name': 'divisionLosses', 'value': 4.0}]}]                           [{'language': 'en-US', 'rel': ['clubhouse', 'desktop', 'team'], 'href': 'https://www.espn.com/nfl/team/_/name/chi/chicago-bears', 'text': 'Clubhouse', 'shortText': 'Clubhouse', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['roster', 'desktop', 'team'], 'href': 'http://www.espn.com/nfl/team/roster/_/name/chi/chicago-bears', 'text': 'Roster', 'shortText': 'Roster', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['stats', 'desktop', 'team'], 'href': 'http://www.espn.com/nfl/team/stats/_/name/chi/chicago-bears', 'text': 'Statistics', 'shortText': 'Statistics', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['schedule', 'desktop', 'team'], 'href': 'https://www.espn.com/nfl/team/schedule/_/name/chi', 'text': 'Schedule', 'shortText': 'Schedule', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['photos', 'desktop', 'team'], 'href': 'https://www.espn.com/nfl/team/photos/_/name/chi', 'text': 'photos', 'shortText': 'photos', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['scores', 'sportscenter', 'app', 'team'], 'href': 'sportscenter://x-callback-url/showClubhouse?uid=s:20~l:28~t:3&section=scores', 'text': 'Scores', 'shortText': 'Scores', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['draftpicks', 'desktop', 'team'], 'href': 'http://www.espn.com/nfl/draft/teams/_/name/chi/chicago-bears', 'text': 'Draft Picks', 'shortText': 'Draft Picks', 'isExternal': False, 'isPremium': True}, {'language': 'en-US', 'rel': ['transactions', 'desktop', 'team'], 'href': 'https://www.espn.com/nfl/team/transactions/_/name/chi', 'text': 'Transactions', 'shortText': 'Transactions', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['injuries', 'desktop', 'team'], 'href': 'https://www.espn.com/nfl/team/injuries/_/name/chi', 'text': 'Injuries', 'shortText': 'Injuries', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['depthchart', 'desktop', 'team'], 'href': 'https://www.espn.com/nfl/team/depth/_/name/chi', 'text': 'Depth Chart', 'shortText': 'Depth Chart', 'isExternal': False, 'isPremium': False}, {'language': 'en', 'rel': ['tickets', 'desktop', 'team'], 'href': 'https://www.vividseats.com/nfl-football/chicago-bears-tickets.html?wsUser=717', 'text': 'Tickets', 'isExternal': True, 'isPremium': False}]
                      4       4   s:20~l:28~t:4  cincinnati-bengals    Cincinnati    Bengals       Bengals               CIN  Cincinnati Bengals               Bengals     FF2700              000000           True           False  [{'href': 'https://a.espncdn.com/i/teamlogos/nfl/500/cin.png', 'width': 500, 'height': 500, 'alt': '', 'rel': ['full', 'default'], 'lastUpdated': '2018-06-05T12:11Z'}, {'href': 'https://a.espncdn.com/i/teamlogos/nfl/500-dark/cin.png', 'width': 500, 'height': 500, 'alt': '', 'rel': ['full', 'dark'], 'lastUpdated': '2018-06-05T12:11Z'}, {'href': 'https://a.espncdn.com/i/teamlogos/nfl/500/scoreboard/cin.png', 'width': 500, 'height': 500, 'alt': '', 'rel': ['full', 'scoreboard'], 'lastUpdated': '2018-06-05T12:11Z'}, {'href': 'https://a.espncdn.com/i/teamlogos/nfl/500-dark/scoreboard/cin.png', 'width': 500, 'height': 500, 'alt': '', 'rel': ['full', 'scoreboard', 'dark'], 'lastUpdated': '2018-06-05T12:11Z'}]     [{'summary': '10-7', 'stats': [{'name': 'playoffSeed', 'value': 4.0}, {'name': 'wins', 'value': 10.0}, {'name': 'losses', 'value': 7.0}, {'name': 'winPercent', 'value': 0.5882353186607361}, {'name': 'gamesBehind', 'value': 0.0}, {'name': 'ties', 'value': 0.0}, {'name': 'OTWins', 'value': 1.0}, {'name': 'OTLosses', 'value': 2.0}, {'name': 'gamesPlayed', 'value': 17.0}, {'name': 'pointsFor', 'value': 460.0}, {'name': 'pointsAgainst', 'value': 376.0}, {'name': 'avgPointsFor', 'value': 27.058822631835938}, {'name': 'avgPointsAgainst', 'value': 22.117647171020508}, {'name': 'points', 'value': 1.5}, {'name': 'differential', 'value': 84.0}, {'name': 'streak', 'value': -1.0}, {'name': 'clincher', 'value': 0.0}, {'name': 'divisionWinPercent', 'value': 0.6666666865348816}, {'name': 'leagueWinPercent', 'value': 0.6666666865348816}, {'name': 'divisionRecord', 'value': 0.0}, {'name': 'divisionWins', 'value': 4.0}, {'name': 'divisionTies', 'value': 0.0}, {'name': 'divisionLosses', 'value': 2.0}]}]  [{'language': 'en-US', 'rel': ['clubhouse', 'desktop', 'team'], 'href': 'https://www.espn.com/nfl/team/_/name/cin/cincinnati-bengals', 'text': 'Clubhouse', 'shortText': 'Clubhouse', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['roster', 'desktop', 'team'], 'href': 'http://www.espn.com/nfl/team/roster/_/name/cin/cincinnati-bengals', 'text': 'Roster', 'shortText': 'Roster', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['stats', 'desktop', 'team'], 'href': 'http://www.espn.com/nfl/team/stats/_/name/cin/cincinnati-bengals', 'text': 'Statistics', 'shortText': 'Statistics', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['schedule', 'desktop', 'team'], 'href': 'https://www.espn.com/nfl/team/schedule/_/name/cin', 'text': 'Schedule', 'shortText': 'Schedule', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['photos', 'desktop', 'team'], 'href': 'https://www.espn.com/nfl/team/photos/_/name/cin', 'text': 'photos', 'shortText': 'photos', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['scores', 'sportscenter', 'app', 'team'], 'href': 'sportscenter://x-callback-url/showClubhouse?uid=s:20~l:28~t:4&section=scores', 'text': 'Scores', 'shortText': 'Scores', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['draftpicks', 'desktop', 'team'], 'href': 'http://www.espn.com/nfl/draft/teams/_/name/cin/cincinnati-bengals', 'text': 'Draft Picks', 'shortText': 'Draft Picks', 'isExternal': False, 'isPremium': True}, {'language': 'en-US', 'rel': ['transactions', 'desktop', 'team'], 'href': 'https://www.espn.com/nfl/team/transactions/_/name/cin', 'text': 'Transactions', 'shortText': 'Transactions', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['injuries', 'desktop', 'team'], 'href': 'https://www.espn.com/nfl/team/injuries/_/name/cin', 'text': 'Injuries', 'shortText': 'Injuries', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['depthchart', 'desktop', 'team'], 'href': 'https://www.espn.com/nfl/team/depth/_/name/cin', 'text': 'Depth Chart', 'shortText': 'Depth Chart', 'isExternal': False, 'isPremium': False}, {'language': 'en', 'rel': ['tickets', 'desktop', 'team'], 'href': 'https://www.vividseats.com/nfl-football/cincinnati-bengals-tickets.html?wsUser=717', 'text': 'Tickets', 'isExternal': True, 'isPremium': False}]
                      ...
                      
                      [25 rows x 16 columns]
                      
                      import requests
                      import pandas as pd
                      
                      url = 'http://site.api.espn.com/apis/site/v2/sports/football/nfl/teams'
                      
                      jsonData = requests.get(url).json()
                      teams_json = jsonData['sports'][0]['leagues'][0]['teams']
                      
                      df = pd.json_normalize(teams_json)
                      
                      print(df.head().to_string())
                        team.id        team.uid           team.slug team.location  team.name team.nickname team.abbreviation    team.displayName team.shortDisplayName team.color team.alternateColor  team.isActive  team.isAllStar                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               team.logos                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          team.record.items                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            team.links
                      0      22  s:20~l:28~t:22   arizona-cardinals       Arizona  Cardinals     Cardinals               ARI   Arizona Cardinals             Cardinals     A40227              000000           True           False  [{'href': 'https://a.espncdn.com/i/teamlogos/nfl/500/ari.png', 'width': 500, 'height': 500, 'alt': '', 'rel': ['full', 'default'], 'lastUpdated': '2018-06-05T12:11Z'}, {'href': 'https://a.espncdn.com/i/teamlogos/nfl/500-dark/ari.png', 'width': 500, 'height': 500, 'alt': '', 'rel': ['full', 'dark'], 'lastUpdated': '2018-06-05T12:11Z'}, {'href': 'https://a.espncdn.com/i/teamlogos/nfl/500/scoreboard/ari.png', 'width': 500, 'height': 500, 'alt': '', 'rel': ['full', 'scoreboard'], 'lastUpdated': '2018-06-05T12:11Z'}, {'href': 'https://a.espncdn.com/i/teamlogos/nfl/500-dark/scoreboard/ari.png', 'width': 500, 'height': 500, 'alt': '', 'rel': ['full', 'scoreboard', 'dark'], 'lastUpdated': '2018-06-05T12:11Z'}]       [{'summary': '11-6', 'stats': [{'name': 'playoffSeed', 'value': 5.0}, {'name': 'wins', 'value': 11.0}, {'name': 'losses', 'value': 6.0}, {'name': 'winPercent', 'value': 0.6470588445663452}, {'name': 'gamesBehind', 'value': 0.0}, {'name': 'ties', 'value': 0.0}, {'name': 'OTWins', 'value': 0.0}, {'name': 'OTLosses', 'value': 0.0}, {'name': 'gamesPlayed', 'value': 17.0}, {'name': 'pointsFor', 'value': 449.0}, {'name': 'pointsAgainst', 'value': 366.0}, {'name': 'avgPointsFor', 'value': 26.41176414489746}, {'name': 'avgPointsAgainst', 'value': 21.52941131591797}, {'name': 'points', 'value': 2.5}, {'name': 'differential', 'value': 83.0}, {'name': 'streak', 'value': -1.0}, {'name': 'clincher', 'value': 0.0}, {'name': 'divisionWinPercent', 'value': 0.6666666865348816}, {'name': 'leagueWinPercent', 'value': 0.5833333134651184}, {'name': 'divisionRecord', 'value': 0.0}, {'name': 'divisionWins', 'value': 4.0}, {'name': 'divisionTies', 'value': 0.0}, {'name': 'divisionLosses', 'value': 2.0}]}]      [{'language': 'en-US', 'rel': ['clubhouse', 'desktop', 'team'], 'href': 'https://www.espn.com/nfl/team/_/name/ari/arizona-cardinals', 'text': 'Clubhouse', 'shortText': 'Clubhouse', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['roster', 'desktop', 'team'], 'href': 'http://www.espn.com/nfl/team/roster/_/name/ari/arizona-cardinals', 'text': 'Roster', 'shortText': 'Roster', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['stats', 'desktop', 'team'], 'href': 'http://www.espn.com/nfl/team/stats/_/name/ari/arizona-cardinals', 'text': 'Statistics', 'shortText': 'Statistics', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['schedule', 'desktop', 'team'], 'href': 'https://www.espn.com/nfl/team/schedule/_/name/ari', 'text': 'Schedule', 'shortText': 'Schedule', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['photos', 'desktop', 'team'], 'href': 'https://www.espn.com/nfl/team/photos/_/name/ari', 'text': 'photos', 'shortText': 'photos', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['scores', 'sportscenter', 'app', 'team'], 'href': 'sportscenter://x-callback-url/showClubhouse?uid=s:20~l:28~t:22&section=scores', 'text': 'Scores', 'shortText': 'Scores', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['draftpicks', 'desktop', 'team'], 'href': 'http://www.espn.com/nfl/draft/teams/_/name/ari/arizona-cardinals', 'text': 'Draft Picks', 'shortText': 'Draft Picks', 'isExternal': False, 'isPremium': True}, {'language': 'en-US', 'rel': ['transactions', 'desktop', 'team'], 'href': 'https://www.espn.com/nfl/team/transactions/_/name/ari', 'text': 'Transactions', 'shortText': 'Transactions', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['injuries', 'desktop', 'team'], 'href': 'https://www.espn.com/nfl/team/injuries/_/name/ari', 'text': 'Injuries', 'shortText': 'Injuries', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['depthchart', 'desktop', 'team'], 'href': 'https://www.espn.com/nfl/team/depth/_/name/ari', 'text': 'Depth Chart', 'shortText': 'Depth Chart', 'isExternal': False, 'isPremium': False}, {'language': 'en', 'rel': ['tickets', 'desktop', 'team'], 'href': 'https://www.vividseats.com/nfl-football/arizona-cardinals-tickets.html?wsUser=717', 'text': 'Tickets', 'isExternal': True, 'isPremium': False}]
                      1       1   s:20~l:28~t:1     atlanta-falcons       Atlanta    Falcons       Falcons               ATL     Atlanta Falcons               Falcons     000000              000000           True           False  [{'href': 'https://a.espncdn.com/i/teamlogos/nfl/500/atl.png', 'width': 500, 'height': 500, 'alt': '', 'rel': ['full', 'default'], 'lastUpdated': '2018-06-05T12:11Z'}, {'href': 'https://a.espncdn.com/i/teamlogos/nfl/500-dark/atl.png', 'width': 500, 'height': 500, 'alt': '', 'rel': ['full', 'dark'], 'lastUpdated': '2018-06-05T12:11Z'}, {'href': 'https://a.espncdn.com/i/teamlogos/nfl/500/scoreboard/atl.png', 'width': 500, 'height': 500, 'alt': '', 'rel': ['full', 'scoreboard'], 'lastUpdated': '2018-06-05T12:11Z'}, {'href': 'https://a.espncdn.com/i/teamlogos/nfl/500-dark/scoreboard/atl.png', 'width': 500, 'height': 500, 'alt': '', 'rel': ['full', 'scoreboard', 'dark'], 'lastUpdated': '2018-06-05T12:11Z'}]                [{'summary': '7-10', 'stats': [{'name': 'playoffSeed', 'value': 12.0}, {'name': 'wins', 'value': 7.0}, {'name': 'losses', 'value': 10.0}, {'name': 'winPercent', 'value': 0.4117647111415863}, {'name': 'gamesBehind', 'value': 0.0}, {'name': 'ties', 'value': 0.0}, {'name': 'OTWins', 'value': 0.0}, {'name': 'OTLosses', 'value': 0.0}, {'name': 'gamesPlayed', 'value': 17.0}, {'name': 'pointsFor', 'value': 313.0}, {'name': 'pointsAgainst', 'value': 459.0}, {'name': 'avgPointsFor', 'value': 18.41176414489746}, {'name': 'avgPointsAgainst', 'value': 27.0}, {'name': 'points', 'value': -1.5}, {'name': 'differential', 'value': -146.0}, {'name': 'streak', 'value': -2.0}, {'name': 'clincher', 'value': 0.0}, {'name': 'divisionWinPercent', 'value': 0.3333333432674408}, {'name': 'leagueWinPercent', 'value': 0.3333333432674408}, {'name': 'divisionRecord', 'value': 0.0}, {'name': 'divisionWins', 'value': 2.0}, {'name': 'divisionTies', 'value': 0.0}, {'name': 'divisionLosses', 'value': 4.0}]}]                 [{'language': 'en-US', 'rel': ['clubhouse', 'desktop', 'team'], 'href': 'https://www.espn.com/nfl/team/_/name/atl/atlanta-falcons', 'text': 'Clubhouse', 'shortText': 'Clubhouse', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['roster', 'desktop', 'team'], 'href': 'http://www.espn.com/nfl/team/roster/_/name/atl/atlanta-falcons', 'text': 'Roster', 'shortText': 'Roster', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['stats', 'desktop', 'team'], 'href': 'http://www.espn.com/nfl/team/stats/_/name/atl/atlanta-falcons', 'text': 'Statistics', 'shortText': 'Statistics', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['schedule', 'desktop', 'team'], 'href': 'https://www.espn.com/nfl/team/schedule/_/name/atl', 'text': 'Schedule', 'shortText': 'Schedule', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['photos', 'desktop', 'team'], 'href': 'https://www.espn.com/nfl/team/photos/_/name/atl', 'text': 'photos', 'shortText': 'photos', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['scores', 'sportscenter', 'app', 'team'], 'href': 'sportscenter://x-callback-url/showClubhouse?uid=s:20~l:28~t:1&section=scores', 'text': 'Scores', 'shortText': 'Scores', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['draftpicks', 'desktop', 'team'], 'href': 'http://www.espn.com/nfl/draft/teams/_/name/atl/atlanta-falcons', 'text': 'Draft Picks', 'shortText': 'Draft Picks', 'isExternal': False, 'isPremium': True}, {'language': 'en-US', 'rel': ['transactions', 'desktop', 'team'], 'href': 'https://www.espn.com/nfl/team/transactions/_/name/atl', 'text': 'Transactions', 'shortText': 'Transactions', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['injuries', 'desktop', 'team'], 'href': 'https://www.espn.com/nfl/team/injuries/_/name/atl', 'text': 'Injuries', 'shortText': 'Injuries', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['depthchart', 'desktop', 'team'], 'href': 'https://www.espn.com/nfl/team/depth/_/name/atl', 'text': 'Depth Chart', 'shortText': 'Depth Chart', 'isExternal': False, 'isPremium': False}, {'language': 'en', 'rel': ['tickets', 'desktop', 'team'], 'href': 'https://www.vividseats.com/nfl-football/atlanta-falcons-tickets.html?wsUser=717', 'text': 'Tickets', 'isExternal': True, 'isPremium': False}]
                      2       2   s:20~l:28~t:2       buffalo-bills       Buffalo      Bills         Bills               BUF       Buffalo Bills                 Bills     04407F              c60c30           True           False  [{'href': 'https://a.espncdn.com/i/teamlogos/nfl/500/buf.png', 'width': 500, 'height': 500, 'alt': '', 'rel': ['full', 'default'], 'lastUpdated': '2018-06-05T12:11Z'}, {'href': 'https://a.espncdn.com/i/teamlogos/nfl/500-dark/buf.png', 'width': 500, 'height': 500, 'alt': '', 'rel': ['full', 'dark'], 'lastUpdated': '2018-06-05T12:11Z'}, {'href': 'https://a.espncdn.com/i/teamlogos/nfl/500/scoreboard/buf.png', 'width': 500, 'height': 500, 'alt': '', 'rel': ['full', 'scoreboard'], 'lastUpdated': '2018-06-05T12:11Z'}, {'href': 'https://a.espncdn.com/i/teamlogos/nfl/500-dark/scoreboard/buf.png', 'width': 500, 'height': 500, 'alt': '', 'rel': ['full', 'scoreboard', 'dark'], 'lastUpdated': '2018-06-05T12:11Z'}]                    [{'summary': '11-6', 'stats': [{'name': 'playoffSeed', 'value': 3.0}, {'name': 'wins', 'value': 11.0}, {'name': 'losses', 'value': 6.0}, {'name': 'winPercent', 'value': 0.6470588445663452}, {'name': 'gamesBehind', 'value': 0.0}, {'name': 'ties', 'value': 0.0}, {'name': 'OTWins', 'value': 0.0}, {'name': 'OTLosses', 'value': 1.0}, {'name': 'gamesPlayed', 'value': 17.0}, {'name': 'pointsFor', 'value': 483.0}, {'name': 'pointsAgainst', 'value': 289.0}, {'name': 'avgPointsFor', 'value': 28.41176414489746}, {'name': 'avgPointsAgainst', 'value': 17.0}, {'name': 'points', 'value': 2.5}, {'name': 'differential', 'value': 194.0}, {'name': 'streak', 'value': 4.0}, {'name': 'clincher', 'value': 0.0}, {'name': 'divisionWinPercent', 'value': 0.8333333134651184}, {'name': 'leagueWinPercent', 'value': 0.5833333134651184}, {'name': 'divisionRecord', 'value': 0.0}, {'name': 'divisionWins', 'value': 5.0}, {'name': 'divisionTies', 'value': 0.0}, {'name': 'divisionLosses', 'value': 1.0}]}]                           [{'language': 'en-US', 'rel': ['clubhouse', 'desktop', 'team'], 'href': 'https://www.espn.com/nfl/team/_/name/buf/buffalo-bills', 'text': 'Clubhouse', 'shortText': 'Clubhouse', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['roster', 'desktop', 'team'], 'href': 'http://www.espn.com/nfl/team/roster/_/name/buf/buffalo-bills', 'text': 'Roster', 'shortText': 'Roster', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['stats', 'desktop', 'team'], 'href': 'http://www.espn.com/nfl/team/stats/_/name/buf/buffalo-bills', 'text': 'Statistics', 'shortText': 'Statistics', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['schedule', 'desktop', 'team'], 'href': 'https://www.espn.com/nfl/team/schedule/_/name/buf', 'text': 'Schedule', 'shortText': 'Schedule', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['photos', 'desktop', 'team'], 'href': 'https://www.espn.com/nfl/team/photos/_/name/buf', 'text': 'photos', 'shortText': 'photos', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['scores', 'sportscenter', 'app', 'team'], 'href': 'sportscenter://x-callback-url/showClubhouse?uid=s:20~l:28~t:2&section=scores', 'text': 'Scores', 'shortText': 'Scores', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['draftpicks', 'desktop', 'team'], 'href': 'http://www.espn.com/nfl/draft/teams/_/name/buf/buffalo-bills', 'text': 'Draft Picks', 'shortText': 'Draft Picks', 'isExternal': False, 'isPremium': True}, {'language': 'en-US', 'rel': ['transactions', 'desktop', 'team'], 'href': 'https://www.espn.com/nfl/team/transactions/_/name/buf', 'text': 'Transactions', 'shortText': 'Transactions', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['injuries', 'desktop', 'team'], 'href': 'https://www.espn.com/nfl/team/injuries/_/name/buf', 'text': 'Injuries', 'shortText': 'Injuries', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['depthchart', 'desktop', 'team'], 'href': 'https://www.espn.com/nfl/team/depth/_/name/buf', 'text': 'Depth Chart', 'shortText': 'Depth Chart', 'isExternal': False, 'isPremium': False}, {'language': 'en', 'rel': ['tickets', 'desktop', 'team'], 'href': 'https://www.vividseats.com/nfl-football/buffalo-bills-tickets.html?wsUser=717', 'text': 'Tickets', 'isExternal': True, 'isPremium': False}]
                      3       3   s:20~l:28~t:3       chicago-bears       Chicago      Bears         Bears               CHI       Chicago Bears                 Bears     152644              0b162a           True           False  [{'href': 'https://a.espncdn.com/i/teamlogos/nfl/500/chi.png', 'width': 500, 'height': 500, 'alt': '', 'rel': ['full', 'default'], 'lastUpdated': '2018-06-05T12:11Z'}, {'href': 'https://a.espncdn.com/i/teamlogos/nfl/500-dark/chi.png', 'width': 500, 'height': 500, 'alt': '', 'rel': ['full', 'dark'], 'lastUpdated': '2018-06-05T12:11Z'}, {'href': 'https://a.espncdn.com/i/teamlogos/nfl/500/scoreboard/chi.png', 'width': 500, 'height': 500, 'alt': '', 'rel': ['full', 'scoreboard'], 'lastUpdated': '2018-06-05T12:11Z'}, {'href': 'https://a.espncdn.com/i/teamlogos/nfl/500-dark/scoreboard/chi.png', 'width': 500, 'height': 500, 'alt': '', 'rel': ['full', 'scoreboard', 'dark'], 'lastUpdated': '2018-06-05T12:11Z'}]  [{'summary': '6-11', 'stats': [{'name': 'playoffSeed', 'value': 13.0}, {'name': 'wins', 'value': 6.0}, {'name': 'losses', 'value': 11.0}, {'name': 'winPercent', 'value': 0.3529411852359772}, {'name': 'gamesBehind', 'value': 0.0}, {'name': 'ties', 'value': 0.0}, {'name': 'OTWins', 'value': 0.0}, {'name': 'OTLosses', 'value': 0.0}, {'name': 'gamesPlayed', 'value': 17.0}, {'name': 'pointsFor', 'value': 311.0}, {'name': 'pointsAgainst', 'value': 407.0}, {'name': 'avgPointsFor', 'value': 18.294116973876953}, {'name': 'avgPointsAgainst', 'value': 23.941177368164062}, {'name': 'points', 'value': -2.5}, {'name': 'differential', 'value': -96.0}, {'name': 'streak', 'value': -1.0}, {'name': 'clincher', 'value': 0.0}, {'name': 'divisionWinPercent', 'value': 0.3333333432674408}, {'name': 'leagueWinPercent', 'value': 0.3333333432674408}, {'name': 'divisionRecord', 'value': 0.0}, {'name': 'divisionWins', 'value': 2.0}, {'name': 'divisionTies', 'value': 0.0}, {'name': 'divisionLosses', 'value': 4.0}]}]                           [{'language': 'en-US', 'rel': ['clubhouse', 'desktop', 'team'], 'href': 'https://www.espn.com/nfl/team/_/name/chi/chicago-bears', 'text': 'Clubhouse', 'shortText': 'Clubhouse', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['roster', 'desktop', 'team'], 'href': 'http://www.espn.com/nfl/team/roster/_/name/chi/chicago-bears', 'text': 'Roster', 'shortText': 'Roster', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['stats', 'desktop', 'team'], 'href': 'http://www.espn.com/nfl/team/stats/_/name/chi/chicago-bears', 'text': 'Statistics', 'shortText': 'Statistics', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['schedule', 'desktop', 'team'], 'href': 'https://www.espn.com/nfl/team/schedule/_/name/chi', 'text': 'Schedule', 'shortText': 'Schedule', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['photos', 'desktop', 'team'], 'href': 'https://www.espn.com/nfl/team/photos/_/name/chi', 'text': 'photos', 'shortText': 'photos', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['scores', 'sportscenter', 'app', 'team'], 'href': 'sportscenter://x-callback-url/showClubhouse?uid=s:20~l:28~t:3&section=scores', 'text': 'Scores', 'shortText': 'Scores', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['draftpicks', 'desktop', 'team'], 'href': 'http://www.espn.com/nfl/draft/teams/_/name/chi/chicago-bears', 'text': 'Draft Picks', 'shortText': 'Draft Picks', 'isExternal': False, 'isPremium': True}, {'language': 'en-US', 'rel': ['transactions', 'desktop', 'team'], 'href': 'https://www.espn.com/nfl/team/transactions/_/name/chi', 'text': 'Transactions', 'shortText': 'Transactions', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['injuries', 'desktop', 'team'], 'href': 'https://www.espn.com/nfl/team/injuries/_/name/chi', 'text': 'Injuries', 'shortText': 'Injuries', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['depthchart', 'desktop', 'team'], 'href': 'https://www.espn.com/nfl/team/depth/_/name/chi', 'text': 'Depth Chart', 'shortText': 'Depth Chart', 'isExternal': False, 'isPremium': False}, {'language': 'en', 'rel': ['tickets', 'desktop', 'team'], 'href': 'https://www.vividseats.com/nfl-football/chicago-bears-tickets.html?wsUser=717', 'text': 'Tickets', 'isExternal': True, 'isPremium': False}]
                      4       4   s:20~l:28~t:4  cincinnati-bengals    Cincinnati    Bengals       Bengals               CIN  Cincinnati Bengals               Bengals     FF2700              000000           True           False  [{'href': 'https://a.espncdn.com/i/teamlogos/nfl/500/cin.png', 'width': 500, 'height': 500, 'alt': '', 'rel': ['full', 'default'], 'lastUpdated': '2018-06-05T12:11Z'}, {'href': 'https://a.espncdn.com/i/teamlogos/nfl/500-dark/cin.png', 'width': 500, 'height': 500, 'alt': '', 'rel': ['full', 'dark'], 'lastUpdated': '2018-06-05T12:11Z'}, {'href': 'https://a.espncdn.com/i/teamlogos/nfl/500/scoreboard/cin.png', 'width': 500, 'height': 500, 'alt': '', 'rel': ['full', 'scoreboard'], 'lastUpdated': '2018-06-05T12:11Z'}, {'href': 'https://a.espncdn.com/i/teamlogos/nfl/500-dark/scoreboard/cin.png', 'width': 500, 'height': 500, 'alt': '', 'rel': ['full', 'scoreboard', 'dark'], 'lastUpdated': '2018-06-05T12:11Z'}]     [{'summary': '10-7', 'stats': [{'name': 'playoffSeed', 'value': 4.0}, {'name': 'wins', 'value': 10.0}, {'name': 'losses', 'value': 7.0}, {'name': 'winPercent', 'value': 0.5882353186607361}, {'name': 'gamesBehind', 'value': 0.0}, {'name': 'ties', 'value': 0.0}, {'name': 'OTWins', 'value': 1.0}, {'name': 'OTLosses', 'value': 2.0}, {'name': 'gamesPlayed', 'value': 17.0}, {'name': 'pointsFor', 'value': 460.0}, {'name': 'pointsAgainst', 'value': 376.0}, {'name': 'avgPointsFor', 'value': 27.058822631835938}, {'name': 'avgPointsAgainst', 'value': 22.117647171020508}, {'name': 'points', 'value': 1.5}, {'name': 'differential', 'value': 84.0}, {'name': 'streak', 'value': -1.0}, {'name': 'clincher', 'value': 0.0}, {'name': 'divisionWinPercent', 'value': 0.6666666865348816}, {'name': 'leagueWinPercent', 'value': 0.6666666865348816}, {'name': 'divisionRecord', 'value': 0.0}, {'name': 'divisionWins', 'value': 4.0}, {'name': 'divisionTies', 'value': 0.0}, {'name': 'divisionLosses', 'value': 2.0}]}]  [{'language': 'en-US', 'rel': ['clubhouse', 'desktop', 'team'], 'href': 'https://www.espn.com/nfl/team/_/name/cin/cincinnati-bengals', 'text': 'Clubhouse', 'shortText': 'Clubhouse', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['roster', 'desktop', 'team'], 'href': 'http://www.espn.com/nfl/team/roster/_/name/cin/cincinnati-bengals', 'text': 'Roster', 'shortText': 'Roster', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['stats', 'desktop', 'team'], 'href': 'http://www.espn.com/nfl/team/stats/_/name/cin/cincinnati-bengals', 'text': 'Statistics', 'shortText': 'Statistics', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['schedule', 'desktop', 'team'], 'href': 'https://www.espn.com/nfl/team/schedule/_/name/cin', 'text': 'Schedule', 'shortText': 'Schedule', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['photos', 'desktop', 'team'], 'href': 'https://www.espn.com/nfl/team/photos/_/name/cin', 'text': 'photos', 'shortText': 'photos', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['scores', 'sportscenter', 'app', 'team'], 'href': 'sportscenter://x-callback-url/showClubhouse?uid=s:20~l:28~t:4&section=scores', 'text': 'Scores', 'shortText': 'Scores', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['draftpicks', 'desktop', 'team'], 'href': 'http://www.espn.com/nfl/draft/teams/_/name/cin/cincinnati-bengals', 'text': 'Draft Picks', 'shortText': 'Draft Picks', 'isExternal': False, 'isPremium': True}, {'language': 'en-US', 'rel': ['transactions', 'desktop', 'team'], 'href': 'https://www.espn.com/nfl/team/transactions/_/name/cin', 'text': 'Transactions', 'shortText': 'Transactions', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['injuries', 'desktop', 'team'], 'href': 'https://www.espn.com/nfl/team/injuries/_/name/cin', 'text': 'Injuries', 'shortText': 'Injuries', 'isExternal': False, 'isPremium': False}, {'language': 'en-US', 'rel': ['depthchart', 'desktop', 'team'], 'href': 'https://www.espn.com/nfl/team/depth/_/name/cin', 'text': 'Depth Chart', 'shortText': 'Depth Chart', 'isExternal': False, 'isPremium': False}, {'language': 'en', 'rel': ['tickets', 'desktop', 'team'], 'href': 'https://www.vividseats.com/nfl-football/cincinnati-bengals-tickets.html?wsUser=717', 'text': 'Tickets', 'isExternal': True, 'isPremium': False}]
                      ...
                      
                      [25 rows x 16 columns]
                      

                      How do I find record above and below based on rank

                      copy iconCopydownload iconDownload
                      with u as
                      (select *, rank() over(order by rating desc) as r from scoreboard),
                      v as 
                      (select r from u where name ='Zeprus')
                      (select r, name, rating from u where abs(r - (select r from v)) <= 2 order by r)
                      

                      C# and Unity, keep original index in relation to sorted array of integers

                      copy iconCopydownload iconDownload
                          int[] scoresTemp1 = new int[] { 50, 100, 100, 150, 200, 25 };
                          //copy of original array but sorted in decending order
                          int[] scoresTemp2 = new int[] { 200, 150, 100, 100, 50, 25 };
                      
                          int[] indexSorted = new int[6];
                      
                          //populate array elements with -1 so if something goes wrong -1 will be an indicator
                          for (int x = 0; x < indexSorted.Length; x++)
                          {
                              indexSorted[x] = -1;
                          }
                      
                          //get index of the scoresTemp array for pairing id's to match scores
                      
                          for (int i = 0; i < scoresTemp2.Length; i++)
                          {
                              for (int j = 0; j < scoresTemp1.Length; j++)
                              {
                                  Console.WriteLine($"\n\ni:{i} - j:{j} - indexSorted[j]: {indexSorted[j]}");
                                  if (i != indexSorted[j])
                                  {
                                      Console.WriteLine($"{i} != {indexSorted[j]}");
                                      Console.WriteLine($"scoresTemp2[{i}]={scoresTemp2[i]} - scoresTemp1[{j}]={scoresTemp1[j]}");
                                      if (scoresTemp2[i] == scoresTemp1[j])
                                      {
                                          Console.WriteLine($"{scoresTemp2[i]} == {scoresTemp1[j]} => indexSorted[{j}] = {i}");
                                          indexSorted[i] = j;
                                          break;
                                      }
                                  }
                              }
                          }
                      
                        
                          foreach (int index in indexSorted)
                          {
                              Console.WriteLine(index);
                          }
                       }
                      
                      i:0 - j:0 - indexSorted[j]: -1
                      0 != -1
                      scoresTemp2[0]=200 - scoresTemp1[0]=50
                      
                      
                      i:0 - j:1 - indexSorted[j]: -1
                      0 != -1
                      scoresTemp2[0]=200 - scoresTemp1[1]=100
                      
                      
                      i:0 - j:2 - indexSorted[j]: -1
                      0 != -1
                      scoresTemp2[0]=200 - scoresTemp1[2]=100
                      
                      
                      i:0 - j:3 - indexSorted[j]: -1
                      0 != -1
                      scoresTemp2[0]=200 - scoresTemp1[3]=150
                      
                      
                      i:0 - j:4 - indexSorted[j]: -1
                      0 != -1
                      scoresTemp2[0]=200 - scoresTemp1[4]=200
                      200 == 200 => indexSorted[4] = 0
                      
                      
                      i:1 - j:0 - indexSorted[j]: 4
                      1 != 4
                      scoresTemp2[1]=150 - scoresTemp1[0]=50
                      
                      
                      i:1 - j:1 - indexSorted[j]: -1
                      1 != -1
                      scoresTemp2[1]=150 - scoresTemp1[1]=100
                      
                      
                      i:1 - j:2 - indexSorted[j]: -1
                      1 != -1
                      scoresTemp2[1]=150 - scoresTemp1[2]=100
                      
                      
                      i:1 - j:3 - indexSorted[j]: -1
                      1 != -1
                      scoresTemp2[1]=150 - scoresTemp1[3]=150
                      150 == 150 => indexSorted[3] = 1
                      
                      
                      i:2 - j:0 - indexSorted[j]: 4
                      2 != 4
                      scoresTemp2[2]=100 - scoresTemp1[0]=50
                      
                      
                      i:2 - j:1 - indexSorted[j]: 3
                      2 != 3
                      scoresTemp2[2]=100 - scoresTemp1[1]=100
                      100 == 100 => indexSorted[1] = 2
                      
                      
                      i:3 - j:0 - indexSorted[j]: 4
                      3 != 4
                      scoresTemp2[3]=100 - scoresTemp1[0]=50
                      
                      
                      i:3 - j:1 - indexSorted[j]: 3
                      
                      
                      i:3 - j:2 - indexSorted[j]: 1
                      3 != 1
                      scoresTemp2[3]=100 - scoresTemp1[2]=100
                      100 == 100 => indexSorted[2] = 3
                      
                      
                      i:4 - j:0 - indexSorted[j]: 4
                      
                      
                      i:4 - j:1 - indexSorted[j]: 3
                      4 != 3
                      scoresTemp2[4]=50 - scoresTemp1[1]=100
                      
                      
                      i:4 - j:2 - indexSorted[j]: 1
                      4 != 1
                      scoresTemp2[4]=50 - scoresTemp1[2]=100
                      
                      
                      i:4 - j:3 - indexSorted[j]: 2
                      4 != 2
                      scoresTemp2[4]=50 - scoresTemp1[3]=150
                      
                      
                      i:4 - j:4 - indexSorted[j]: -1
                      4 != -1
                      scoresTemp2[4]=50 - scoresTemp1[4]=200
                      
                      
                      i:4 - j:5 - indexSorted[j]: -1
                      4 != -1
                      scoresTemp2[4]=50 - scoresTemp1[5]=25
                      
                      
                      i:5 - j:0 - indexSorted[j]: 4
                      5 != 4
                      scoresTemp2[5]=25 - scoresTemp1[0]=50
                      
                      
                      i:5 - j:1 - indexSorted[j]: 3
                      5 != 3
                      scoresTemp2[5]=25 - scoresTemp1[1]=100
                      
                      
                      i:5 - j:2 - indexSorted[j]: 1
                      5 != 1
                      scoresTemp2[5]=25 - scoresTemp1[2]=100
                      
                      
                      i:5 - j:3 - indexSorted[j]: 2
                      5 != 2
                      scoresTemp2[5]=25 - scoresTemp1[3]=150
                      
                      
                      i:5 - j:4 - indexSorted[j]: -1
                      5 != -1
                      scoresTemp2[5]=25 - scoresTemp1[4]=200
                      
                      
                      i:5 - j:5 - indexSorted[j]: -1
                      5 != -1
                      scoresTemp2[5]=25 - scoresTemp1[5]=25
                      25 == 25 => indexSorted[5] = 5
                      
                      4
                      3
                      1
                      2
                      -1
                      5
                      
                          int[] scoresTemp1 = new int[] { 50, 100, 100, 150, 200, 25 };
                          //copy of original array but sorted in decending order
                          int[] scoresTemp2 = new int[] { 200, 150, 100, 100, 50, 25 };
                      
                          int[] indexSorted = new int[6];
                      
                          //populate array elements with -1 so if something goes wrong -1 will be an indicator
                          for (int x = 0; x < indexSorted.Length; x++)
                          {
                              indexSorted[x] = -1;
                          }
                      
                          //get index of the scoresTemp array for pairing id's to match scores
                      
                          for (int i = 0; i < scoresTemp2.Length; i++)
                          {
                              for (int j = 0; j < scoresTemp1.Length; j++)
                              {
                                  Console.WriteLine($"\n\ni:{i} - j:{j} - indexSorted[j]: {indexSorted[j]}");
                                  if (i != indexSorted[j])
                                  {
                                      Console.WriteLine($"{i} != {indexSorted[j]}");
                                      Console.WriteLine($"scoresTemp2[{i}]={scoresTemp2[i]} - scoresTemp1[{j}]={scoresTemp1[j]}");
                                      if (scoresTemp2[i] == scoresTemp1[j])
                                      {
                                          Console.WriteLine($"{scoresTemp2[i]} == {scoresTemp1[j]} => indexSorted[{j}] = {i}");
                                          indexSorted[i] = j;
                                          break;
                                      }
                                  }
                              }
                          }
                      
                        
                          foreach (int index in indexSorted)
                          {
                              Console.WriteLine(index);
                          }
                       }
                      
                      i:0 - j:0 - indexSorted[j]: -1
                      0 != -1
                      scoresTemp2[0]=200 - scoresTemp1[0]=50
                      
                      
                      i:0 - j:1 - indexSorted[j]: -1
                      0 != -1
                      scoresTemp2[0]=200 - scoresTemp1[1]=100
                      
                      
                      i:0 - j:2 - indexSorted[j]: -1
                      0 != -1
                      scoresTemp2[0]=200 - scoresTemp1[2]=100
                      
                      
                      i:0 - j:3 - indexSorted[j]: -1
                      0 != -1
                      scoresTemp2[0]=200 - scoresTemp1[3]=150
                      
                      
                      i:0 - j:4 - indexSorted[j]: -1
                      0 != -1
                      scoresTemp2[0]=200 - scoresTemp1[4]=200
                      200 == 200 => indexSorted[4] = 0
                      
                      
                      i:1 - j:0 - indexSorted[j]: 4
                      1 != 4
                      scoresTemp2[1]=150 - scoresTemp1[0]=50
                      
                      
                      i:1 - j:1 - indexSorted[j]: -1
                      1 != -1
                      scoresTemp2[1]=150 - scoresTemp1[1]=100
                      
                      
                      i:1 - j:2 - indexSorted[j]: -1
                      1 != -1
                      scoresTemp2[1]=150 - scoresTemp1[2]=100
                      
                      
                      i:1 - j:3 - indexSorted[j]: -1
                      1 != -1
                      scoresTemp2[1]=150 - scoresTemp1[3]=150
                      150 == 150 => indexSorted[3] = 1
                      
                      
                      i:2 - j:0 - indexSorted[j]: 4
                      2 != 4
                      scoresTemp2[2]=100 - scoresTemp1[0]=50
                      
                      
                      i:2 - j:1 - indexSorted[j]: 3
                      2 != 3
                      scoresTemp2[2]=100 - scoresTemp1[1]=100
                      100 == 100 => indexSorted[1] = 2
                      
                      
                      i:3 - j:0 - indexSorted[j]: 4
                      3 != 4
                      scoresTemp2[3]=100 - scoresTemp1[0]=50
                      
                      
                      i:3 - j:1 - indexSorted[j]: 3
                      
                      
                      i:3 - j:2 - indexSorted[j]: 1
                      3 != 1
                      scoresTemp2[3]=100 - scoresTemp1[2]=100
                      100 == 100 => indexSorted[2] = 3
                      
                      
                      i:4 - j:0 - indexSorted[j]: 4
                      
                      
                      i:4 - j:1 - indexSorted[j]: 3
                      4 != 3
                      scoresTemp2[4]=50 - scoresTemp1[1]=100
                      
                      
                      i:4 - j:2 - indexSorted[j]: 1
                      4 != 1
                      scoresTemp2[4]=50 - scoresTemp1[2]=100
                      
                      
                      i:4 - j:3 - indexSorted[j]: 2
                      4 != 2
                      scoresTemp2[4]=50 - scoresTemp1[3]=150
                      
                      
                      i:4 - j:4 - indexSorted[j]: -1
                      4 != -1
                      scoresTemp2[4]=50 - scoresTemp1[4]=200
                      
                      
                      i:4 - j:5 - indexSorted[j]: -1
                      4 != -1
                      scoresTemp2[4]=50 - scoresTemp1[5]=25
                      
                      
                      i:5 - j:0 - indexSorted[j]: 4
                      5 != 4
                      scoresTemp2[5]=25 - scoresTemp1[0]=50
                      
                      
                      i:5 - j:1 - indexSorted[j]: 3
                      5 != 3
                      scoresTemp2[5]=25 - scoresTemp1[1]=100
                      
                      
                      i:5 - j:2 - indexSorted[j]: 1
                      5 != 1
                      scoresTemp2[5]=25 - scoresTemp1[2]=100
                      
                      
                      i:5 - j:3 - indexSorted[j]: 2
                      5 != 2
                      scoresTemp2[5]=25 - scoresTemp1[3]=150
                      
                      
                      i:5 - j:4 - indexSorted[j]: -1
                      5 != -1
                      scoresTemp2[5]=25 - scoresTemp1[4]=200
                      
                      
                      i:5 - j:5 - indexSorted[j]: -1
                      5 != -1
                      scoresTemp2[5]=25 - scoresTemp1[5]=25
                      25 == 25 => indexSorted[5] = 5
                      
                      4
                      3
                      1
                      2
                      -1
                      5
                      
                      if (i != indexSorted[j])
                      
                      for (int i = 0; i < scoresTemp2.Length; i++)
                      {
                          for (int j = 0; j < scoresTemp1.Length; j++)
                          {
                              if (scoresTemp1[j] == scoresTemp2[i])
                              {
                                  indexSorted[i] = j;
                                  scoresTemp1[j] = -1;
                                  break;
                              }
                          }
                      }
                      
                      4
                      3
                      1
                      2
                      0
                      5
                      
                      if (i != indexSorted[j])
                      
                      for (int i = 0; i < scoresTemp2.Length; i++)
                      {
                          for (int j = 0; j < scoresTemp1.Length; j++)
                          {
                              if (scoresTemp1[j] == scoresTemp2[i])
                              {
                                  indexSorted[i] = j;
                                  scoresTemp1[j] = -1;
                                  break;
                              }
                          }
                      }
                      
                      4
                      3
                      1
                      2
                      0
                      5
                      
                      if (i != indexSorted[j])
                      
                      for (int i = 0; i < scoresTemp2.Length; i++)
                      {
                          for (int j = 0; j < scoresTemp1.Length; j++)
                          {
                              if (scoresTemp1[j] == scoresTemp2[i])
                              {
                                  indexSorted[i] = j;
                                  scoresTemp1[j] = -1;
                                  break;
                              }
                          }
                      }
                      
                      4
                      3
                      1
                      2
                      0
                      5
                      

                      How can i add value ( 1 point ) to a specific player on my discord quiz game in python?

                      copy iconCopydownload iconDownload
                      if message.author.name in self.scoreboard:
                          self.scoreboard[message.author.name] += 1
                      

                      Embed Shiny widgets in a row in a DT table

                      copy iconCopydownload iconDownload
                      library(shiny)
                      library(shinydashboard)
                      library(shinyWidgets)
                      library(dplyr)
                      library(DT)
                      # library(tidyverse)
                      library(data.table)
                      
                      #reproducible minimal data frame
                      YLMI <- structure(list(X = c(511L, 700L, 943L, 1402L, 1429L, 1483L, 1726L, 1834L, 1861L, 2266L), 
                                             name = c("Austria", "Belgium", "Bulgaria", "Cyprus", "Czech Republic", "Denmark", 
                                                      "Estonia", "Finland", "France", "Iceland"), 
                                             year = c(2015L, 2015L, 2015L, 2015L, 2015L, 2015L, 2015L, 2015L, 2015L, 2015L), 
                                             X1 = c(6.0948572, 5.1031427, 5.145143, 4.3162856, 5.9200001, 6.0751429, 5.8771429, 
                                                    5.0911427, 4.8957143, 6.262857), 
                                             X2 = c(5.7982831, 5.1347985, 4.1193204,3.9259963, 5.9878144, 5.8885102, 5.5807657, 
                                                    4.5704818, 4.8845162, 5.7285347), 
                                             X3 = c(5.8720002, 5.1729999, 4.1079998, 4.7049999, 5.8794999, 6.0700002, 5.3740001, 
                                                    5.4159999, 5.2164998, 6.3175001), 
                                             X4 = c(6.0436354, 3.9714868, 6.0058327, 4.7928214, 4.636817, 6.1576967, 5.9891138, 
                                                    3.3220425, 3.2921035, 4.1184382), 
                                             X5 = c(6.3000154, 5.7192054, 6.5671687, 3.4370663, 6.6064062, 5.8908257, 
                                                    6.8782973, 4.7578831, 4.3325543, 6.2499504), 
                                             X6 = c(4.9257145, 5.5085716, 4.0457144, 3.737143, 2.817143, 5.0228572, 4.0057144, 
                                                    3.0914288, 5.3942857, 1.7485714), 
                                             X7 = c(5.2685714, 5.8857141, 5.1657143, 4.4285712, 6.6914287, 3.7942855, 
                                                    4.8914285, 5.7142859, 5.2857141, 5.0457144), 
                                             X8 = c(5.7268553, 5.3676248, 5.7317734, 5.1083288, 4.9277864, 6.2327962, 
                                                    6.1439047, 5.5020885, 5.9025269, 5.6717625), 
                                             X9 = c(4.7919998, 5.428, 5.1039996, 4.7199998, 5.4880004, 6.2319999, 5.1399999, 
                                                    5.3560004, 5.4160004, 5.3560004), 
                                             X10 = c(4.7384157, 3.7913544, 4.4407039, 5.8613172, 3.5934217, 5.534936, 
                                                     4.0672798, 4.2066154, 4.3676648, 3.6402931), 
                                             X11 = c(5.7328, 5.1810961, 5.4579573, 5.5078635, 5.3274336, 5.7784905, 
                                                     5.5863309, 5.2231383, 5.3318233, 5.2328768), 
                                             X12 = c(5.6389961, 3.9419262, 2.6277056, 4.8922715, 4.4109187, 6.3135815, 
                                                     5.6100388, 6.3433652, 4.5896773, 6.6938777), 
                                             W1 = c(0.0833, 0.0833, 0.0833, 0.0833, 0.0833, 0.0833, 0.0833, 0.0833, 0.0833, 
                                                    0.0833), 
                                             W2 = c(0.0833, 0.0833, 0.0833, 0.0833, 0.0833, 0.0833, 0.0833,
                                                    0.0833, 0.0833, 0.0833), 
                                             W3 = c(0.0833, 0.0833, 0.0833, 0.0833, 0.0833, 0.0833, 0.0833, 0.0833, 0.0833, 
                                                    0.0833), 
                                             W4 = c(0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05), 
                                             W5 = c(0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05), 
                                             W6 = c(0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05), 
                                             W7 = c(0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05), 
                                             W8 = c(0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05), 
                                             W9 = c(0.125, 0.125, 0.125, 0.125, 0.125, 0.125, 0.125, 0.125, 0.125, 0.125), 
                                             W10 = c(0.125, 0.125, 0.125, 0.125, 0.125, 0.125, 0.125, 0.125, 0.125, 0.125), 
                                             W11 = c(0.125, 0.125, 0.125, 0.125, 0.125, 0.125, 0.125, 0.125, 0.125, 0.125), 
                                             W12 = c(0.125, 0.125, 0.125, 0.125, 0.125, 0.125, 0.125, 0.125, 0.125, 0.125), 
                                             indicators = c(12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L), 
                                             classes = c("A", "A", "A", "A", "A", "A", "A", "A", "A", "A"), 
                                             index_constant = c(5.51, 4.9, 4.69, 4.78, 5.12, 5.84, 5.35, 5.02, 4.92, 5.28), 
                                             ranking = c(18L, 48L, 59L, 53L, 31L, 7L, 25L, 36L, 45L, 27L)), 
                                        row.names = c(511L, 700L, 943L, 1402L, 1429L, 1483L, 1726L, 1834L, 1861L, 2266L), 
                                        class = "data.frame")
                      
                      
                      
                      
                      
                      #helper function:
                      # ---- Index Calculation Based on User Weights ---- #
                      calculate_index_w_weights <- function(w1,w2,w3,w4) {
                        
                        # Obtaining weights
                        weights <- array(rep(1,4)) 
                        
                        # Creating weight matrices to re-calculate the indicator scores.
                        w1_matrix <- matrix(weights[1], nrow= 10, ncol=3)
                        w2_matrix <- matrix(weights[2], nrow= 10, ncol=5)
                        w3_matrix <- matrix(weights[3], nrow= 10, ncol=2)
                        w4_matrix <- matrix(weights[4], nrow= 10, ncol=2)
                        
                        # Unnecessary for now
                        YLMI[,c("W1","W2","W3")]<-YLMI[,c("W1","W2","W3")] * w1_matrix
                        YLMI[,c("W4","W5","W6","W7", "W8")]<-YLMI[,c("W4","W5","W6", "W7","W8")] * w2_matrix
                        YLMI[,c("W9","W10")]<-YLMI[,c("W9","W10")] * w3_matrix
                        YLMI[,c("W11","W12")]<-YLMI[,c("W11","W12")] * w4_matrix
                        
                        ActivityState = YLMI[,c("X1", "X2", "X3")] * YLMI[,c("W1","W2","W3")] #5454x3
                        WorkingConditions= YLMI[,c("X4", "X5", "X6", "X7", "X8")] * YLMI[,c("W4","W5","W6", "W7", "W8")]  #5454x5
                        Education= YLMI[,c("X9", "X10")] * YLMI[,c("W9","W10")]  #5454x2
                        TransitionSmoothness= YLMI[,c("X11", "X12")] * YLMI[,c("W11","W12")] #5454x2
                        
                        c1 <- rowSums(ActivityState) #5454 x 1 sum(x1*w1....)
                        c2 <- rowSums(WorkingConditions)
                        c3 <- rowSums(Education)
                        c4 <- rowSums(TransitionSmoothness)
                        
                        w1_i <-rowSums(YLMI[,c("W1","W2","W3")])
                        w2_i <-rowSums(YLMI[,c("W4","W5","W6","W7", "W8")])
                        w3_i <-rowSums(YLMI[,c("W9","W10")])
                        w4_i <-rowSums(YLMI[,c("W11","W12")])
                        
                        # weighted_index  = YLMI_Nominator / sum_weights
                        ActivityState = c1 / w1_i
                        WorkingConditions = c2 / w2_i
                        Education = c3 / w3_i
                        TransitionSmoothness = c4 / w4_i
                        
                        # Category weighting
                        weights_category <- array(rep(0.25,4)) 
                        
                        # User input on weights
                        w_unit <- 1 / (w1+w2+w3+w4)
                        weights_category[1] <- w_unit * w1
                        weights_category[2] <- w_unit * w2
                        weights_category[3] <- w_unit * w3
                        weights_category[4] <- w_unit * w4
                        
                        w1_cat_matrix <- matrix(weights_category[1], nrow= 10, ncol=1)
                        w2_cat_matrix <- matrix(weights_category[2], nrow= 10, ncol=1)
                        w3_cat_matrix <- matrix(weights_category[3], nrow= 10, ncol=1)
                        w4_cat_matrix <- matrix(weights_category[4], nrow= 10, ncol=1)
                        
                        categories <- data.frame(ActivityState, WorkingConditions, Education, TransitionSmoothness,
                                                 W1_C=w1_cat_matrix, W2_C=w2_cat_matrix, W3_C= w3_cat_matrix, W4_C=w4_cat_matrix)
                        
                        categories[is.na(categories) == TRUE] = 0
                        
                        # If category value is zero, then no weight assigned to that category for the index calculation.
                        categories <- within(categories, W1_C[ActivityState == 0] <- 0)
                        categories <- within(categories, W2_C[WorkingConditions == 0] <- 0)
                        categories <- within(categories, W3_C[Education == 0] <- 0)
                        categories <- within(categories, W4_C[TransitionSmoothness == 0] <- 0)
                        
                        weights_category_sum <-rowSums(categories[,c("W1_C","W2_C","W3_C","W4_C")])
                        
                        YLMI_Nominator1=categories[,c("ActivityState")] * categories[,c("W1_C")]
                        YLMI_Nominator2=categories[,c("WorkingConditions")] * categories[,c("W2_C")]
                        YLMI_Nominator3=categories[,c("Education")] * categories[,c("W3_C")]
                        YLMI_Nominator4=categories[,c("TransitionSmoothness")] * categories[,c("W4_C")]
                        
                        YLMI_Nominator = YLMI_Nominator1 + YLMI_Nominator2 + YLMI_Nominator3 + YLMI_Nominator4
                        index  = YLMI_Nominator / weights_category_sum
                        
                        YLMI["weighted_index"]<-index
                        YLMI["ActivityState"]<-ActivityState
                        YLMI["WorkingConditions"]<-WorkingConditions
                        YLMI["Education"]<-Education
                        YLMI["TransitionSmoothness"]<-TransitionSmoothness
                        
                        #creating subset for single indicator scores
                        YLMI_IScores <- data.frame(
                          Country = YLMI[, c("name")],
                          Year = YLMI[, c("year")],
                          Classes = YLMI[, c("classes")],
                          Index = YLMI[, c("index_constant")],
                          Weighted_Index = YLMI[, c("weighted_index")],
                          ActivityState=YLMI[, c("ActivityState")],
                          WorkingConditions=YLMI[, c("WorkingConditions")],
                          Education=YLMI[, c("Education")],
                          TransitionSmoothness=YLMI[, c("TransitionSmoothness")],
                          UnemploymentRate = YLMI[, c("X1")],
                          RelaxedUnemploymentRate = YLMI[, c("X2")],
                          NEETRate = YLMI[, c("X3")],
                          TemporaryWorkersRate = YLMI[, c("X4")],
                          InvoluntaryPartTimeWorkersRate = YLMI[, c("X5")],
                          AtypicalWorkingHoursRate = YLMI[, c("X6")],
                          InWorkatRiskofPovertyRate = YLMI[, c("X7")],
                          VulnerableEmploymentRate =  YLMI[, c("X8")],
                          FormalEducationandTrainingRate = YLMI[, c("X9")],
                          SkillsMismatchRate = YLMI[, c("X10")],
                          RelativeUnemploymentRatio = YLMI[, c("X11")],
                          LongTermUnemploymentRate = YLMI[, c("X12")])
                        
                        # Deleting rows if calculated index is NaN
                        YLMI_IScores <- YLMI_IScores[!is.na(YLMI_IScores$Index), ]
                        
                        YLMI_IScores[is.na(YLMI_IScores) == TRUE] = "-"
                        return(YLMI_IScores)
                      }
                      
                      ##server##
                      server <- function(input, output, session) {
                        
                        #scoreboard
                        
                        #table layout for scoreboard
                        sketch <- htmltools:: withTags(
                          table(
                            class = "display",
                            thead(
                              tr(
                                th(colspan = 3, "Selection", style = "border-right: solid 2px;"),
                                th(colspan = 2, "Aggregate Index", style = "border-right: solid 2px;"),
                                th(colspan = 4, "Sub-Index Values by Dimension", style = "border-right: solid 2px;"),
                                th(colspan = 3, "Dimension: Activity State", style = "border-right: solid 2px;"),
                                th(colspan = 5, "Dimension: Working Conditions", style = "border-right: solid 2px;"),
                                th(colspan = 2, "Dimension: Education", style = "border-right: solid 2px;"),
                                th(colspan = 2, "Dimension: Transition Smoothness", style = "border-right: solid 2px;")
                              ),
                              
                              tr(
                                th("Country"),
                                th("Year"),
                                th("Classes", style = "border-right: solid 2px;"),
                                th("Index"),
                                th("Weighted Index", style = "border-right: solid 2px;"),
                                th(div("Activity State", br(), br(), br(), selectInput("w_1",
                                                                           label = "Select weight of Dimension Activity State:",
                                                                           choices = 0:3,
                                                                           selected = 1
                                ))),
                                th(div("Working Conditions", br(), br(), selectInput("w_2",
                                                                         label = "Select weight of Dimension Working Conditions:",
                                                                         choices = 0:3,
                                                                         selected = 1
                                ))),
                                th(div("Education", br(), br(), br(), selectInput("w_3",
                                                                      label = "Select weight of Dimension Education:",
                                                                      choices = 0:3,
                                                                      selected = 1
                                ))),
                                th(div("Transition Smoothness", br(), br(), selectInput("w_4",
                                                                            label = "Select weight of Dimension Transitional Smoothness:",
                                                                            choices = 0:3,
                                                                            selected = 1
                                )), style = "border-right: solid 2px;"),
                                th("Unemployment Rate"),
                                th("Relaxed Unemployment Rate"),
                                th("NEET Rate", style = "border-right: solid 2px;"),
                                th("Temporary Workers Rate"),
                                th("Involuntary Part Time Workers Rate"),
                                th("Atypical Working Hours Rate"),
                                th("In Work at Risk of Poverty Rate"),
                                th("Vulnerable Employment Rate", style = "border-right: solid 2px;"),
                                th("Formal Educationand Training Rate"),
                                th("Skills Mismatch Rate", style = "border-right: solid 2px;"),
                                th("Relative Unemployment Ratio"),
                                th("Long Term Unemployment Rate")
                              )
                            )
                          )
                        )
                        
                        #data filtering based on user input
                        filterData <- reactive({
                          
                          w1 <- ifelse(is.null(input$w_1), yes = 1, no = as.integer(input$w_1))
                          w2 <- ifelse(is.null(input$w_2), yes = 1, no = as.integer(input$w_2))
                          w3 <- ifelse(is.null(input$w_3), yes = 1, no = as.integer(input$w_3))
                          w4 <- ifelse(is.null(input$w_4), yes = 1, no = as.integer(input$w_4))
                          
                          
                          YLMI_IScores <- calculate_index_w_weights(w1,w2,w3,w4)
                          
                          rows <- (YLMI_IScores$Country %in% input$country_scb) & (YLMI_IScores$Classes %in% input$country_classes_scb)
                          data <- YLMI_IScores[rows,, drop = FALSE]
                          data
                        })
                        
                        # receive initial dataset only once to avoid re-rendering the table
                        initData <- reactiveVal()
                        observeEvent(filterData(), {
                          initData(filterData())
                        }, once = TRUE)
                        
                        output$scb_table <- DT::renderDT({
                          datatable(initData(), rownames = FALSE, container = sketch, escape = FALSE,
                                    options = list(info = TRUE, order= list(3,"dsc"), pageLength = 50, ordering = FALSE,
                                                   columnDefs = list(list(targets = "_all", className = "dt-center")),
                                                   preDrawCallback = JS('function() { Shiny.unbindAll(this.api().table().node()); }'),
                                                   drawCallback = JS('function() { Shiny.bindAll(this.api().table().node()); } ')
                                                   )
                          ) %>%
                            formatStyle(c(3,5,9,12,17,19,21), `border-right` = "solid 2px") %>%
                            formatStyle(columns = "Index", backgroundColor = "#fdb9c4") %>%
                            formatStyle(columns = "Weighted_Index", backgroundColor = "#f72a66") %>%
                            formatStyle(columns = "ActivityState", backgroundColor = "#fff9ee") %>%
                            formatStyle(columns = "WorkingConditions", backgroundColor = "#fff9ee") %>%
                            formatStyle(columns = "Education", backgroundColor = "#fff9ee") %>%
                            formatStyle(columns = "TransitionSmoothness", backgroundColor = "#fff9ee") %>%
                            formatRound(columns = c(4:21), digits = 2)
                        }, server = TRUE)
                        
                        scb_table_proxy <- dataTableProxy(outputId = "scb_table", session = session, deferUntilFlush = TRUE)
                        
                        observeEvent(filterData(), {
                          replaceData(proxy = scb_table_proxy, data = filterData(), resetPaging = FALSE, rownames = FALSE) # must repeat rownames = FALSE see ?replaceData and ?dataTableAjax
                        })
                        
                      }
                      
                      ##ui ##
                      ui <- fluidPage(
                        sidebarLayout(
                          #scoreboard
                          sidebarPanel(
                            pickerInput(
                              inputId = "country_scb",
                              label = "Select country/countries",
                              selected = unique(sort(YLMI$name)), # Default selecting all the countries here! TODO
                              choices = unique(sort(YLMI$name)),
                              multiple = TRUE,
                              options = list(`actions-box` = TRUE)
                            ),
                            awesomeCheckboxGroup(
                              inputId = "country_classes_scb",
                              label = "Filter countries by data availability:", 
                              choices = unique(sort(YLMI$classes)),
                              selected = unique(sort(YLMI$classes)),                         
                            )
                          ),
                          mainPanel( 
                            # Show data table   
                            DT::dataTableOutput("scb_table")
                            
                          )
                        )
                      )
                      
                      shinyApp(ui = ui, server = server)
                      

                      Is it possible to remove duplicates based on multiple columns in Laravel's ORM?

                      copy iconCopydownload iconDownload
                      WITH cte AS (
                          SELECT *, ROW_NUMBER() OVER
                          (PARTITION BY username, discipline_one, discipline_two, discipline_three,
                           discipline_four, discipline_five, discipline_six ORDER BY id DESC) rn
                          FROM results
                      )
                      
                      SELECT id, username, discipline_one, discipline_two, discipline_three,
                           discipline_four, discipline_five, discipline_six, created_at, updated_at
                      FROM cte
                      WHERE rn = 1
                      
                      
                          public static function waybackWhen($result)
                          {
                              $username = $result->username;
                      
                              config()->set('database.connections.mysql.strict', false);
                              DB::reconnect(); // Important as the existing connection if any would be in strict mode.
                      
                              $resultSet = DB::select("
                                  WITH cte AS (
                                      SELECT *, ROW_NUMBER() OVER
                                      (PARTITION BY username, discipline_one, discipline_two, discipline_three,
                                       discipline_four, discipline_five, discipline_six ORDER BY id DESC) rn
                                      FROM results
                                  )
                                  
                                  SELECT id, username, discipline_one, discipline_two, discipline_three,
                                       discipline_four, discipline_five, discipline_six, created_at, updated_at
                                  FROM cte
                                  WHERE rn = 1 AND username = ? 
                             ", [ $username ]);
                      
                              // Now changing back the strict ON.
                              config()->set('database.connections.mysql.strict', true);
                              DB::reconnect();
                      
                              return $resultSet;
                      
                          }
                      
                      
                      => [
                           {#3409
                             +"id": 9,
                             +"username": "foo",
                             +"discipline_one": "4",
                             +"discipline_two": "5",
                             +"discipline_three": "8",
                             +"discipline_four": "9",
                             +"discipline_five": "4",
                             +"discipline_six": "6",
                             +"created_at": "2021-11-03 19:45:20",
                             +"updated_at": "2021-11-03 19:45:50",
                           },
                         ]
                      
                      
                      WITH cte AS (
                          SELECT *, ROW_NUMBER() OVER
                          (PARTITION BY username, discipline_one, discipline_two, discipline_three,
                           discipline_four, discipline_five, discipline_six ORDER BY id DESC) rn
                          FROM results
                      )
                      
                      SELECT id, username, discipline_one, discipline_two, discipline_three,
                           discipline_four, discipline_five, discipline_six, created_at, updated_at
                      FROM cte
                      WHERE rn = 1
                      
                      
                          public static function waybackWhen($result)
                          {
                              $username = $result->username;
                      
                              config()->set('database.connections.mysql.strict', false);
                              DB::reconnect(); // Important as the existing connection if any would be in strict mode.
                      
                              $resultSet = DB::select("
                                  WITH cte AS (
                                      SELECT *, ROW_NUMBER() OVER
                                      (PARTITION BY username, discipline_one, discipline_two, discipline_three,
                                       discipline_four, discipline_five, discipline_six ORDER BY id DESC) rn
                                      FROM results
                                  )
                                  
                                  SELECT id, username, discipline_one, discipline_two, discipline_three,
                                       discipline_four, discipline_five, discipline_six, created_at, updated_at
                                  FROM cte
                                  WHERE rn = 1 AND username = ? 
                             ", [ $username ]);
                      
                              // Now changing back the strict ON.
                              config()->set('database.connections.mysql.strict', true);
                              DB::reconnect();
                      
                              return $resultSet;
                      
                          }
                      
                      
                      => [
                           {#3409
                             +"id": 9,
                             +"username": "foo",
                             +"discipline_one": "4",
                             +"discipline_two": "5",
                             +"discipline_three": "8",
                             +"discipline_four": "9",
                             +"discipline_five": "4",
                             +"discipline_six": "6",
                             +"created_at": "2021-11-03 19:45:20",
                             +"updated_at": "2021-11-03 19:45:50",
                           },
                         ]
                      
                      
                      WITH cte AS (
                          SELECT *, ROW_NUMBER() OVER
                          (PARTITION BY username, discipline_one, discipline_two, discipline_three,
                           discipline_four, discipline_five, discipline_six ORDER BY id DESC) rn
                          FROM results
                      )
                      
                      SELECT id, username, discipline_one, discipline_two, discipline_three,
                           discipline_four, discipline_five, discipline_six, created_at, updated_at
                      FROM cte
                      WHERE rn = 1
                      
                      
                          public static function waybackWhen($result)
                          {
                              $username = $result->username;
                      
                              config()->set('database.connections.mysql.strict', false);
                              DB::reconnect(); // Important as the existing connection if any would be in strict mode.
                      
                              $resultSet = DB::select("
                                  WITH cte AS (
                                      SELECT *, ROW_NUMBER() OVER
                                      (PARTITION BY username, discipline_one, discipline_two, discipline_three,
                                       discipline_four, discipline_five, discipline_six ORDER BY id DESC) rn
                                      FROM results
                                  )
                                  
                                  SELECT id, username, discipline_one, discipline_two, discipline_three,
                                       discipline_four, discipline_five, discipline_six, created_at, updated_at
                                  FROM cte
                                  WHERE rn = 1 AND username = ? 
                             ", [ $username ]);
                      
                              // Now changing back the strict ON.
                              config()->set('database.connections.mysql.strict', true);
                              DB::reconnect();
                      
                              return $resultSet;
                      
                          }
                      
                      
                      => [
                           {#3409
                             +"id": 9,
                             +"username": "foo",
                             +"discipline_one": "4",
                             +"discipline_two": "5",
                             +"discipline_three": "8",
                             +"discipline_four": "9",
                             +"discipline_five": "4",
                             +"discipline_six": "6",
                             +"created_at": "2021-11-03 19:45:20",
                             +"updated_at": "2021-11-03 19:45:50",
                           },
                         ]
                      
                      

                      How would I insert a JavaScript variable into HTML?

                      copy iconCopydownload iconDownload
                      let score = 5;
                      document.querySelector('span.scoreboard').innerText = `Your score is ${score}`;
                      

                      Python - Alien Invasion Why don't my walls take on their shape?

                      copy iconCopydownload iconDownload
                      >>> print(shape)
                      ['  xxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx     xxxxx       xx']
                      
                      shape = [
                      '  xxxxxxx  ',
                      ' xxxxxxxxx ',
                      'xxxxxxxxxxx',
                      'xxxxxxxxxxx',
                      'xxxxxxxxxxx',
                      'xxx     xxx',
                      'xx       xx',]
                      
                      >>> print(shape)
                      ['  xxxxxxx  ', ' xxxxxxxxx ', 'xxxxxxxxxxx', 'xxxxxxxxxxx', 'xxxxxxxxxxx', 'xxx     xxx', 'xx       xx']
                      
                      shape = """  xxxxxxx  
                       xxxxxxxxx 
                      xxxxxxxxxxx
                      xxxxxxxxxxx
                      xxxxxxxxxxx
                      xxx     xxx
                      xx       xx""".splitlines()
                      
                      >>> print(shape)
                      ['  xxxxxxx  ', ' xxxxxxxxx ', 'xxxxxxxxxxx', 'xxxxxxxxxxx', 'xxxxxxxxxxx', 'xxx     xxx', 'xx       xx']
                      
                      >>> print(shape)
                      ['  xxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx     xxxxx       xx']
                      
                      shape = [
                      '  xxxxxxx  ',
                      ' xxxxxxxxx ',
                      'xxxxxxxxxxx',
                      'xxxxxxxxxxx',
                      'xxxxxxxxxxx',
                      'xxx     xxx',
                      'xx       xx',]
                      
                      >>> print(shape)
                      ['  xxxxxxx  ', ' xxxxxxxxx ', 'xxxxxxxxxxx', 'xxxxxxxxxxx', 'xxxxxxxxxxx', 'xxx     xxx', 'xx       xx']
                      
                      shape = """  xxxxxxx  
                       xxxxxxxxx 
                      xxxxxxxxxxx
                      xxxxxxxxxxx
                      xxxxxxxxxxx
                      xxx     xxx
                      xx       xx""".splitlines()
                      
                      >>> print(shape)
                      ['  xxxxxxx  ', ' xxxxxxxxx ', 'xxxxxxxxxxx', 'xxxxxxxxxxx', 'xxxxxxxxxxx', 'xxx     xxx', 'xx       xx']
                      
                      >>> print(shape)
                      ['  xxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx     xxxxx       xx']
                      
                      shape = [
                      '  xxxxxxx  ',
                      ' xxxxxxxxx ',
                      'xxxxxxxxxxx',
                      'xxxxxxxxxxx',
                      'xxxxxxxxxxx',
                      'xxx     xxx',
                      'xx       xx',]
                      
                      >>> print(shape)
                      ['  xxxxxxx  ', ' xxxxxxxxx ', 'xxxxxxxxxxx', 'xxxxxxxxxxx', 'xxxxxxxxxxx', 'xxx     xxx', 'xx       xx']
                      
                      shape = """  xxxxxxx  
                       xxxxxxxxx 
                      xxxxxxxxxxx
                      xxxxxxxxxxx
                      xxxxxxxxxxx
                      xxx     xxx
                      xx       xx""".splitlines()
                      
                      >>> print(shape)
                      ['  xxxxxxx  ', ' xxxxxxxxx ', 'xxxxxxxxxxx', 'xxxxxxxxxxx', 'xxxxxxxxxxx', 'xxx     xxx', 'xx       xx']
                      
                      >>> print(shape)
                      ['  xxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx     xxxxx       xx']
                      
                      shape = [
                      '  xxxxxxx  ',
                      ' xxxxxxxxx ',
                      'xxxxxxxxxxx',
                      'xxxxxxxxxxx',
                      'xxxxxxxxxxx',
                      'xxx     xxx',
                      'xx       xx',]
                      
                      >>> print(shape)
                      ['  xxxxxxx  ', ' xxxxxxxxx ', 'xxxxxxxxxxx', 'xxxxxxxxxxx', 'xxxxxxxxxxx', 'xxx     xxx', 'xx       xx']
                      
                      shape = """  xxxxxxx  
                       xxxxxxxxx 
                      xxxxxxxxxxx
                      xxxxxxxxxxx
                      xxxxxxxxxxx
                      xxx     xxx
                      xx       xx""".splitlines()
                      
                      >>> print(shape)
                      ['  xxxxxxx  ', ' xxxxxxxxx ', 'xxxxxxxxxxx', 'xxxxxxxxxxx', 'xxxxxxxxxxx', 'xxx     xxx', 'xx       xx']
                      
                      >>> print(shape)
                      ['  xxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx     xxxxx       xx']
                      
                      shape = [
                      '  xxxxxxx  ',
                      ' xxxxxxxxx ',
                      'xxxxxxxxxxx',
                      'xxxxxxxxxxx',
                      'xxxxxxxxxxx',
                      'xxx     xxx',
                      'xx       xx',]
                      
                      >>> print(shape)
                      ['  xxxxxxx  ', ' xxxxxxxxx ', 'xxxxxxxxxxx', 'xxxxxxxxxxx', 'xxxxxxxxxxx', 'xxx     xxx', 'xx       xx']
                      
                      shape = """  xxxxxxx  
                       xxxxxxxxx 
                      xxxxxxxxxxx
                      xxxxxxxxxxx
                      xxxxxxxxxxx
                      xxx     xxx
                      xx       xx""".splitlines()
                      
                      >>> print(shape)
                      ['  xxxxxxx  ', ' xxxxxxxxx ', 'xxxxxxxxxxx', 'xxxxxxxxxxx', 'xxxxxxxxxxx', 'xxx     xxx', 'xx       xx']
                      

                      Not getting the shadow on the winner tab

                      copy iconCopydownload iconDownload
                      if (res==0){
                              document.getElementById('result_value').innerHTML='YOU LOSE';
                              document.getElementById('user').classList.remove("big_hover")
                              document.getElementById('computer').classList.add("big_hover")
                              console.log(res)
                              
                          }
                          else if(res == -1){
                              document.getElementById('result_value').innerHTML='DRAW'
                              document.getElementById('user').classList.remove("big_hover")
                              document.getElementById('computer').classList.remove("big_hover")
                              console.log(res)
                          }
                          else{
                              document.getElementById('result_value').innerHTML='YOU WON'
                              document.getElementById('user').classList.add("big_hover")
                              document.getElementById('computer').classList.remove("big_hover")
                              console.log(res)
                          }

                      onclick function not working in javascript

                      copy iconCopydownload iconDownload
                      <div class="items" id="paper_1" onclick="paper_2()">
                      
                      <div class="items" id="rock_1" onclick="rock_2()">
                      <div class="items" id="paper_1" onclick="paper_2()">
                      <div class="items" id="scissors_1" onclick="scissors_2()">
                      
                      <div class="items" id="rock_1" onclick="rock_2()">
                      <div class="items" id="paper_1" onclick="paper_2()">
                      <div class="items" id="scissors_1" onclick="scissors_2()">
                      
                       <zz class="items" id="rock_1" onclick="rock_2">
                      
                      <div class="items" id="rock_1" onclick="rock_2()">
                      <div class="items" id="paper_1" onclick="paper_2()">
                      <div class="items" id="scissors_1" onclick="scissors_2()">
                      
                       <zz class="items" id="rock_1" onclick="rock_2">
                      

                      Community Discussions

                      Trending Discussions on scoreboard
                      • Convert nested dictionary, list, and dictionary into a pandas data frame in python
                      • How do I find record above and below based on rank
                      • C# and Unity, keep original index in relation to sorted array of integers
                      • Phaser3, Creating Rounded Rectangle, Not Staying Put Relative To Window
                      • Tkinter buttons change size when font is added to a whole row
                      • How to maintain order of a Mongo collection by sorting on an indexed field efficiently
                      • How can i add value ( 1 point ) to a specific player on my discord quiz game in python?
                      • Embed Shiny widgets in a row in a DT table
                      • Is it possible to remove duplicates based on multiple columns in Laravel's ORM?
                      • How would I insert a JavaScript variable into HTML?
                      Trending Discussions on scoreboard

                      QUESTION

                      Convert nested dictionary, list, and dictionary into a pandas data frame in python

                      Asked 2022-Mar-16 at 09:12

                      So, I am trying to work with a rest API, and it is giving me the following data:

                      {'sports': [{'id': '20',
                         'uid': 's:20',
                         'name': 'Football',
                         'slug': 'football',
                         'leagues': [{'id': '28',
                           'uid': 's:20~l:28',
                           'name': 'National Football League',
                           'abbreviation': 'NFL',
                           'shortName': 'NFL',
                           'slug': 'nfl',
                           'teams': [{'team': {'id': '22',
                              'uid': 's:20~l:28~t:22',
                              'slug': 'arizona-cardinals',
                              'location': 'Arizona',
                              'name': 'Cardinals',
                              'nickname': 'Cardinals',
                              'abbreviation': 'ARI',
                              'displayName': 'Arizona Cardinals',
                              'shortDisplayName': 'Cardinals',
                              'color': 'A40227',
                              'alternateColor': '000000',
                              'isActive': True,
                              'isAllStar': False,
                              'logos': [{'href': 'https://a.espncdn.com/i/teamlogos/nfl/500/ari.png',
                                'width': 500,
                                'height': 500,
                                'alt': '',
                                'rel': ['full', 'default'],
                                'lastUpdated': '2018-06-05T12:11Z'},
                               {'href': 'https://a.espncdn.com/i/teamlogos/nfl/500-dark/ari.png',
                                'width': 500,
                                'height': 500,
                                'alt': '',
                                'rel': ['full', 'dark'],
                                'lastUpdated': '2018-06-05T12:11Z'},
                               {'href': 'https://a.espncdn.com/i/teamlogos/nfl/500/scoreboard/ari.png',
                                'width': 500,
                                'height': 500,
                                'alt': '',
                                'rel': ['full', 'scoreboard'],
                                'lastUpdated': '2018-06-05T12:11Z'},
                      ...
                      

                      I'm just interested in the teams data. However, I try to slice the pie, I'm having trouble extracting the desired information into the dataframe properly.

                      Here is my code:

                      url = 'http://site.api.espn.com/apis/site/v2/sports/football/nfl/teams'
                      
                      r = requests.get(url)
                      teams_json = r.json()
                      
                      nfl = []
                      
                      for teams in teams_json.items():
                          
                          for x in teams:
                              
                              for row in x:
                                  print(row['teams'])
                      

                      I keep getting errors.

                      Any assistance is greatly appreciated.

                      ANSWER

                      Answered 2022-Mar-15 at 22:58

                      json.items() returns not just the values but the keys also, meaning that the first value in teams is the string "sports" and the second value is what you are looking for, the list. That's what is causing the error.

                      Edit: You want to do for key, teams in teams_json.items() not for teams in teams_json.items()

                      Source https://stackoverflow.com/questions/71489869

                      Community Discussions, Code Snippets contain sources that include Stack Exchange Network

                      Vulnerabilities

                      No vulnerabilities reported

                      Install scoreboard

                      Once Chrome and Java are installed, use your file manager to navigate to the scoreboard folder and run the scoreboard background script by double-clicking on it. Once it starts successfully, the scoreboard script will open a new window and display a series of status messages. You must keep this script running in order for the scoreboard to function, so do not close the window. You may minimize the window without effect. In your file manager, open start.html with the recommended browser. You may need to right-click on the file and choose the Open With option. The browser will open to localhost:8000 where several options are presented. Assuming that your scoreboard computer is set up with a monitor/laptop screen as a primary display for the operator, and a separate projector as a second display, right-click on the second link for Main Scoreboard and choose Open link in new window. Drag the new window with the main scoreboard onto the second display, click inside the window, and press the F11 key to make the window full screen. In the first browser window that you opened on the primary display, click on one of the documentation links. It will open in a new tab. Back in the original tab click on Main Operator Control Panel. When the control panel displays, it will ask you for an operator name. Enter your name and click Login. This operator name is used to store your personalized settings such as key controls. Now you can go to the tab with the documentation and either go to the Quick Start Guide or dive in deep right away and proceed with the section on the Controls page.
                      Windows users: Run scoreboard-Windows.exe to start the script.
                      Apple users: Run scoreboard.sh to start the script. (If clicking doesn't work, try pressing command+i (or right click on the file and select "Get info"). In the new info dialog in section "open with" select Terminal.app. (If it's not listed, choose other and navigate to /Applications/Utilities/Terminal.app.)
                      Linux users: Run scoreboard.sh to start the script. If you are unable to start it, you may have to allow script files to be executable as programs.

                      Support

                      For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .

                      DOWNLOAD this Library from

                      Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
                      over 430 million Knowledge Items
                      Find more libraries
                      Reuse Solution Kits and Libraries Curated by Popular Use Cases
                      Explore Kits

                      Save this library and start creating your kit

                      Share this Page

                      share link
                      Consider Popular Java Libraries
                      Try Top Libraries by rollerderby
                      Compare Java Libraries with Highest Support
                      Compare Java Libraries with Highest Quality
                      Compare Java Libraries with Highest Security
                      Compare Java Libraries with Permissive License
                      Compare Java Libraries with Highest Reuse
                      Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
                      over 430 million Knowledge Items
                      Find more libraries
                      Reuse Solution Kits and Libraries Curated by Popular Use Cases
                      Explore Kits

                      Save this library and start creating your kit

                      • © 2022 Open Weaver Inc.