function florida_sample_pop_test ( )

%*****************************************************************************80
%
%% florida_sample_pop_test() tests florida_sample_pop().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    02 July 2016
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'florida_sample_pop_test():\n' );
  fprintf ( 1, '  florida_sample_pop() randomly samples census districts\n' );
  fprintf ( 1, '  weighted by population.\n' );
%
%  Read the longitude, latitude, population and geoid of each census tract.
%
  filename = 'florida_census.csv';
  [ lon, lat, pop, geoid ] = florida_census_reader ( filename );
%
%  Construct the PDF, just for printing convenience.
%
  pdf = florida_pdf_pop ( pop );
%
%  Construct the CDF.
%
  cdf = florida_cdf_pop ( pop );
%
%  Get N random samples.
%
  n = 50;
  indx = florida_sample_pop ( n, cdf );
%
%  Print some of the data.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, '       #      INDX        GEOID       POP             PDF\n' );
  fprintf ( 1, '\n' );

  for i = 1 : n
    if ( i <= 10 || n - 9 <= i )
      fprintf ( 1, '%8d  %8d  %11d  %8d  %14.6f\n', i, indx(i), geoid(indx(i)), pop(indx(i)), pdf(indx(i)) );
    elseif ( i == 11 )
      fprintf ( 1, '........  ........  ...........  ........  ..............\n' );
    end
  end 
%
%  Plot the sample points.
%
  filename = 'florida_sample_pop.png';
  plot_title = '50 spots uniformly sampled by populiation';
  florida_point_display ( lon(indx), lat(indx), filename, plot_title );

  return
end
