GenoPro Home
GenoPro Home  |  Get Started With My Genealogy Tree  |  Buy  |  Login  |  Privacy  |  Search  |  Site Map
 
Is there a way to make a graph of a village's population?


https://support.genopro.com/Topic34778.aspx
Print Topic | Close Window

By NiKo - Monday, March 16, 2015
I'm doing a one-place study for two small villages, and will hopefully have all the residents from 1828 until now, at some point.

Is there a way to create a graph (x= year, y =population) of the residents in each village?

Thanks in advance
By genome - Monday, March 16, 2015
Easiest way would be to write a small Report skin template to create a csv file with year and calculated population fields and run this skin against each village genomap (or each village .gno if held in separate files).  
You can then use your favourite spreadsheet software to produce the graphs from the csv files.

Happy to help with this further if required.  You would of course need to know when each person lived the village e.g. born in village? died in village? moved into village? moved away from village? Essentially you would need occupancy data for each person. 
By NiKo - Tuesday, March 17, 2015
Ok, great :-)

I have one large file with about 3,000 people in it (alive and dead).  There are about 70 genomaps in that file, one for each major family.  Some people were born, lived, and died in the village.  Some moved to a larger city, and others emigrated to another country.

Would there be a way to show where the emigrants lived, and their descendants? While ignoring the non-village spouses and their ancestors?  Or would this be too complicated?

For example, girl X was born in the village and lived there till she was 18 .. moved to a larger city .. met a man from another village, married, and emigrated to the US, or Canada, where they had say 3 kids.  The man and his parents are also in the tree, but I'd prefer not to count them.

Sample CSV output?
Year ... Village ...  City...  US/Canada
Up till she's 18 ... 1 .. 0 .. 0 .. in village
18 ... 0 ... 1 ..0 ... in city
Marries .. 0 .. 1... 0
Emigrates .. 0 .. 0 .. 1
Has kid 1 .. 0 .. 0 .. 2
Has kid 2 .. 0 .. 0 .. 3
Has kid 3 .. 0 .. 0   4

Would this be possible? or too cumbersome/complicated?
By genome - Tuesday, March 17, 2015
Tracking descendants in that way could get complicated. I was asuming that the skin would calculate the yearly totals for nominated places (e.g. the two villages) 

the CSV would be simply

Place, Year, Count

e.g.

Place, Year, Count
village1, 1828,20
village1, 1829,22
..
..
village1, 2014,301
village2,1828,54
village2,1829,54
..
,,
village2,2014,967

thus providing a solution to your original requirement.

Even for this approach the data would need to be complete for all individuals, e.g. birth date present in nominated place and still alive,birth and death dates present for same nominated place, birth in nominated place and contact/occupancy record indicating emigration, contact/occupancy for nominated place and death in same place or still alive indicating immigration.


By NiKo - Tuesday, March 17, 2015
Ok cool. Would it be possible to change the output to be:

Year, village 1 count, village 2 count
1810,  50,  40
1811,  51,  41
Etc

I could create a chart in Excel in no time with that format, but it would be a pain rearranging all the data, unless there's some elegant intermediate step I'm not aware of.

I imagine it's easier to generate the csv file with a year by year pass?

If it's too difficult to create the above format, I'd love a report that generates the population for one village, and then just re-run it for the second, and copy/paste the results together in Excel.
By genome - Tuesday, March 31, 2015
As usual, nothing is ever as simple as it first seems, however have now got a Report skin together (see updated attachment in later post) that produces population counts for nominated places. Counts of births, deaths, immigrations and emigrations also included.

CSV file Header (called 'population.csv') is:

Year,Place0,Population0,Births0,Deaths0,Incoming0,Outgoing0,Place1,Population1,Births1,Deaths1,Incoming1,Outgoing1 ...etc...

Done some testing and seems to work OK but no guarantees so do your own tests!

Of course data needs to be complete to produce anything useful, e.g. date and place of birth and death, date and place of all 'occupancies/residencies' in the lives of the individuals concerned.

Might be useful to adapt this skin to track counts of people in particular families in all the places they crop up in.
By NiKo - Thursday, April 2, 2015
Wow .. you are awesome .. I will try it out and let you know how it works :-) .. Thank you so much!!
By NiKo - Friday, April 3, 2015
Wow, that works great ... Thank you so much!  Thank you for making it so easy to include multiple locations :-)

Would there be any way to include a list of names of which people are included in the population counts?  Or do you have another suggestion on how I can keep track of who's location history has been input?  I tend to start and stop my genealogy research, so it would be nice to easily check who I've completely input, and who I haven't.

I assume the count is of the first of each year?

Thank you in advance!
By genome - Friday, April 3, 2015
I assume the count is of the first of each year?

A counter is incremented when an event occurs within that year, so e.g. if born on 31st Dec 1903, 1 is added to population and birth count for 1903, even though only one day left in year.

As to checking who has contributed to the data, I suggest you add an Individual Custom Tag and use it as a marker to manually keep check.  The script could easily be amended to output say ID, dates,name and place to Report Log for cross checking your markers. 

e.g. after line 15 in stats.js put the line

Report.LogComment(obj.ID + ' ' + start + '-' + end + ' ' + obj.Name + ' @ ' + places[place]);


p.s. if you open the output file population.csv with MS Excel non ASCII place names will look strange as it stupidly does not recognise it as being UTF-8 encoded as GenoPro does not put a BOM (byte order mark) at the start of the file. Just open the file with Notepad and save it again to add the BOM and Excel will be happy Smile
By NiKo - Saturday, April 4, 2015
Thank you for the added explanations :-)

I'm editing stats.js with Notepad, and it doesn't provide the line count.  I entered the line you provided after what I thought the 15th line was, but the output did not change.  Can you provide a bit more context as to where that line should go?

Thank you also for the suggestion to include an Individual Custom Tag.
By genome - Saturday, April 4, 2015
function addIn(place, start, end, inc, birth, death, movein, moveout, dec) {
   // accumulate totals for each year of occupancy in a place 
   Report.LogComment(obj.ID + ' ' + start + '-' + end + ' ' + obj.Name + ' @ ' + places[place]);
   if (start < FirstYear) FirstYear = start;
 


Click the Status Bar option under NotePad's View menu and you will have a line and column count bottom right Smile
By NiKo - Saturday, April 4, 2015
Awesome! .. Thank you .. had pasted it one row ahead of where it should be.

Looks like it works great :-)
By genome - Saturday, April 4, 2015
Did a little more testing and noticed one or two oddities with messages e.g. when death & disposition present also had problems with Scripting Dictionary used to hold places so chnaged to javascript object instead.  Revised version in later post.
By NiKo - Sunday, April 5, 2015
Thanks for the update...
Can you help me understand something from the report?  I see multiple iterations of some people.  Are they being double counted when I use them as hyperlinks between genomaps?  I've replaced their names with {a..e} and the village is {z}.



ind00037 1941-2015 a @ z
ind00037 1941-1967 a @ z

ind00173 1949-2015 b @ z
ind00173 1949-2015 b @ z

ind00249 1983-2015 c @ z
ind00249 1983-2006 c @ z

ind00251 1991-2015 d @ z
ind00251 1991-2006 d @ z

ind02055 1944-2015 e @ z
ind02055 1944-2010 e @ z
By genome - Monday, April 6, 2015
Don't think it is hyperlinks causing the issue but a bit more fine tuning required.  Watch this space...

Well a wee bit more rigorous with the testing with the attached version so perhaps third time lucky but no promises!


By NiKo - Monday, April 6, 2015
Looks good :-)

All 5 of those duplicates disappeared, and don't see any others.  Thank you!