Code Monkey home page Code Monkey logo

isds2023's Introduction

isds2023

Git repo for the summer school course, Introduction to Social Data Science, at the Faculty for Social Sciences at University of Copenhagen (Summer 2023), see webpage here.

Previous versions of the course material can be seen here: 2016, 2017, 2018, 2019, 2020, 2021, 2022. Note that in 2016 the summer school was run mainly by Sebastian Barfort teaching in R and the 2017-2022 course was run by Andreas Bjerre-Nielsen using Python.

License

This project is released under the MIT License, which basically lets you do anything you want with my code as long as you provide attribution back to me and don’t hold me liable.

MIT License

Copyright (c) 2023 Felix Chopra

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

isds2023's People

Contributors

fchop avatar isdsucph avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

isds2023's Issues

Submission of Notebooks

Hi,

How are we supposed to hand in our notebooks that we have made for answering our research questions? Should we provide a link to our GitHub repository in our PDF exam file, or would you prefer that we upload a folder containing the notebooks? If neither of these options is suitable, could you please specify the preferred method?

Best regards,

How sensitive is the correcting software?

Hi Felix,

How sensitive is the correcting software? I have solved ass.0, but now i'm wondering, if I should delete some of my print statements, that I have used to check my answers?

For instance:

Ex. 0.3.1: Write a function called minimum that takes as input a list of numbers, and returns the index and value of the minimum number as a tuple. Use your function to calculate the index and value of the minimum number in the list [-342, 195, 573, -234, 762, -175, 847, -882, 153, -22].
Store the result of this computation in a variable named answer_031.

#Code that solves Ex. 0.3.1
answer_031 = minimum(numbers_list)

print(answer_031)

Will the print statement here cause a problem?

Best regards,

Regarding ex 0.4.2 in assignment0

We are told that we should select some columns and rename them. Should the result of that be saved in an object with a specific name?

Assignment 1 - Ex. 3.3.3.9

We are asked to subset df_weather_period to find all Ontarian weather stations, using state == "ON".
There is no state (it should probably be STATE) variable in df_weather_period, it only appears after merging with the station data.

We assume that we should shimply subset df_weather_merged instead?

did not find TMAX data in df_weather

I tried to write this code:

Specify the URL of the CSV file for 1863 weather data

url = 'https://www1.ncdc.noaa.gov/pub/data/ghcn/daily/by_year/1863.csv.gz'

Read the CSV file into the DataFrame df_weather

df_weather = pd.read_csv(url, header=None, compression='gzip')

Display the first few rows of the DataFrame to verify the data

print(df_weather.head(10))

df_weather.to_csv('weather_data_1863.csv', index=False)

Define the column names to be used for the selected columns

cols = ['station', 'datetime', 'obs_type', 'obs_value']

Select the four left-most columns and rename them

df_weather = df_weather.iloc[:, :4].rename(columns=dict(zip(df_weather.columns[:4], cols)))

Display the first few rows of the DataFrame to verify the changes

print(df_weather.iloc[:, :4])

df_select = df_weather[(df_weather['station'] == 'ITE00100550') & (df_weather['obs_type'] == 'TMAX')].copy()
print(df_select)

but in the end, I can not find the TMAX value. The output of my last code was:
Empty DataFrame
Columns: [station, datetime, obs_type, obs_value]
Index: []

Could you please help me?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.