Configuring a Standalone Census Table

This article aims to show you how to configure and create your own standalone census table either in HTML for viewing on your local computer, or as a database that you can deploy online (or both).

Census tables show all of the census information for a selected individual's ancestors in a single table, making it easy, at a glance, to tell which ancestors need further research and where and when they are likely to be found. The tables are generated automatically from your genealogy data. All that is required is to add a record ID or name to the configuration. For an in-depth description please read What is a Census Table?.
Census Table (Family Historian)
Census Table (Family Historian)
Census Source
Census Source
Census Source Claims
Census Source Claims

Running Gigatrees

Building a census table is as easy as running one of the following commands. The configuration files listed in the commands can be found described below. You can simply copy and paste those configurations into similarily named text files and place them in the same folder as the application.

To build your census table in HTML

gigatrees5.exe -c config.xml

To create a database of your census table

gigatrees5.exe -c config.xml -c db.xml

Census Table Configuration

In order to configure a census table, whether doing so for HTML or a database, the first thing you will need to do is load the gigatrees plugin and the default theme and enable copying of the plugin files to your output folder. Next, in the default theme, $HOME_LINK$ is setup to link to the home page. However, when building standalone reports, the home page is not created, so you will need to override that placeholder as shown, filling in the record ID for the person for whom the census table is being built. If you are creating census tables for multiple persons in your database, a list of all the census tables will be created in the census folder. In this case, when building for HTML, you will need to replace the record ID with the word index. If you're building a database, you can simply remove the record ID rather than replace it. This is because the database does not support filenames of "index". Next, you will need to setup the website metadata. You should, of course, add your website's title and any other items that you wish to include, such as the site owner's name, the site description, banner and favicon. Since you probably have no need to access the source index page, you can hide the sidebar menu by including the hide.sidebar.css stylesheet (found in the gigatrees plugin folder) for a cleaner look. Next, you will need to enter your GEDCOM filename and, if needed, change the output folder. You will also need to enable just the <Pages> you want to create. Since this demonstration is for census pages and their associated source pages, those are the only two enabled below. Since profile pages are disabled, each individual's record id number will be shown preceding their name. You can also hide this under the miscellaneous option, for a cleaner look. Since you are creating source pages, you may also want to hide all unused sources, both to keep the number of files created/database size, small, and to ensure that you do not include something unintended. If your sources use images not included in your GEDCOM file, then you will need to load these as well. There are several <Media> options available for doing this. The final section to setup is the census table itself. First you will want to add the census years you're interested in. The setup shown here is for the U.S. Federal Census, but you can choose any years you like (Gigatrees is not nationalistic). Next you can add the individual's record ID or name (names must be unique) for whom you want the census table built. To create multiple census tables, add additional record IDs or names separated by semicolons ( ; ). The final section shown here allows you to skip individual years for selected ancestors (See What is a Census Table? for more info).

config.xml

<Gigatrees>
  <Plugins>
    <Plugin> plugins\gigatrees </Plugin>
    <Plugin> plugins\theme.a   </Plugin>
	
    <CopyPlugins> true </CopyPlugins>
  </Plugins>
	
  <Placeholders>
    <Placeholder> <Name> $HOME_LINK$ </Name> <Content> <![CDATA[ %RootPath%/census/record ID%Extension% ]]> </Content> </Placeholder>  
  </Placeholders>

  <Setup>
    <SiteTitle>       Census Table </SiteTitle>
    <SiteOwner>       ...          </SiteOwner>
    <SiteDescription> ...          </SiteDescription>
    <SiteBanner>      ...          </SiteBanner>
	
    <Favicon>         %PluginsURL%gigatrees/imgs/favicon.png </Favicon>
	
    <DropHeader><![CDATA[ <link href="%PluginsURL%gigatrees/hide.sidebar.css" rel="stylesheet" /> ]]></DropHeader>
  </Setup>
 
  <Main>
    <GedcomFile> family.ged </GedcomFile>
    <OutputPath> web        </OutputPath>
  </Main>  
  
  <Pages>
    <Tree>         false </Tree>
    <Names>        false </Names>
    <Profiles>     false </Profiles>
    <Sources>       true </Sources>
    <Blog>         false </Blog>
    <Places>       false </Places>
    <Ancestors>    false </Ancestors>
    <DNAAncestors> false </DNAAncestors>
    <DNARelatives> false </DNARelatives>
    <Kinships>     false </Kinships>
    <Census>        true </Census>
    <Descendants>  false </Descendants>
    <Photos>       false </Photos>
    <Gallery>      false </Gallery>
    <Validation>   false </Validation>
    <Updates>      false </Updates>
  </Pages>

  <Misc>
    <HideRecordIds>     true </HideRecordIds>
  </Misc>
  
  <Media>
    <MediaFile> photos.txt </MediaFile>
  </Media> 

  <CensusTables>
    <CensusYears> 1790,1800,1810,1820,1830,1840,1850,1860,1870,1880,1890,1900,1910,1920,1930,1940,1950 </CensusYears>

    <Ids> record ID/name </Ids>

    <Skip> <Id>    I23 </Id> <Years> 1870, 1880 </Years> </Skip>
    ...
    <Skip> <Id> I22155 </Id> <Years> 1790       </Years> </Skip>		
  </CensusTables>  
</Gigatrees>

If you're setting up your census table(s) for HTML, you're done. Easy-peasy. If you want to build a database for hosting your census table online (as I have done for this demonstration), then you will need to configure it first.

Database

If you want to publish your census table online, you will need to create a database. This will require a few additional steps. If you already have plugins installed on your server, you may want set the <CopyPlugins> option to false. I install all my plugins at the root level, so that I do not need to have multiple sets for each demo. Next, define some placeholders to simplify the setup. You will need to set your /super/secret/server/path to match that provided to you by your hosting service and fill in your domain, database-name and your database extension (i.e. db, sqlite, etc.). The domain name must always point to the root domain. Next, the setup assumes you are going to install your census table into a subfolder of your root domain that has the same name as your database. You can change the folder name here if you like, or remove the <RootPath> if installing at the root domain. This setup also assumes that your plugins are installed at the root level (like mine). If you are putting them into your subfolder, don't disable copying of plugins, and clear the <PluginsURL> option to use the default setting. The next step is to enable the database. You should not need to make any changes here as it uses the placeholders you setup prior. Lastly, anytime you are publishing your website online, you should enable the privatization <Security> setting and hide living individuals. This will obsfucate their names and strip sensitive data as well as other information you may have flagged as private.

db.xml

<Gigatrees>
  <Plugins>
    <CopyPlugins> false </CopyPlugins>
  </Plugins>  
  
  <Placeholders>
    <Placeholder> <Name> $SERVER$    </Name> <Content> /super/secret/server/path </Content> </Placeholder>
    <Placeholder> <Name> $DOMAIN$    </Name> <Content> https://domain.com        </Content> </Placeholder>
    <Placeholder> <Name> $SITE$      </Name> <Content> database-name             </Content> </Placeholder>
    <Placeholder> <Name> $DATABASE$  </Name> <Content> $SITE$.ext                </Content> </Placeholder>
  </Placeholders>
 
  <Setup>
    <Domain>      $DOMAIN$  </Domain>
    <RootPath>    /$SITE$   </RootPath>
    <PluginsURL> 	/plugins/ </PluginsURL>
  </Setup>	
  
  <Database>
    <EnableServerDatabase> true          </EnableServerDatabase>
    <LocalDatabasePath>    %OutputPath%  </LocalDatabasePath>
    <ServerDatabasePath>   $SERVER$      </ServerDatabasePath> 
    <ServerDatabaseName>   $DATABASE$    </ServerDatabaseName>
  </Database>  
  
  <Security>
    <Privatize>  true </Privatize>
    <HideLiving> true </HideLiving>
  </Security>  
</Gigatrees>

When building a database for deployment, you will need to deploy it. See the Quick Start Guide for simple instructions on doing so. Whether building a census table for HTML or a database, you've created a useful snapshot of all the available ancestors and years for which you are likely to find census records, along with location codes and links to the source records found in your database. Doing so should go along way in helping you know where and for whom missing records should be searched. Happy searching.

Comments