Terry's ORA Tips

Template Example – Census Event

This page created 10 Aug 2020

Version note: Applies to ORA 1.07 and later

This article describes one of my example Templates for Online Repository Assistant (ORA). The other example Templates can be found in the index of Example Templates. Other articles in my ORA Section cover various topics about using the software. The "How it Works" section below includes links to articles describing the ORA features used in these Templates.

Description:

The Templates described here are designed to type data from U.S. Census records for the years 1850 through 1940 on Ancestry.com, to complete Census Tags for that census in The Master Genealogist (TMG). This is part of my complete set of Templates for census records, which are described more completely in my article on Using ORA with Census Records.

The Templates are designed to enter the data into the various fields used by my Census Tag for 1850 and Later, which is described in the TMG section of this website. It is designed to include all the members of a household in a single Tag, and also to include some attributes of their living situation. It does not include all the details from the census record, many of which I record in other Tags. The Templates could be adapted to enter into Census Tags of other designs.

A separate Template is provided for each census year.

Example Output:

Type:

Auto Type, designed for use with TMG

Use:

In TMG, open a Tag Entry screen for a Census Tag, and enter a Date.

In your browser, navigate to the census record for the head of household of the household for which the Source Definition is being created. In the ORA Control Panel, click the Auto Type button associated with this Template. The Template types in place information, as well as other information about the family's living situation, depending on what is recorded for that census year. The illustration above provides an example of the result for a 1920 census.

If other persons are to be entered in the Census Tag they are entered manually. The Citation is also entered manually. For a fuller description see the Census Event Templates section of my article on Using ORA with Census Records.

Limitations:
How it Works:

The Templates gather data from fields available in the ORA Control Panel and format it to create output for the place and Memo fields in the census Tag Entry screen. The methods used are explained for each field below. When the available data in various years requires different methods, each is explained. The actual Templates at the end of this article account for different field names in various census years, but those differences are not noted in this section unless a different method is required to extract the data. The {tab} Control Sequences used to advance from field to field are included in the Templates below, but are not shown in the following discussion for each field.

Testing for Township

Many census records in rural areas used townships as the local area. Townships are generally not the same as towns, though in some cases there are both towns and townships of the same name. Ancestry.com indexes do not distinguish between towns and townships, even though the census image generally does. When the locality is a township I want to record that in my Census Tag. I tried to remember to check and enter it manually when indicated, but found I often forgot to do that.

So I added a prompt to the Template to ask whether the locality is a township or not. To avoid asking when the Template can determine automatically that the location cannot be a township, a Value Test Variable tests for the term "Ward" in the second part of the locality, which would indicate the locality is a city. The term "Ward," if present, is found by using a :split Transformation to find a segment separated by a space with the second part being the term "Ward."

If "Ward" is not found, an Assignment Variable creates a prompt so the user can enter whether or not the locality is a township. That is done with the following Template segment:

<[?:Residence:split: :2=Ward]|[=:Township Y or N]>

These two variables are enclosed in Conditional Alternate expressions. If the first term, the Value Test, finds the value "Ward" it returns "true" and the Conditional is satisfied and no prompt is created. But if it does not find that value it returns "false" and the second term comes into play, and the prompt is generated.

Removing the Country from the Place Field

In some census years Ancestry includes the country, shown as "USA," at the end of the place field, while in most it does not. In order to use the same Template segments without editing for each year, for years in which the country is included it is removed by use of a :replace Transformation, using the following segment:

[=:Residence:[Residence:replace:, USA::l]]

With the preliminaries completed, we can now describe the actual workings of the the template. It is designed to type into a census Tag Entry screen, with the cursor initially in the Date field. The first thing it does is use the Control Sequence for a Tab keystroke repeatedly to move to the first place field it will use. Then number of tabs required varies by census year, depending on whether or not street addresses were recorded for that year.

Street Address

The first U.S. census to include street addresses was 1900. For that and following years the Templates include this segment to output the address when it is present in the record:

<[House Number] >[Street:replace:\bstreet:st:gi:replace:\bst:St.:gi
:replace:Avenue:Ave:gi:replace:\bave:Ave.]

The first Variable in this expression is [House Number], which outputs the actual house number if it is present in the record. That Variable and the following literal space character are enclosed in Conditional brackets so that the space is not output if there is no value for the house number.

The second Variable, [Street], is modified with a chain of :replace Transformations to change the way the terms "Street" and "Avenue," if present, are output. The first, in green, replaces the word "street" if found with the abbreviation "st" – without a period. The next, in yellow, replaces "st" whether produced by the preceding Transformation or present in the record, with the term "St." – capitalized and with the period. It is done in two steps because I have found "Street" indexed as "Street" in some cases and "St" in others. I have not found it indexed as "St." – with the period – so have not bothered to deal with that case.

Note that the " i " flag (case-insensitive) is used with these transformations so that the search patterns "street" and "st" match regardless of the case found in the field.

After the two :replace Transformations for "street" is a similar pair for "avenue," which works exactly the same way. In either case, if the search terms are not found, no change is made to the field as recorded in the record.

For the 1920 census the [House Number] Variable also has a :replace Transformation:

<[House Number:replace:\bX] >

This is done because I have found that in some cases the 1920 indexes on Ancestry sometimes include the letter " X " when there is no actual number in the record. This Transformation removes that " X " leaving the number field empty, so nothing is output.

Locality, or City

The "city" field could be output with the simple segment:

[Residence:split:,:-3]

However, I have chosen to use instead a more complex expression that is intended to deal with some commonly encountered "locality" names that I want to modify:

<[?:Residence:splitCount:,=2]|[?:Residence:split: :2=ward]
[Residence:split: :1]|[?:Residence:split: :1=district]|
[?:Residence:split: :2=District,]|[Residence:split:,:1]>
<[?:Township Y or N=y] Twp.>

The first three lines above, all in one long conditional expression, modify the name of the "city" in two ways. It removes the term "ward" if present, and anything following it. While I include the Ward number when it exists in my census Source Definition, I prefer not to include it in my census Tag. Then the Template searches for the term "District" and if found outputs nothing. I do this because I find that "Districts" as recorded in some rural census records are not town or city names and are generally not meaningful today. The workings of this expression are explained in detail in my example template article on Enhanced City Names.

The fourth line above, in green, uses  a Value Test Variables to test whether the user entered "y" to the prompt as to whether the locality was a township, as described above. If so, the literal text " Twp." is added. 

County

The name of the county is extracted from the "Residence" field with the :split Transformation to find the second-from-last element, with this Template segment:

[Residence:split:,:-2] <[?:Residence:split:,:-1=Louisiana]Parish|Co.>

The second term adds with literal text either "Co." or "Parish." A Value Test Variable tests the name of the state, also extracted from the "Residence" field with a :split Transformation, for "Louisiana." If true "Parish" is output, otherwise "Co." is output by the second part of the Alternatives Conditional.

State

The name of the state is extracted from the "Residence" field with the :split Transformation to find the last element, with this Template segment:

[Residence:split:,:-1]

Memo

I use the Memo field in the census Tag to record information about the family's situation at the time that is recorded in the census record, such as owing or renting their home, rooming or boarding with another family, or property owned. The information recorded varies by census year, and only some of what is recorded is indexed and available to ORA. The Template segments used to output the information that is available for each census year are described below.

In the 1850 census, the only such information recorded is the value of real estate owned. The value owned by the head of household is entered in the Memo with the following Template segment:

<reporting real estate valued at $[Real Estate Value
:replace:([0-9]{1,3})([0-9]{3}):$1,$2]>

The literal text "reporting real estate valued at $" is enclosed in conditional brackets with the Variable so if there is no value the text does not appear in the output. The value of the Variable [Real Estate Value] is modified by a :replace Transformation to place commas in numbers of four digits or more. The Transformation uses a Regular Expression to search for a group of one to three digits 0 through 9 (the segment in yellow above), followed by a group of three digits (the segment in green). If found, it then outputs the two groups separated by a literal comma character (with the segment in blue). This expression does not correctly deal with numbers larger than six digits.

The 1860 and 1870 censuses recorded the value of personal property as well as the value of real estate. To output both values, and account for either or both of them possibly being empty, the following Template segment is used:

<reporting <real estate valued at $[Real Estate Value:replace:([0-9]{1,3})([0-9]{3}):$1,$2]><[+: and ]personal estate of $[Personal Estate Value:replace:([0-9]{1,3})([0-9]{3}):$1,$2]>>

Because the literal text "reporting " is to appear only if one or both Variables has a value, it is within Conditional brackets that enclose the entire expression. It is followed by the expression for the real estate value, which is otherwise the same as described for 1850. That is followed by a similar expression for the Variable [Personal Estate Value], which works the same as the one for real estate except for the segment shown in yellow above. That segment uses a Plus Variable to add the literal text " and " when the segment for real estate value has produced output. If it has not, this variable produces no output.

No such information was recorded in the 1880 census, so there is no Memo term in the Template for that year.

The 1900 through 1920 censuses recorded whether the family home was owned or rented, whether it was a house or on a farm, and whether it was mortgaged. This information is entered into the Memo field by the following Template segment:

reporting they <[?:House Owned or Rented=R]rented|[?:House Owned or Rented=O]owned> their <[?:Farm or House=H]home|[?:Farm or House=F]farm><[?:Home Free or Mortgaged=F], free of mortgage|[?:Home Free or Mortgaged=M], which was mortgaged>

This segment begins with the literal text "reporting they " followed by three Alternative Conditionals with produce output for the own or rent, house or farm, and mortgaged information, shown in separate colors above. In each of the Alternatives, Value Test Variables test for the values of the respective fields and output appropriate literal text depending on which value was found.

The 1930 census recorded whether the home was rented or owned, the value of the home if owned and the monthly rent if rented. It also recorded whether the family owned a radio. This information is entered into the Memo field by the following Template segment:

reporting they <[?:Home Owned or Rented=Rented]rented their home, for $[Home Value] per month|[?:Home Owned or Rented=Owned]owned a home valued at $[Home Value:replace:([0-9]{1,3})([0-9]{3}):$1,$2]>, and <[?:Radio Set=Yes]owned a radio|[?:Radio Set=No]did not own a radio>

This segment is structured similarly to the one for 1900 through 1920, but with only two sets of Alternative Conditionals, each using a pair of Value Test Variables and outputting different text depending on the values found. The first tests for whether the home was rented or owned. The first element of that Alternative, in green above, tests for the home being rented, and if so it outputs the literal text "rented their home, for $" followed by the amount of rent from the [Home Value] field, and the text " per month". If the home was not recorded as rented, the second element, in blue above, comes into play and tests for it being owned, and if so outputs the literal text "owned a home valued at $" followed by the value of the home, again from the [Home Value] field. The home value is modified by a :replace Transformation to insert a comma if over three digits, as described above for the value of real estate in the 1850 census.

The second Alternative Conditional statement, in yellow above, tests for whether a radio set was owned, and outputs appropriate literal text depending on the result of that test.

The 1940 census recorded the same information about home ownership and value, but not the information about owning a radio set. But it did ask about where the family lived in 1935. This information is entered into the Memo field by the following Template segment:

reporting they <[?:House Owned or Rented=Rented]rented their home, for $[Value of Home or Monthly Rental if Rented] per month|[?:House Owned or Rented=Owned]owned a home valued at $[Value of Home or Monthly Rental if Rented:replace:([0-9]{1,3})([0-9]{3}):$1,$2]>, and that they had lived in <[?:Residence in 1935=Same House]the same house|[?:Residence in 1935=Same Place]the same city|###> in 1935

The first Alternative Conditional, again shown in green and blue above, is the same as described for 1930 except the names of the fields, and thus the names of the Variables, are different.

The question about residence in 1935 was recorded as "same house" if that was the case, or "same place" if the person lived in a different house in the same locality. If the person had moved to a different locality since 1935 the former place was to be recorded, in different formats depending on whether that place was rural, in a small town, or a city. My Template deals with only the first two responses, and does not deal correctly with cases where the family has moved from another locality. Further, it assumes that the information for the head of household also applies to all other members of the household, because ORA can collect information about only one person at a time. If the family moved from another locality, or if the information for various family members differs, manual correction is required after the Template completes its entry.

The part of the Template dealing with residence in 1935 is shown in yellow above. It consists of the literal text ", and that they had lived in" followed by a three-part Alternative Conditional. The Conditional tests the value of the [Residence in 1935] Variable, outputting appropriate text if the value is "same house" or "same place." If neither is true it outputs the text "###" to call attention to the need for manual editing.

The user must review the census image to see if further editing is required because the information for some members of the household is different than that for the head of household.

Templates:

The following are the complete Templates for each census year. They can be copied from the areas below and pasted into an Auto Type Template in the OraSettings window. The separation of the coding into "paragraphs" is used only to make the coding easier to understand. The paragraph breaks are ignored by ORA when the Template is used.

I include the Control Sequence {fast} to speed up the typing in all the Templates below. This works on my system, but you may need to remove it if your system doesn't tolerate this typing speed.

For each of these Templates I use the following Reminder field in the OraSettings window:

Source Definition, start from Tag Entry Screen

1850:

<[?:Residence:split: :2=Ward]|[=:Township Y or N]>

[=:Residence:[Residence:replace:, USA::l]]

{fast}{tab*4}

<[?:Residence:splitCount:,=2]|[?:Residence:split: :2=ward][Residence:split: :1]|[?:Residence:split: :1=district]|[?:Residence:split: :2=District,]|[Residence:split:,:1]><[?:Township Y or N=y] Twp.>{tab}

[Residence:split:,:-2] <[?*Residence:split:,:-1=Louisiana]Parish|Co.>{tab}

[Residence:split:,:-1]{tab*6}

<reporting real estate valued at $[Real Estate Value:replace:([0-9]{1,3})([0-9]{3}):$1,$2]>

1860:

<[?:Residence:split: :2=Ward]|[=:Township Y or N]>

{fast}{tab*4}

<[?:Residence:splitCount:,=2]|[?:Residence:split: :2=ward][Residence:split: :1]|[?:Residence:split: :1=district]|[?:Residence:split: :2=District,]|[Residence:split:,:1]><[?:Township Y or N=y] Twp.>{tab}

[Residence:split:,:-2] <[?*Residence:split:,:-1=Louisiana]Parish|Co.>{tab}

[Residence:split:,:-1]{tab*6}

<reporting <real estate valued at $[Real Estate Value:replace:([0-9]{1,3})([0-9]{3}):$1,$2]><[+: and ]personal estate of $[Personal Estate Value:replace:([0-9]{1,3})([0-9]{3}):$1,$2]>>

1870:

<[?:Residence:split: :2=Ward]|[=:Township Y or N]>

{fast}{tab*4}

<[?:Residence:splitCount:,=2]|[?:Residence:split: :2=ward][Residence:split: :1]|[?:Residence:split: :1=district]|[?:Residence:split: :2=District,]|[Residence:split:,:1]><[?:Township Y or N=y] Twp.>{tab}

[Residence:split:,:-2] <[?:Residence:split:,:-1=Louisiana]Parish|Co.>{tab}

[Residence:split:,:-1]{tab*6}

<reporting <real estate valued at $[Real Estate Value:replace:([0-9]{1,3})([0-9]{3}):$1,$2]><[+: and ]personal estate of $[Personal Estate Value:replace:([0-9]{1,3})([0-9]{3}):$1,$2]>>

1880:

<[?:Residence:split: :2=Ward]|[=:Township Y or N]>

[=:Residence:[Residence:replace:, USA::l]]

{fast}{tab*4}

<[?:Residence:splitCount:,=2]|[?:Residence:split: :2=ward][Residence:split: :1]|[?:Residence:split: :1=district]|[?:Residence:split: :2=District,]|[Residence:split:,:1]><[?:Township Y or N=y] Twp.>{tab}

[Residence:split:,:-2] <[?:Residence:split:,:-1=Louisiana]Parish|Co.>{tab}

[Residence:split:,:-2]

1900:

<[?:Residence:split: :2=Ward]|[=:Township Y or N]>

{tab*3}<[House Number] >[Street:replace:\bstreet:st:gi:replace:\bst:St.:gi:replace:Avenue:Ave:gi:replace:\bave:Ave.]{tab}

<[?:Residence:splitCount:,=2]|[?:Residence:split: :2=ward][Residence:split: :1]|[?:Residence:split: :1=district]|[?:Residence:split: :2=District,]|[Residence:split:,:1]><[?:Township Y or N=y] Twp.>{tab}

[Residence:split:,:-2] <[?:Residence:split:,:-1=Louisiana]Parish|Co.>{tab}

[Residence:split:,:-1]{tab*6}

reporting they <[?:House Owned or Rented=R]rented|[?:House Owned or Rented=O]owned> their <[?:Farm or House=H]home|[?:Farm or House=F]farm><[?:Home Free or Mortgaged=F], free of mortgage|[?:Home Free or Mortgaged=M], which was mortgaged>

1910:

<[?:Residence:split: :2=Ward]|[=:Township Y or N]>

{tab*3}

<[House Number] >[Street:replace:\bstreet:st:gi:replace:\bst:St.:gi:replace:Avenue:Ave:gi:replace:\bave:Ave.]{tab}

<[?:Residence:splitCount:,=2]|[?:Residence:split: :2=ward][Residence:split: :1]|[?:Residence:split: :1=district]|[?:Residence:split: :2=District,]|[Residence:split:,:1]><[?:Township Y or N=y] Twp.>{tab}

[Residence:split:,:-2] <[?:Residence:split:,:-1=Louisiana]Parish|Co.>{tab}

[Residence:split:,:-1]{tab*6}

reporting they <[?:Home Owned or Rented=Rent]rented|[?:Home Owned or Rented=Own]owned> their <[?:Farm or House=House]home|[?:Farm or House=Farm]farm><[?:Home Free or Mortgaged=Free], free of mortgage|[?:Home Free or Mortgaged=Mortgaged], which was mortgaged>

1920:

<[?:Residence:split: :2=Ward]|[=:Township Y or N]>

{tab*3}

<[House Number:replace:\bX] >[Street:replace:\bstreet:st:gi:replace:\bst:St.:gi:replace:Avenue:Ave:gi:replace:\bave:Ave.]{tab}

<[?:Residence:splitCount:,=2]|[?:Residence:split: :2=ward][Residence:split: :1]|[?:Residence:split: :1=district]|[?:Residence:split: :2=District,]|[Residence:split:,:1]><[?:Township Y or N=y] Twp.>{tab}

[Residence:split:,:-2] <[?:Residence:split:,:-1=Louisiana]Parish|Co.>{tab}

[Residence:split:,:-1]{tab*6}

reporting they <[?:Home Owned or Rented=Rented]rented|[?:Home Owned or Rented=Owned]owned> their home<[?:Home Free or Mortgaged=Free], free of mortgage|[?:Home Free or Mortgaged=Mortgaged], which was mortgaged>

1930:

<[?:Residence:split: :2=Ward]|[=:Township Y or N]>

[=:Residence:[Residence:replace:, USA::l]]

{tab*3}<[House Number] >[Street address:replace:\bstreet:st:gi:replace:\bst:St.:gi:replace:Avenue:Ave:gi:replace:\bave:Ave.]{tab}

<[?:Residence:splitCount:,=2]|[?:Residence:split: :2=ward][Residence:split: :1]|[?:Residence:split: :1=district]|[?:Residence:split: :2=District,]|[Residence:split:,:1]><[?:Township Y or N=y] Twp.>{tab}

[Residence:split:,:-2] <[?:Residence:split:,:-11=Louisiana]Parish|Co.>{tab}

[Residence:split:,:-1]{tab*6}

reporting they <[?:Home Owned or Rented=Rented]rented their home, for $[Home Value] per month|[?:Home Owned or Rented=Owned]owned a home valued at $[Home Value:replace:([0-9]{1,3})([0-9]{3}):$1,$2]>, and <[?:Radio Set=Yes]owned a radio|[?:Radio Set=No]did not own a radio>

1940:

<[?:Residence:split: :2=Ward]|[=:Township Y or N]>

{tab*3}

<[House Number] >[Street:replace:\bstreet:st:gi:replace:\bst:St.:gi:replace:Avenue:Ave:gi:replace:\bave:Ave.]{tab}

<[?:Residence:splitCount:,=2]|[?:Residence:split: :2=ward][Residence:split: :1]|[?:Residence:split: :1=district]|[?:Residence:split: :2=District,]|[Residence:split:,:1]><[?:Township Y or N=y] Twp.>{tab}

[Residence:split:,:-2] <[?:Residence:split:,:-1=Louisiana]Parish|Co.>{tab}

[Residence:split:,:-1]{tab*6}

reporting they <[?:House Owned or Rented=Rented]rented their home, for $[Value of Home or Monthly Rental if Rented] per month|[?:House Owned or Rented=Owned]owned a home valued at $[Value of Home or Monthly Rental if Rented:replace:([0-9]{1,3})([0-9]{3}):$1,$2]>, and that they had lived in <[?:Residence in 1935=Same House]the same house|[?:Residence in 1935=Same Place]the same city|###> in 1935

 

ReigelRidge Home Terry's Tips Home Contact Terry

 

Fewer than ten copies of my book, A Primer for The Master Genealogist, remain.
If you have been thinking of getting a copy now would be a good time.

Details are can be seen here.

 

Copyright 2000- by Terry Reigel