"\u001b[0;32mpandas/_libs/index.pyx\u001b[0m in \u001b[0;36mpandas._libs.index.IndexEngine.get_loc\u001b[0;34m()\u001b[0m\n",
"--- ------ -------------- ----- \n",
"\u001b[0;32mpandas/_libs/index.pyx\u001b[0m in \u001b[0;36mpandas._libs.index.IndexEngine.get_loc\u001b[0;34m()\u001b[0m\n",
" 0 slug 231 non-null object\n",
"\u001b[0;32mpandas/_libs/hashtable_class_helper.pxi\u001b[0m in \u001b[0;36mpandas._libs.hashtable.PyObjectHashTable.get_item\u001b[0;34m()\u001b[0m\n",
" 1 Tijdstempel 238 non-null object\n",
"\u001b[0;32mpandas/_libs/hashtable_class_helper.pxi\u001b[0m in \u001b[0;36mpandas._libs.hashtable.PyObjectHashTable.get_item\u001b[0;34m()\u001b[0m\n",
" 2 E-mailadres 238 non-null object\n",
"\u001b[0;31mKeyError\u001b[0m: 'Enter your SDG profile by ticking 2-4 SDGs'",
" 3 Your fullname 238 non-null object\n",
"\nThe above exception was the direct cause of the following exception:\n",
" 4 The name of your fab lab 238 non-null object\n",
" 5 Country of your fab lab 237 non-null object\n",
"\u001b[0;32m<ipython-input-38-c721ca6096fb>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0;31m# Clean dataframe 'profiles'\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2\u001b[0m \u001b[0;31m# Delete verbose and superfluous columns 6-7\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 3\u001b[0;31m \u001b[0;32mdel\u001b[0m \u001b[0mprofiles\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'Enter your SDG profile by ticking 2-4 SDGs'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 4\u001b[0m \u001b[0;32mdel\u001b[0m \u001b[0mprofiles\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'One more thing!'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
" 6 URL of your fab lab page on www.fablabs.io 238 non-null object\n",
"\u001b[0;32m/usr/local/lib/python3.7/dist-packages/pandas/core/generic.py\u001b[0m in \u001b[0;36m__delitem__\u001b[0;34m(self, key)\u001b[0m\n\u001b[1;32m 3964\u001b[0m \u001b[0;31m# there was no match, this call should raise the appropriate\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3965\u001b[0m \u001b[0;31m# exception:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 3966\u001b[0;31m \u001b[0mloc\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0maxes\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m-\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mget_loc\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 3967\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_mgr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0midelete\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mloc\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3968\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
# Generating a report on Aligning a Fab Lab with the UN SDGs
# Generating a report on Aligning a Fab Lab with the UN SDGs
#### Author: Pieter van der Hijden (pvdh@sofos.nl) - "Fab Labs and SDGs" Working Group; Pieter van der Hijden (The Netherlands & Suriname) plus global team: Enrico Bassi (Italy), Vaneza Caycho Ñuflo (Peru), Nagwa ElNwishy (Egypt), Neville Govender (South Africa), Ted Hung (Taiwan), Arundhati Jadhav (India), Beno Juarez (Peru), Yogesh Kulkarni (India), Noksy Letsoalo (South Africa), Jean-Baptiste Natali (New Zealand), Wendy Neale (New Zealand), Mess Wright (USA)
#### Author: Pieter van der Hijden (pvdh@sofos.nl) - "Fab Labs and SDGs" Working Group; Pieter van der Hijden (The Netherlands & Suriname) plus global team: Enrico Bassi (Italy), Vaneza Caycho Ñuflo (Peru), Nagwa ElNwishy (Egypt), Neville Govender (South Africa), Ted Hung (Taiwan), Arundhati Jadhav (India), Beno Juarez (Peru), Yogesh Kulkarni (India), Noksy Letsoalo (South Africa), Jean-Baptiste Natali (New Zealand), Wendy Neale (New Zealand), Mess Wright (USA)
#### This work is licensed under a Creative Commons Attribution 4.0 International License; https://creativecommons.org/licenses/by/4.0/.
#### This work is licensed under a Creative Commons Attribution 4.0 International License; https://creativecommons.org/licenses/by/4.0/.
### Purpose
### Purpose
As a service to the individual fablabs we want to generate a report on a specific fab lab and its alignment with the UN Sustrainable Development Goals (SDGs). The information included is either generic in nature, or derived from various databases (fablabs basic data from fablabs.io, fablabs sdg profiles from sdg profile registration spreadsheet).
As a service to the individual fablabs we want to generate a report on a specific fab lab and its alignment with the UN Sustrainable Development Goals (SDGs). The information included is either generic in nature, or derived from various databases (fablabs basic data from fablabs.io, fablabs sdg profiles from sdg profile registration spreadsheet).
### Table of Contents
### Table of Contents
1. Install packages
1. Install packages
1. Import libraries
1. Import libraries
1. Prepare dataframes
1. Prepare dataframes
* Prepare dataframe profiles from gitlab.fabcloud.org
* Prepare dataframe profiles from gitlab.fabcloud.org
* Prepare dataframe fablabs from fablabs.io
* Prepare dataframe fablabs from fablabs.io
1. Merge profiles with fablabs (left)
1. Merge profiles with fablabs (left)
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
## Install packages
## Install packages
%% Cell type:code id: tags:
%% Cell type:code id: tags:
``` python
``` python
# Install packages
# Install packages
!sudopip3installpandas
!sudopip3installpandas
!sudopip3installopenpyxl
!sudopip3installopenpyxl
```
```
%% Output
%% Output
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: pandas in /usr/local/lib/python3.7/dist-packages (1.2.3)
Requirement already satisfied: pandas in /usr/local/lib/python3.7/dist-packages (1.2.3)
Requirement already satisfied: numpy>=1.16.5 in /usr/local/lib/python3.7/dist-packages (from pandas) (1.20.1)
Requirement already satisfied: numpy>=1.16.5 in /usr/local/lib/python3.7/dist-packages (from pandas) (1.20.1)
Requirement already satisfied: python-dateutil>=2.7.3 in /usr/lib/python3/dist-packages (from pandas) (2.7.3)
Requirement already satisfied: python-dateutil>=2.7.3 in /usr/lib/python3/dist-packages (from pandas) (2.7.3)
Requirement already satisfied: pytz>=2017.3 in /usr/local/lib/python3.7/dist-packages (from pandas) (2021.1)
Requirement already satisfied: pytz>=2017.3 in /usr/local/lib/python3.7/dist-packages (from pandas) (2021.1)
[33mWARNING: Running pip as root will break packages and permissions. You should install packages reliably by using venv: https://pip.pypa.io/warnings/venv[0m
[33mWARNING: Running pip as root will break packages and permissions. You should install packages reliably by using venv: https://pip.pypa.io/warnings/venv[0m
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: openpyxl in /usr/local/lib/python3.7/dist-packages (3.0.7)
Requirement already satisfied: openpyxl in /usr/local/lib/python3.7/dist-packages (3.0.7)
Requirement already satisfied: et-xmlfile in /usr/local/lib/python3.7/dist-packages (from openpyxl) (1.0.1)
Requirement already satisfied: et-xmlfile in /usr/local/lib/python3.7/dist-packages (from openpyxl) (1.0.1)
[33mWARNING: Running pip as root will break packages and permissions. You should install packages reliably by using venv: https://pip.pypa.io/warnings/venv[0m
[33mWARNING: Running pip as root will break packages and permissions. You should install packages reliably by using venv: https://pip.pypa.io/warnings/venv[0m
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
## Install newest pip (optional)
## Install newest pip (optional)
%% Cell type:code id: tags:
%% Cell type:code id: tags:
``` python
``` python
!sudo/usr/bin/python3-mpipinstall--upgradepip
!sudo/usr/bin/python3-mpipinstall--upgradepip
```
```
%% Output
%% Output
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: pip in /usr/local/lib/python3.7/dist-packages (21.1.1)
Requirement already satisfied: pip in /usr/local/lib/python3.7/dist-packages (21.1.1)
[33mWARNING: Running pip as root will break packages and permissions. You should install packages reliably by using venv: https://pip.pypa.io/warnings/venv[0m
[33mWARNING: Running pip as root will break packages and permissions. You should install packages reliably by using venv: https://pip.pypa.io/warnings/venv[0m
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
## Install libraries
## Install libraries
%% Cell type:code id: tags:
%% Cell type:code id: tags:
``` python
``` python
importpandasaspd
importpandasaspd
importdatetime
importdatetime
importos
importos
```
```
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
## Prepare dataframe 'profiles' from https://gitlab.fabcloud.org
## Prepare dataframe 'profiles' from https://gitlab.fabcloud.org
Options
Options
* Read xlsx data from gitlab.fabcloud.org to pandas dataframe 'profiles'
* Read xlsx data from gitlab.fabcloud.org to pandas dataframe 'profiles'
* Save dataframe 'profiles' to data/profiles.csv
* Save dataframe 'profiles' to data/profiles.csv
* Read dataframe 'profiles' from data/profiles.csv
* Read dataframe 'profiles' from data/profiles.csv