npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

swedish-history

v1.0.5

Published

A collection of datasets related to swedish history

Downloads

4

Readme

Swedish history data

install

npm install swedish-history

usage

import {
  battles,
  conflicts,
  geometries,
  persons,
  places,
} from 'swedish-history'

persons.regents

An array of JSON objects

interface PersonRegent {
  name: string
  wikipedia: Wikipedia
  reignStart: DateObject
  reignEnd: DateObject
  dateOfBirth?: DateObject
  dateOfDeath?: DateObject
  kin?: WikipediaWithText
  spouses: WikipediaWithText[]
  children: WikipediaWithText[]
  father?: WikipediaWithText
  mother?: WikipediaWithText
}

source wikipedia

places.balticCities

A GeoJSON FeatureCollection

interface PlacesBalticCitiesProperties {
  name: string
  alternativeNames?: {
    fromYear: number
    toYear: number | null
    value: string
  }[]
  partOf: {
    fromYear: number
    toYear: number | null
    de: string
    en: string
    sv: string
  }[]
}

type PlacesBalticCitiesFeature = Feature<PlacesBalticCitiesProperties, PointGeometry>

source baltictowns.com

places.goldCoast

A GeoJSON FeatureCollection

interface PlacesGoldCoastProperties {
  name: string
  swe_from_year: number
  swe_to_year: number
}

type PlacesGoldCoastFeature = Feature<PlacesGoldCoastProperties, PointGeometry>

source wikipedia

places.newSweden

A GeoJSON FeatureCollection

interface PlacesNewSwedenProperties {
  name: string
  swe_from_year: number
  swe_to_year: number
}

type PlacesNewSwedenFeature = Feature<PlacesNewSwedenProperties, PointGeometry>

source wikipedia

places.gardaRike

A GeoJSON FeatureCollection

interface PlacesGardarikeProperties {
  name: string
  wikipedia: Wikipedia
}

type PlacesGardarikeFeature = Feature<PlacesGardarikeProperties, PointGeometry>

source wikipedia

battles

An array of JSON objects

interface Battle {
  text: string
  wikipedia?: Wikipedia
  partOf: Wikipedia
  place: WikipediaWithText
  date: DateObject
  side1: {
    forces?: string
    losses?: string
    parts: WikipediaWithText[]
  }
  side2: {
    forces?: string
    losses?: string
    parts: WikipediaWithText[]
  }
  result: 0 | 1 | 2
  coordinates: [number, number]
}

source wikipedia

conflicts

An array of JSON objects

interface Conflict {
  text: string
  wikipedia: Wikipedia
  start: DateObject
  end: DateObject
  treaties?: ConflictTreaty[]
  parts: WikipediaWithText[][]
  casusBelli?: string
}

source wikipedia

geometries.regions

A GeoJSON FeatureCollection

interface GeometryRegionProperties {
  name: string
  swe_from_year?: number
  swe_from_wikipedia?: Wikipedia
  swe_to_year?: number
  swe_to_wikipedia?: Wikipedia
}

type GeometryRegionFeature = Feature<GeometryRegionProperties, PolygonGeometry|MultiPolygonGeometry>

Regions are provided without coastline (some sea around coastal regions is included), use whatever coastline fits your project such as OSM coastlines and Natural earth land.

sources wikipedia and OSM

geometries.regionsTopology

Same as the above as a topojson topology.

Objects are:

[
  'lost_1660', 'lost_1719', 'lost_1720',
  'lost_1721', 'lost_1803', 'lost_1809',
  'lost_1815', 'new_1561',  'new_1617',
  'new_1629',  'new_1644',  'new_1645',
  'new_1648',  'new_1654',  'new_1658',
  'swe_1560',  'swe_1561',  'swe_1617',
  'swe_1629',  'swe_1644',  'swe_1645',
  'swe_1648',  'swe_1654',  'swe_1658',
  'swe_1660',  'swe_1719',  'swe_1720',
  'swe_1721',  'swe_1803',  'swe_1809',
  'swe_1815',  'swe_1816'
]

getometries.getRegionsInYear

A function that takes a year and returns a FeatureCollection of regions. Years before 1560 return null.