Skip to content

Pyppe/pyppe.fi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pyppe.fi

https://jekyllrb.com/docs/installation/macos/

gem install --user-install bundler compass jekyll jekyll-paginate
  • jekyll serve -w
  • jekyll serve --host=0.0.0.0 --watch
  • date -u +"%Y-%m-%dT%H:%M:%SZ"

TODO

package.json

Get twitter profile image

_.flatMap(window.users, u => {
  const {screenName} = u.user;
  return [
    `rm ${screenName}.jpg`,
    `curl -L 'https://twitter.com/${screenName}/profile_image?size=bigger'| convert - ${screenName}.jpg`
  ];
}).join('\n');
curl -L 'https://twitter.com/PinnallaFI/profile_image?size=bigger'| convert - PinnallaFI.jpg

Country stuff

wget "http://kartat.kapsi.fi/files/kuntajako/kuntajako_4500k/etrs89/shp/TietoaKuntajaosta_2017_4500k.zip"
unzip TietoaKuntajaosta_2017_4500k.zip
ogr2ogr -f GeoJSON -t_srs crs:84 SuomenKuntajako_2017_4500k.geo.json SuomenKuntajako_2017_4500k.shp

# https://fi.wikipedia.org/wiki/Luettelo_Suomen_kunnista
// Kunta -> Maakunta
const mapping = _.reduce($('.wikitable.sortable.jquery-tablesorter tbody tr').toArray(), (acc, el) => {
  acc[$(el).find('td:eq(2)').text()] = $(el).find('td:eq(5)').text();
  return acc;
}, {});

// Update orginal GeoJSON
_.forEach(geoJson.features, f => {
  const name = f.properties.NAMEFIN;
  const parent = mapping[name];
  if (!parent) {
    throw `No parent found for ${name}`;
  }
  f.properties = { name, parent };
});
geoJson.features = _.sortBy(geoJson.features, f => f.properties.name);

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published