<jupyter_start><jupyter_text>nzpostaddyyay maps, something I haven't really used before. Good to try something new. Using some demo examples from nz post. Examples are printed below. script to search for addresses.Gets address from nzpost then displays static map from mapquestapi<jupyter_code>import json
import shutil
import requests
opjsres = open('/home/wcmckee/github/nzpostad.json', 'r')
opjrd = opjsres.read()
nzpod = json.loads(opjrd)
nzpod
nzpaddy = nzpod['addresses']
nzplen = len(nzpod['addresses'])
nzplen
for nzp in range(0, nzplen):
    nzitm = (nzpaddy[nzp])
    print(nzitm['full_address'])
opsuccessad = open('/home/wcmckee/github/nzpostsuccess.json', 'r')
opsucrd = opsuccessad.read()
opjslo = json.loads(opsucrd)
opjslo
opja = opjslo['address']
opja
latad = opja['latitude']
longad = opja['longitude']
latad
longad
mapk = open('/home/wcmckee/github/mapkey.txt', 'r')
mapkrd = mapk.read()
reqimg = 'http://www.mapquestapi.com/staticmap/v4/getmap?key=' + mapkrd + '&size=400,200&zoom=10&center=' + str(latad) + ',' + str(longad) 
rmnz = reqimg.replace('\n', '')
response = requests.get(rmnz, stream=True)
with open('img.png', 'wb') as out_file:
    shutil.copyfileobj(response.raw, out_file)
del response<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.14548361310951238, 'fraction_numerical': 0.007993605115907274, 'mean_word_length': 5.917127071823204, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '277018', 'license': 'MIT', 'n_tokens_mistral': 493, 'n_tokens_neox': 474, 'n_words': 106, 'path': 'posts/nzpostaddy.ipynb', 'repo_name': 'wcmckee/wcmckee.com', 'size': '1251'}