A Metatab Example Data Package

An example data package, from the Metatab tutorial at https://github.com/CivicKnowledge/metatab-py/blob/master/README.rst

Declare: metatab-latest Identifier: 96cd659b-94ad-46ae-9c18-4018caa64355 Name: 2017-us-1 Datasetname: example-data-package Version: 1 Space: US Time: 2017 Spatialgrain: None Section: Documentation|Title|Description||| Homepage: http://metatab.org Homepage.Title: Metatab Home Page Homepage.Description: Main Metatab home page Documentation: https://github.com/CivicKnowledge/metatab-py/blob/master/README.rst Documentation.Title: Metatab Python Package README Documentation.Description: The README in the Metatab Githup repo contains the tutorial for generating this package. Section: Contacts|email|||| Origin: example.com Creator: Eric Busboom Creator.Email: eric@civicknowledge. com Wrangler: Eric Busboom Wrangler.Email: eric@civicknowledge. com Section: Notes||||| Note: None
Section: Resources|Name|StartLine|HeaderLines|Encoding|Description Datafile: http://public.source.civicknowledge.com/example.com/sources/test_data.zip#test_data%2Fcsv%2Frandom-names.csv Datafile.Name: random-names Datafile.Startline: 1 Datafile.Headerlines: 0 Datafile.Encoding: ascii Datafile.Description: Names and a random number Datafile: http://public.source.civicknowledge.com/example.com/sources/test_data.zip#test_data%2Fcsv%2Frenter_cost.csv Datafile.Name: renter_cost Datafile.Startline: 5 Datafile.Headerlines: 3,4 Datafile.Encoding: ascii Datafile.Description: Portion of income spent on rent, extracted from the ACS Datafile: http://public.source.civicknowledge.com/example.com/sources/test_data.zip#test_data%2Fcsv%2Fsimple-example-altnames.csv Datafile.Name: simple-example-altnames Datafile.Startline: 1 Datafile.Headerlines: 0 Datafile.Encoding: ascii Datafile.Description: Random UUIDs, integers and numbers Datafile: http://public.source.civicknowledge.com/example.com/sources/test_data.zip#test_data%2Fcsv%2Fsimple-example.csv Datafile.Name: simple-example Datafile.Startline: 1 Datafile.Headerlines: 0 Datafile.Encoding: ascii Datafile.Description: Random UUIDs, integers and numbers Datafile: http://public.source.civicknowledge.com/example.com/sources/test_data.zip#test_data%2Fcsv%2Funicode-latin1.csv Datafile.Name: unicode-latin1 Datafile.Startline: 1 Datafile.Headerlines: 0 Datafile.Encoding: latin1 Datafile.Description: The same data as unicode-utf8, but re-encoded to latin1 Datafile: http://public.source.civicknowledge.com/example.com/sources/test_data.zip#test_data%2Fcsv%2Funicode-utf8.csv Datafile.Name: unicode-utf8 Datafile.Startline: 1 Datafile.Headerlines: 0 Datafile.Encoding: utf8 Datafile.Description: Famous names, latinized and in original character sets. Datafile: http://public.source.civicknowledge.com/example.com/sources/test_data.zip#test_data%2Fexcel%2Frenter_cost_excel07.xlsx%3BSheet1 Datafile.Name: renter_cost_excel07 Datafile.Startline: 5 Datafile.Headerlines: 3,4 Datafile.Encoding: ascii Datafile.Description: Same data as renter_cost, but sourced from an XLS file Datafile: http://public.source.civicknowledge.com/example.com/sources/test_data.zip#test_data%2Fexcel%2Frenter_cost_excel97.xls%3BSheet1 Datafile.Name: renter_cost_excel97 Datafile.Startline: 5 Datafile.Headerlines: 3,4 Datafile.Encoding: ascii Datafile.Description: Same data as renter_cost, but sourced from an XLSX file Datafile: http://public.source.civicknowledge.com/example.com/sources/test_data.zip#test_data%2Ftab%2Frenter_cost.tsv Datafile.Name: renter_cost-2 Datafile.Startline: 5 Datafile.Headerlines: 3,4 Datafile.Encoding: ascii Datafile.Description: Same data as renter_cost, but sourced from an XLS file tab le

In [ ]:
import seaborn as sns
import metapack as mp
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from IPython.display import display 

%matplotlib inline
%load_ext metapack.jupyter.magic
sns.set_context('notebook')
mp.jupyter.init()
mp.jupyter.convert.convert_notebook_to_metadata()

In [1]:
# Code goes after metadata, before schema

In [ ]: