In [159]:
import pandas as pd
import random
import json 
import random
import requests
import bs4
#import matplotlib.pyplot as plt

Current School Panda

Working with directory school data

Creative Commons in all schools

This script uses a csv file from Creative Commons New Zealand and csv file from Ministry of Education.

The ccnz csv file contains schools names that have cc licence, type of licence,

The Ministry of Education csv file contains every public school in New Zealand and info about them.

Standards for website addresses - if school name ends with school then cut it from name and add to . eg Horowhenua Collage horowhenua.collage.nz not horowhenuacollage.school.nz

Auckland Girls Grammar School

aucklandgirlsgrammar.school.nz not aucklandgirlsgrammarschool.school.nz

Everyschool has their own domain name and Linux server hosting the site. Private/Public keys. Static site, git repo. Nikola blog.

What made you choose that particular Creative Commons licence?

I like the CC:BY licence because it offers the most freedom to people.

I am not a fan of licenses that restrict commercial use. I believe everyone should be able to do what the like with my work with minimal interference.

If I could I would remove non-commercial licenses.

In the early days of my art blogging I would license under cc nc. This was wrong and I later changed this to a cc by licence.

With my photography I once had a photo I taken in the newpaper. It made the front page. I was offered money and seeked permission. I was fine with it of course - the license allows this. At the bottom of the photo it read: PHOTO: William Mckee. Perfect.

The only thing I ask is they attribute.

I like the idea of sharealike but at the end of the I really don't care and would hate to chase down people to license it wrong. Sure, I don't like it that people could take my stuff and make it not open. I think everything should be open and free.

My art site - artcontrol.me is currently down but when it was up I licenced the site under a cc:by. Elements of the site are still up - such as my YouTube channel.

I attended art school in Wellington - The Learning Connexion. My focus was on drawing and painting. I taught myself programming on the bus to art school. Even when I was drawing on the easel I would be 'drawing' python code. During breaks I would often get my laptop out.

I volunteered at Whaihanga Early Learning Centre. I spend the majority of my time there in the art area doing collabarth works with others. Oil Pastel, coloured pencil and pencil were my mediums of choice. Sometimes I would use paint, but it's quite messy.

Copyright shouldn't be default. Apply and pay if you want copyright. CC license by default. That will sort the world.


In [160]:
crcom = pd.read_csv('/home/wcmckee/Downloads/List of CC schools - Sheet1.csv', skiprows=5, index_col=0, usecols=[0,1,2])

Compare the schools on List of CC schools with list of all public/private schools.

Why shouldn't it be default for all public schools licence to be under a Creative Commons BY license?


In [161]:
#crcom

In [162]:
aqcom = pd.read_csv('/home/wcmckee/Downloads/List of CC schools - Sheet1.csv', skiprows=6, usecols=[0])

In [163]:
aqjsz = aqcom.to_json()

In [164]:
dicthol = json.loads(aqjsz)

In [165]:
dschoz = dicthol['School']

In [166]:
#dicthol

In [167]:
dscv = dschoz.values()

In [168]:
ccschool = list()

In [169]:
for ds in range(87):
    #print(dschoz[str(ds)])
    ccschool.append((dschoz[str(ds)]))

In [170]:
schccd = dict()

In [171]:
scda = dict({'cc' : True})

In [172]:
sanoc = dict({'cc' : False})

In [173]:
#schccd.update({ccs : scda})

In [174]:
for ccs in ccschool:
    #These schools have a cc license. Update the list of all schools with cc and value = true.
    #Focus on schools that don't have cc license.
    #Filter schools in area that don't have cc license.
    #print (ccs)
    schccd.update({ccs : scda})

In [175]:
ccschz = list()

In [176]:
for dsc in range(87):
    #print (dschoz[str(dsc)])
    ccschz.append((dschoz[str(dsc)]))

In [177]:
#Append in names of schools that are missing from this dict. 
#Something like
#schccd.update{school that doesnt have cc : {'cc' : False}}
#schccd

Cycle through only first 89 values - stop when reaching : These are schools that have expressed an interest in CC, and may have a policy in progress.

New spreadsheet for schools in progress of CC license. Where are they up to? What is the next steps?

Why are schools using a license that isn't CC:BY. They really should be using the same license. CC NC is unexceptable. SA would be OK but majority of schools already have CC BY so best to go with what is common so you don't have conflicts of licenses.


In [178]:
noclist = pd.read_csv('/home/wcmckee/Downloads/Directory-School-current.csv', skiprows=3, usecols=[1])

In [179]:
webskol = pd.read_csv('/home/wcmckee/Downloads/Directory-School-current.csv', skiprows=3, usecols=[6])

In [180]:
websjs = webskol.to_json()

In [181]:
dictscha = json.loads(websjs)

In [ ]:


In [182]:
numsweb = dictscha['School website']

In [183]:
lenmuns = len(numsweb)

In [184]:
#for nuran in range(lenmuns):
#    print (numsweb[str(nuran)])

In [185]:
#noclist.values[0:10]

In [186]:
aqjaq = noclist.to_json()

In [187]:
jsaqq = json.loads(aqjaq)

In [188]:
najsa = jsaqq['Name']

In [189]:
alsl = len(najsa)

In [190]:
allschlis = list()

In [191]:
for alr in range(alsl):
    allschlis.append(najsa[str(alr)])

In [192]:
#allschlis

In [193]:
newlis = list(set(allschlis) - set(ccschool))

In [194]:
empd = dict()

Create restfulapi of schools thaat have cc and those that don't

Merge two dicts together. Both are {name of school : 'cc' : 'True'/'False'}


In [ ]:


In [195]:
sstru = json.dumps(schccd)

In [196]:
for newl in newlis:
    #print (newl)
    empd.update({newl : sanoc})

In [197]:
empdum = json.dumps(empd)

In [203]:
trufal = empd.copy()
trufal.update(schccd)

In [207]:
trfaj = json.dumps(trufal)

In [209]:
savjfin = open('/home/wcmckee/ccschool/index.json', 'w')
savjfin.write(trfaj)
savjfin.close()

In [200]:
#savtru = open('/home/wcmckee/ccschool/cctru.json', 'w')
#savtru.write(sstru)
#savtru.close()

In [148]:
#for naj in najsa.values():
    #print (naj)
#    for schk in schccd.keys():
        #print(schk)
#        allschlis.append(schk)

In [149]:
#for i in ccschz[:]:
#    if i in allschlis:
#        ccschz.remove(i)
#        allschlis.remove(i)

In [150]:
#Cycle though some schools rather than everything. 
#Cycle though all schools and find schools that have cc 
#for naj in range(2543):
    #print(najsa[str(naj)])
#    for schk in schccd.keys():
#        if schk in (najsa[str(naj)]):
            #Remove these schools from the list
#            print (schk)

In [ ]:


In [ ]: