CityStats: much progress
After some thought, it's become clear that the best approach to building a user-friendly wizard that filters the complexity of the data a little, and presents only those options which actually make sense and are available, is to build a set of extra index tables that are derived from the existing data, but which are much quicker and easier to query. I've started this process, by writing a PHP function which builds (so far) two new tables, yearsToEthnicities
and yearsToTables
. These will make it easy to look up which ethnicity codes were used in any particular year, and what their text designations were. Now I'm looking at the list of cities and their codes, which are currently in a PHP array rather than in a table. Wrote to JS-R for some guidance on how these work (multiple names map to one id, which may or may not be significant).